X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fb1c207eca42103337f6c88ec23603a6ca988fed..d9347ab3e960f0f098338c88a79724dbcf4a58bb:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 342bfc2108..567cafa3b4 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -15,9 +15,15 @@ #define sleep(x) smpi_sleep(x) #define gettimeofday(x, y) smpi_gettimeofday(x, y) +#ifdef _WIN32 +#define MPI_CALL(type,name,args) \ + type name args; \ + type P##name args +#else #define MPI_CALL(type,name,args) \ type name args __attribute__((weak)); \ type P##name args +#endif SG_BEGIN_DECL() #define MPI_THREAD_SINGLE 0 @@ -53,6 +59,8 @@ SG_BEGIN_DECL() #define MPI_ERR_GROUP 10 #define MPI_ERR_OP 11 #define MPI_ERR_OTHER 12 +#define MPI_ERR_IN_STATUS 13 +#define MPI_ERR_PENDING 14 #define MPI_IDENT 0 #define MPI_SIMILAR 1 #define MPI_UNEQUAL 2 @@ -61,6 +69,13 @@ SG_BEGIN_DECL() #define MPI_TAG_UB 1000000 #define MPI_HOST 0 #define MPI_IO 0 +#define MPI_BSEND_OVERHEAD 0 + +typedef enum MPIR_Topo_type { + MPI_GRAPH=1, + MPI_CART=2, + MPI_DIST_GRAPH=3 +} MPIR_Topo_type; typedef ptrdiff_t MPI_Aint; typedef long long MPI_Offset; @@ -114,12 +129,14 @@ XBT_PUBLIC( MPI_Datatype ) MPI_OFFSET; XBT_PUBLIC( MPI_Datatype ) MPI_LB; XBT_PUBLIC( MPI_Datatype ) MPI_UB; //The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC. -XBT_PUBLIC( MPI_Datatype ) MPI_FLOAT_INT; -XBT_PUBLIC( MPI_Datatype ) MPI_LONG_INT; -XBT_PUBLIC( MPI_Datatype ) MPI_DOUBLE_INT; -XBT_PUBLIC( MPI_Datatype ) MPI_SHORT_INT; -XBT_PUBLIC( MPI_Datatype ) MPI_2INT; -XBT_PUBLIC( MPI_Datatype ) MPI_LONG_DOUBLE_INT; +XBT_PUBLIC(MPI_Datatype) MPI_FLOAT_INT; +XBT_PUBLIC(MPI_Datatype) MPI_LONG_INT; +XBT_PUBLIC(MPI_Datatype) MPI_DOUBLE_INT; +XBT_PUBLIC(MPI_Datatype) MPI_SHORT_INT; +XBT_PUBLIC(MPI_Datatype) MPI_2INT; +XBT_PUBLIC(MPI_Datatype) MPI_LONG_DOUBLE_INT; +XBT_PUBLIC(MPI_Datatype) MPI_2FLOAT; +XBT_PUBLIC(MPI_Datatype) MPI_2DOUBLE; typedef void MPI_User_function(void *invec, void *inoutvec, int *len, MPI_Datatype * datatype); @@ -392,6 +409,11 @@ typedef int MPI_Copy_function(MPI_Comm oldcomm, int keyval, void* extra_state, v typedef int MPI_Delete_function(MPI_Comm comm, int keyval, void* attribute_val, void* extra_state); XBT_PUBLIC(MPI_Datatype) MPI_PACKED; +XBT_PUBLIC(MPI_Errhandler*) MPI_ERRORS_RETURN; +XBT_PUBLIC(MPI_Errhandler*) MPI_ERRORS_ARE_FATAL; +XBT_PUBLIC(MPI_Errhandler*) MPI_ERRHANDLER_NULL; + + MPI_CALL(XBT_PUBLIC(int), MPI_Pack_size, (int incount, MPI_Datatype datatype, MPI_Comm comm, int* size)); MPI_CALL(XBT_PUBLIC(int), MPI_Cart_coords, (MPI_Comm comm, int rank, int maxdims, int* coords)); MPI_CALL(XBT_PUBLIC(int), MPI_Cart_create, (MPI_Comm comm_old, int ndims, int* dims, int* periods, int reorder, MPI_Comm* comm_cart)); @@ -448,7 +470,6 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Pcontrol, (const int level )); //FIXME: End of all the not yet implemented stuff // smpi functions -XBT_IMPORT_NO_EXPORT(int) smpi_simulated_main(int argc, char **argv); XBT_PUBLIC(MPI_Comm) smpi_process_comm_self(void); /* XBT_PUBLIC(void) smpi_exit(int); @@ -489,7 +510,9 @@ XBT_PUBLIC(void*) smpi_shared_set_call(const char* func, const char* input, void : smpi_shared_set_call(#func, input, func(__VA_ARGS__))) /* Fortran specific stuff */ -XBT_PUBLIC(int) MAIN__(void); +XBT_PUBLIC(int) __attribute__((weak)) smpi_simulated_main(int argc, char** argv); +XBT_PUBLIC(int) __attribute__((weak)) MAIN__(void); +XBT_PUBLIC(int) smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]); XBT_PUBLIC(int) smpi_process_index(void);