| 1 | /*BHEADER**********************************************************************
|
|---|
| 2 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 3 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 4 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 5 | *
|
|---|
| 6 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 7 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 8 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 9 | *
|
|---|
| 10 | * $Revision: 2.4 $
|
|---|
| 11 | ***********************************************************************EHEADER*/
|
|---|
| 12 |
|
|---|
| 13 | /******************************************************************************
|
|---|
| 14 | *
|
|---|
| 15 | * Fake mpi stubs to generate serial codes without mpi
|
|---|
| 16 | *
|
|---|
| 17 | *****************************************************************************/
|
|---|
| 18 | /*just a test comment*/
|
|---|
| 19 | #ifndef hypre_thread_MPISTUBS
|
|---|
| 20 | #define hypre_thread_MPISTUBS
|
|---|
| 21 |
|
|---|
| 22 | #ifdef HYPRE_USE_PTHREADS
|
|---|
| 23 |
|
|---|
| 24 | #ifdef __cplusplus
|
|---|
| 25 | extern "C" {
|
|---|
| 26 | #endif
|
|---|
| 27 |
|
|---|
| 28 | #ifndef HYPRE_USING_THREAD_MPISTUBS
|
|---|
| 29 |
|
|---|
| 30 | #define MPI_Init hypre_thread_MPI_Init
|
|---|
| 31 | #define MPI_Wtime hypre_thread_MPI_Wtime
|
|---|
| 32 | #define MPI_Wtick hypre_thread_MPI_Wtick
|
|---|
| 33 | #define MPI_Barrier hypre_thread_MPI_Barrier
|
|---|
| 34 | #define MPI_Finalize hypre_thread_MPI_Finalize
|
|---|
| 35 | #define MPI_Comm_group hypre_thread_MPI_Comm_group
|
|---|
| 36 | #define MPI_Comm_dup hypre_thread_MPI_Comm_dup
|
|---|
| 37 | #define MPI_Group_incl hypre_thread_MPI_Group_incl
|
|---|
| 38 | #define MPI_Comm_create hypre_thread_MPI_Comm_create
|
|---|
| 39 | #define MPI_Allgather hypre_thread_MPI_Allgather
|
|---|
| 40 | #define MPI_Allgatherv hypre_thread_MPI_Allgatherv
|
|---|
| 41 | #define MPI_Bcast hypre_thread_MPI_Bcast
|
|---|
| 42 | #define MPI_Send hypre_thread_MPI_Send
|
|---|
| 43 | #define MPI_Recv hypre_thread_MPI_Recv
|
|---|
| 44 |
|
|---|
| 45 | #define MPI_Isend hypre_thread_MPI_Isend
|
|---|
| 46 | #define MPI_Irecv hypre_thread_MPI_Irecv
|
|---|
| 47 | #define MPI_Wait hypre_thread_MPI_Wait
|
|---|
| 48 | #define MPI_Waitall hypre_thread_MPI_Waitall
|
|---|
| 49 | #define MPI_Waitany hypre_thread_MPI_Waitany
|
|---|
| 50 | #define MPI_Comm_size hypre_thread_MPI_Comm_size
|
|---|
| 51 | #define MPI_Comm_rank hypre_thread_MPI_Comm_rank
|
|---|
| 52 | #define MPI_Allreduce hypre_thread_MPI_Allreduce
|
|---|
| 53 | #define MPI_Type_hvector hypre_thread_MPI_Type_hvector
|
|---|
| 54 | #define MPI_Type_struct hypre_thread_MPI_Type_struct
|
|---|
| 55 | #define MPI_Type_free hypre_thread_MPI_Type_free
|
|---|
| 56 | #define MPI_Type_commit hypre_thread_MPI_Type_commit
|
|---|
| 57 |
|
|---|
| 58 | #endif
|
|---|
| 59 |
|
|---|
| 60 | /*--------------------------------------------------------------------------
|
|---|
| 61 | * Prototypes
|
|---|
| 62 | *--------------------------------------------------------------------------*/
|
|---|
| 63 |
|
|---|
| 64 | /* mpistubs.c */
|
|---|
| 65 | int MPI_Init( int *argc , char ***argv );
|
|---|
| 66 | double MPI_Wtime( void );
|
|---|
| 67 | double MPI_Wtick( void );
|
|---|
| 68 | int MPI_Barrier( MPI_Comm comm );
|
|---|
| 69 | int MPI_Finalize( void );
|
|---|
| 70 | int MPI_Abort( MPI_Comm comm , int errorcode );
|
|---|
| 71 | int MPI_Comm_group( MPI_Comm comm , MPI_Group *group );
|
|---|
| 72 | int MPI_Comm_dup( MPI_Comm comm , MPI_Comm *newcomm );
|
|---|
| 73 | int MPI_Group_incl( MPI_Group group , int n , int *ranks , MPI_Group *newgroup );
|
|---|
| 74 | int MPI_Comm_create( MPI_Comm comm , MPI_Group group , MPI_Comm *newcomm );
|
|---|
| 75 | int MPI_Get_count( MPI_Status *status , MPI_Datatype datatype , int *count );
|
|---|
| 76 | int MPI_Alltoall( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , MPI_Comm comm );
|
|---|
| 77 | int MPI_Allgather( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , MPI_Comm comm );
|
|---|
| 78 | int MPI_Allgatherv( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int *recvcounts , int *displs , MPI_Datatype recvtype , MPI_Comm comm );
|
|---|
| 79 | int MPI_Gather( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , int root , MPI_Comm comm );
|
|---|
| 80 | int MPI_Scatter( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , int root , MPI_Comm comm );
|
|---|
| 81 | int MPI_Bcast( void *buffer , int count , MPI_Datatype datatype , int root , MPI_Comm comm );
|
|---|
| 82 | int MPI_Send( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm );
|
|---|
| 83 | int MPI_Recv( void *buf , int count , MPI_Datatype datatype , int source , int tag , MPI_Comm comm , MPI_Status *status );
|
|---|
| 84 | int MPI_Isend( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
|
|---|
| 85 | int MPI_Irecv( void *buf , int count , MPI_Datatype datatype , int source , int tag , MPI_Comm comm , MPI_Request *request );
|
|---|
| 86 | int MPI_Wait( MPI_Request *request , MPI_Status *status );
|
|---|
| 87 | int MPI_Waitall( int count , MPI_Request *array_of_requests , MPI_Status *array_of_statuses );
|
|---|
| 88 | int MPI_Waitany( int count , MPI_Request *array_of_requests , int *index , MPI_Status *status );
|
|---|
| 89 | int MPI_Comm_size( MPI_Comm comm , int *size );
|
|---|
| 90 | int MPI_Comm_rank( MPI_Comm comm , int *rank );
|
|---|
| 91 | int MPI_Allreduce( void *sendbuf , void *recvbuf , int count , MPI_Datatype datatype , MPI_Op op , MPI_Comm comm );
|
|---|
| 92 | int MPI_Address( void *location , MPI_Aint *address );
|
|---|
| 93 | int MPI_Type_contiguous( int count , MPI_Datatype oldtype , MPI_Datatype *newtype );
|
|---|
| 94 | int MPI_Type_vector( int count , int blocklength , int stride , MPI_Datatype oldtype , MPI_Datatype *newtype );
|
|---|
| 95 | int MPI_Type_hvector( int count , int blocklength , MPI_Aint stride , MPI_Datatype oldtype , MPI_Datatype *newtype );
|
|---|
| 96 | int MPI_Type_struct( int count , int *array_of_blocklengths , MPI_Aint *array_of_displacements , MPI_Datatype *array_of_types , MPI_Datatype *newtype );
|
|---|
| 97 | int MPI_Type_free( MPI_Datatype *datatype );
|
|---|
| 98 | int MPI_Type_commit( MPI_Datatype *datatype );
|
|---|
| 99 | int MPI_Request_free( MPI_Request *request );
|
|---|
| 100 | int MPI_Send_init( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
|
|---|
| 101 | int MPI_Recv_init( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
|
|---|
| 102 | int MPI_Startall( int count , MPI_Request *array_of_requests );
|
|---|
| 103 | int MPI_Iprobe( int source , int tag , MPI_Comm comm , int *flag , MPI_Status *status );
|
|---|
| 104 | int MPI_Probe( int source , int tag , MPI_Comm comm , MPI_Status *status );
|
|---|
| 105 | int MPI_Irsend( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
|
|---|
| 106 |
|
|---|
| 107 | #ifdef __cplusplus
|
|---|
| 108 | }
|
|---|
| 109 | #endif
|
|---|
| 110 |
|
|---|
| 111 | #endif
|
|---|
| 112 |
|
|---|
| 113 | #endif
|
|---|