X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ac4b1f28abf1cd9b7448e8277fdc7cb57c89e982..6760cb07d6b57be16928d95339d71e57c4e24f36:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 7ce19779e8..5d5dfb5289 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -1,3 +1,9 @@ +/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #ifndef SMPI_H #define SMPI_H @@ -23,6 +29,7 @@ SG_BEGIN_DECL() #define SMPI_RAND_SEED 5 #define MPI_ANY_SOURCE -1 +#define MPI_PROC_NULL -2 #define MPI_ANY_TAG -1 #define MPI_UNDEFINED -1 @@ -45,6 +52,8 @@ SG_BEGIN_DECL() #define MPI_UNEQUAL 2 #define MPI_CONGRUENT 3 +#define MPI_WTIME_IS_GLOBAL 1 + typedef ptrdiff_t MPI_Aint; typedef long long MPI_Offset; @@ -55,8 +64,6 @@ typedef struct { int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; - int _count; - int _cancelled; } MPI_Status; #define MPI_STATUS_IGNORE NULL @@ -134,6 +141,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; @@ -148,8 +156,12 @@ XBT_PUBLIC(int) MPI_Is_thread_main(int* flag); XBT_PUBLIC(int) MPI_Abort(MPI_Comm comm, int errorcode); XBT_PUBLIC(double) MPI_Wtime(void); +XBT_PUBLIC(int) MPI_Address(void *location, MPI_Aint *address); + +XBT_PUBLIC(int) MPI_Type_free(MPI_Datatype* datatype); XBT_PUBLIC(int) MPI_Type_size(MPI_Datatype datatype, size_t* size); XBT_PUBLIC(int) MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint* lb, MPI_Aint* extent); +XBT_PUBLIC(int) MPI_Type_extent(MPI_Datatype datatype, MPI_Aint* extent); XBT_PUBLIC(int) MPI_Type_lb(MPI_Datatype datatype, MPI_Aint* disp); XBT_PUBLIC(int) MPI_Type_ub(MPI_Datatype datatype, MPI_Aint* disp); @@ -179,6 +191,11 @@ XBT_PUBLIC(int) MPI_Comm_dup(MPI_Comm comm, MPI_Comm* newcomm); XBT_PUBLIC(int) MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm* newcomm); XBT_PUBLIC(int) MPI_Comm_free(MPI_Comm* comm); +XBT_PUBLIC(int) MPI_Send_init(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request* request); +XBT_PUBLIC(int) MPI_Recv_init(void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request* request); +XBT_PUBLIC(int) MPI_Start(MPI_Request* request); +XBT_PUBLIC(int) MPI_Startall(int count, MPI_Request* requests); +XBT_PUBLIC(int) MPI_Request_free(MPI_Request* request); XBT_PUBLIC(int) MPI_Irecv(void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request* request); XBT_PUBLIC(int) MPI_Isend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request* request); XBT_PUBLIC(int) MPI_Recv(void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status* status); @@ -187,7 +204,6 @@ XBT_PUBLIC(int) MPI_Sendrecv(void* sendbuf, int sendcount, MPI_Datatype sendtype 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); @@ -205,6 +221,7 @@ XBT_PUBLIC(int) MPI_Scatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, XBT_PUBLIC(int) MPI_Scatterv(void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm); XBT_PUBLIC(int) MPI_Reduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm); XBT_PUBLIC(int) MPI_Allreduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); +XBT_PUBLIC(int) MPI_Scan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); XBT_PUBLIC(int) MPI_Reduce_scatter(void* sendbuf, void* recvbuf, int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); XBT_PUBLIC(int) MPI_Alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm); XBT_PUBLIC(int) MPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf, int *recvcounts, int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm); @@ -216,6 +233,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);