From: Augustin Degomme Date: Tue, 23 Oct 2012 08:08:07 +0000 (+0200) Subject: add various defines and objects to provide better compilation support (all C tests... X-Git-Tag: v3_9_rc1~91^2~212 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6d4434a0ebdb34758d95faec8b47088a3f760df2?hp=f78100b1ef0d7c877598541cc6a0d653387f9975 add various defines and objects to provide better compilation support (all C tests from mpich-test suite now compile) --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 2d94d6a065..d032ac38a8 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -59,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 @@ -67,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; @@ -398,6 +407,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)); diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index c69a2df67f..24e869c468 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -35,6 +35,10 @@ static int process_count = 0; MPI_Comm MPI_COMM_WORLD = MPI_COMM_NULL; +MPI_Errhandler* MPI_ERRORS_RETURN = NULL; +MPI_Errhandler* MPI_ERRORS_ARE_FATAL = NULL; +MPI_Errhandler* MPI_ERRHANDLER_NULL = NULL; + #define MAILBOX_NAME_MAXLEN (5 + sizeof(int) * 2 + 1) static char* get_mailbox_name(char* str, int index) { diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index a83b0bd9ba..f10a36f6a0 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -2055,6 +2055,11 @@ int PMPI_Type_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* smpi_bench_begin(); return retval;} +int PMPI_Error_class(int errorcode, int* errorclass) { + // assume smpi uses only standard mpi error codes + *errorclass=errorcode; + return MPI_SUCCESS; +} /* The following calls are not yet implemented and will fail at runtime. */ /* Once implemented, please move them above this notice. */ @@ -2128,10 +2133,6 @@ int PMPI_Topo_test(MPI_Comm comm, int* top_type) { return not_yet_implemented(); } -int PMPI_Error_class(int errorcode, int* errorclass) { - return not_yet_implemented(); -} - int PMPI_Errhandler_create(MPI_Handler_function* function, MPI_Errhandler* errhandler) { return not_yet_implemented(); }