Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enforce type for MPI_REQUEST_NULL, and fix mistakes.
[simgrid.git] / include / smpi / smpi.h
index 11a4636..7caf4d5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2013. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -41,10 +41,13 @@ SG_BEGIN_DECL()
 #define SMPI_RAND_SEED 5
 #define MPI_ANY_SOURCE -555
 #define MPI_BOTTOM (void *)-111
+#define MPI_FORTRAN_BOTTOM -111
 #define MPI_PROC_NULL -666
 #define MPI_ANY_TAG -444
 #define MPI_UNDEFINED -333
 #define MPI_IN_PLACE (void *)-222
+#define MPI_FORTRAN_IN_PLACE -222
+
 // errorcodes
 #define MPI_SUCCESS       0
 #define MPI_ERR_COMM      1
@@ -164,6 +167,8 @@ typedef struct {
 
 #define MPI_STATUS_IGNORE NULL
 #define MPI_STATUSES_IGNORE NULL
+#define MPI_FORTRAN_STATUS_IGNORE -1
+#define MPI_FORTRAN_STATUSES_IGNORE -1
 
 #define MPI_DATATYPE_NULL NULL
 XBT_PUBLIC_DATA( MPI_Datatype ) MPI_CHAR;
@@ -212,6 +217,7 @@ XBT_PUBLIC_DATA(MPI_Datatype) MPI_2DOUBLE;
 //for now we only send int values at max
 #define MPI_Count int
 #define MPI_COUNT MPI_INT
+
 typedef void MPI_User_function(void *invec, void *inoutvec, int *len,
                                MPI_Datatype * datatype);
 struct s_smpi_mpi_op;
@@ -249,7 +255,8 @@ XBT_PUBLIC_DATA( int ) MPI_UNIVERSE_SIZE;
 struct s_smpi_mpi_request;
 typedef struct s_smpi_mpi_request *MPI_Request;
 
-#define MPI_REQUEST_NULL NULL
+#define MPI_REQUEST_NULL ((MPI_Request)NULL)
+#define MPI_FORTRAN_REQUEST_NULL -1
 
 MPI_CALL(XBT_PUBLIC(int), MPI_Init, (int *argc, char ***argv));
 MPI_CALL(XBT_PUBLIC(int), MPI_Finalize, (void));
@@ -565,6 +572,7 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_get, (MPI_Comm comm, MPI_Errhandler* er
 MPI_CALL(XBT_PUBLIC(int), MPI_Error_string, (int errorcode, char* string, int* resultlen));
 MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_set, (MPI_Comm comm, MPI_Errhandler errhandler));
 MPI_CALL(XBT_PUBLIC(int), MPI_Comm_set_errhandler, (MPI_Comm comm, MPI_Errhandler errhandler));
+MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_errhandler, (MPI_Comm comm, MPI_Errhandler *errhandler));
 MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create_errhandler,( MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler));
 MPI_CALL(XBT_PUBLIC(int), MPI_Comm_call_errhandler,(MPI_Comm comm,int errorcode));
 MPI_CALL(XBT_PUBLIC(int), MPI_Add_error_class,( int *errorclass));