Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef INC_ESYS_MPI
00016 #define INC_ESYS_MPI
00017
00018 #include "system_dep.h"
00019 #include "types.h"
00020
00021 #ifdef ESYS_MPI
00022 #include "mpi_C.h"
00023 #else
00024 typedef int MPI_Comm;
00025 typedef int MPI_Request;
00026 #define MPI_INT 6
00027 #define MPI_DOUBLE 11
00028 #define MPI_COMM_WORLD 91
00029 #endif
00030
00031 typedef int Esys_MPI_rank;
00032
00033 #define ESYS_MPI_TODO { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
00034
00035
00036 struct Esys_MPIInfo {
00037 dim_t reference_counter;
00038 int size;
00039 Esys_MPI_rank rank;
00040 MPI_Comm comm;
00041 int msg_tag_counter;
00042 };
00043
00044 typedef struct Esys_MPIInfo Esys_MPIInfo;
00045
00046
00047
00048 ESYSUTILS_DLL_API
00049 Esys_MPIInfo* Esys_MPIInfo_alloc( MPI_Comm comm );
00050
00051 ESYSUTILS_DLL_API
00052 void Esys_MPIInfo_free( Esys_MPIInfo* );
00053
00054 ESYSUTILS_DLL_API
00055 Esys_MPIInfo *Esys_MPIInfo_getReference( Esys_MPIInfo* in );
00056
00057 ESYSUTILS_DLL_API
00058 int Esys_MPIInfo_initialized( void );
00059
00060 ESYSUTILS_DLL_API
00061 index_t Esys_MPIInfo_mod(index_t n, index_t k);
00062
00063 ESYSUTILS_DLL_API
00064 dim_t Esys_MPIInfo_setDistribution(Esys_MPIInfo* in ,index_t min_id,index_t max_id,index_t* distribution);
00065
00066 ESYSUTILS_DLL_API
00067 void Esys_MPIInfo_Split( Esys_MPIInfo *mpi_info, dim_t n, dim_t* local_N,index_t* offset);
00068
00069 ESYSUTILS_DLL_API
00070 bool_t Esys_MPIInfo_noError( Esys_MPIInfo *mpi_info);
00071
00072 ESYSUTILS_DLL_API
00073 char *Esys_MPI_appendRankToFileName(const char *, int, int);
00074
00075 #endif