X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/70ed180f3ce3495678d048e9e396ef5eb65a6a99..998dfc15cf89b4e8ebba31507b4e9dbd86784e1c:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 016e9ececd..a4a815a0f8 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -55,6 +55,8 @@ typedef struct { int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; + int _count; + int _cancelled; } MPI_Status; #define MPI_STATUS_IGNORE NULL @@ -93,6 +95,15 @@ extern MPI_Datatype MPI_C_LONG_DOUBLE_COMPLEX; extern MPI_Datatype MPI_AINT; extern MPI_Datatype MPI_OFFSET; +//The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC. +extern MPI_Datatype MPI_FLOAT_INT; +extern MPI_Datatype MPI_LONG_INT; +extern MPI_Datatype MPI_DOUBLE_INT; +extern MPI_Datatype MPI_SHORT_INT; +extern MPI_Datatype MPI_2INT; +extern MPI_Datatype MPI_LONG_DOUBLE_INT; + + typedef void MPI_User_function(void* invec, void* inoutvec, int* len, MPI_Datatype* datatype); struct s_smpi_mpi_op; typedef struct s_smpi_mpi_op* MPI_Op; @@ -100,6 +111,8 @@ typedef struct s_smpi_mpi_op* MPI_Op; #define MPI_OP_NULL NULL extern MPI_Op MPI_MAX; extern MPI_Op MPI_MIN; +extern MPI_Op MPI_MAXLOC; +extern MPI_Op MPI_MINLOC; extern MPI_Op MPI_SUM; extern MPI_Op MPI_PROD; extern MPI_Op MPI_LAND; @@ -113,6 +126,7 @@ struct s_smpi_mpi_group; typedef struct s_smpi_mpi_group* MPI_Group; #define MPI_GROUP_NULL NULL + extern MPI_Group MPI_GROUP_EMPTY; struct s_smpi_mpi_communicator; @@ -120,6 +134,7 @@ typedef struct s_smpi_mpi_communicator* MPI_Comm; #define MPI_COMM_NULL NULL extern MPI_Comm MPI_COMM_WORLD; +#define MPI_COMM_SELF smpi_process_comm_self() struct s_smpi_mpi_request; typedef struct s_smpi_mpi_request* MPI_Request; @@ -157,6 +172,8 @@ XBT_PUBLIC(int) MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MP XBT_PUBLIC(int) MPI_Comm_rank(MPI_Comm comm, int* rank); XBT_PUBLIC(int) MPI_Comm_size(MPI_Comm comm, int* size); +XBT_PUBLIC(int) MPI_Get_processor_name(char *name, int *resultlen); + XBT_PUBLIC(int) MPI_Comm_group(MPI_Comm comm, MPI_Group* group); XBT_PUBLIC(int) MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int* result); XBT_PUBLIC(int) MPI_Comm_dup(MPI_Comm comm, MPI_Comm* newcomm); @@ -170,6 +187,8 @@ XBT_PUBLIC(int) MPI_Send(void* buf, int count, MPI_Datatype datatype, int dst, i XBT_PUBLIC(int) MPI_Sendrecv(void* sendbuf, int sendcount, MPI_Datatype sendtype, int dst, int sendtag, void* recvbuf, int recvcount, MPI_Datatype recvtype, int src, int recvtag, MPI_Comm comm, MPI_Status* status); XBT_PUBLIC(int) MPI_Sendrecv_replace(void* buf, int count, MPI_Datatype datatype, int dst, int sendtag, int src, int recvtag, MPI_Comm comm, MPI_Status* status); + +XBT_PUBLIC(int) MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count); XBT_PUBLIC(int) MPI_Test(MPI_Request* request, int* flag, MPI_Status* status); XBT_PUBLIC(int) MPI_Testany(int count, MPI_Request requests[], int* index, int* flag, MPI_Status* status); XBT_PUBLIC(int) MPI_Wait(MPI_Request* request, MPI_Status* status); @@ -198,6 +217,7 @@ XBT_PUBLIC(int) MPI_Comm_split(MPI_Comm comm, int color, int key, */ // 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(unsigned int) smpi_sleep(unsigned int); XBT_PUBLIC(void) smpi_exit(int);