From e52278566439b20cb46f86ccc08e5cf451f651bd Mon Sep 17 00:00:00 2001 From: markls Date: Fri, 24 Aug 2007 00:53:03 +0000 Subject: [PATCH] moving smpi.h to public include directory. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4111 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/Makefile.am | 2 + src/Makefile.am | 2 +- src/smpi/private.h | 2 +- src/smpi/smpi.h | 116 -------------------------------------------- src/smpi/smpicc.in | 2 +- 5 files changed, 5 insertions(+), 119 deletions(-) delete mode 100644 src/smpi/smpi.h diff --git a/include/Makefile.am b/include/Makefile.am index 86f4e15037..1e26194424 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -31,6 +31,8 @@ nobase_include_HEADERS = \ simdag/simdag.h \ simdag/datatypes.h \ \ + smpi/smpi.h \ + \ surf/surfxml_parse.h \ surf/surfxml.h \ \ diff --git a/src/Makefile.am b/src/Makefile.am index 5d69dfae4a..6ba70ce725 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,7 @@ EXTRA_DIST= \ include/simix/simix.h include/simix/datatypes.h \ simix/msg_simix_private.h \ \ - smpi/private.h smpi/smpi.h + smpi/private.h #LIBRARY_VERSION= 0:0:0 # | | | diff --git a/src/smpi/private.h b/src/smpi/private.h index bd4cdb0d5c..413d6d1c55 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -4,7 +4,7 @@ #include "simix/simix.h" #include "xbt/mallocator.h" #include "xbt/xbt_os_time.h" -#include "smpi.h" +#include "smpi/smpi.h" #define SMPI_DEFAULT_SPEED 100 #define SMPI_REQUEST_MALLOCATOR_SIZE 100 diff --git a/src/smpi/smpi.h b/src/smpi/smpi.h deleted file mode 100644 index 967fb64a8c..0000000000 --- a/src/smpi/smpi.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef SMPI_H -#define SMPI_H - -#include -#include - -#define SMPI_RAND_SEED 5 - -#define MPI_ANY_SOURCE -1 - -// errorcodes -#define MPI_SUCCESS 0 -#define MPI_ERR_COMM 1 -#define MPI_ERR_ARG 2 -#define MPI_ERR_TYPE 3 -#define MPI_ERR_REQUEST 4 -#define MPI_ERR_INTERN 5 -#define MPI_ERR_COUNT 6 -#define MPI_ERR_RANK 7 -#define MPI_ERR_TAG 8 - -// MPI_Comm -typedef struct smpi_mpi_communicator_simdata *smpi_mpi_communicator_simdata_t; -struct smpi_mpi_communicator_t { - int size; - smpi_mpi_communicator_simdata_t simdata; -}; -typedef struct smpi_mpi_communicator_t smpi_mpi_communicator_t; -typedef smpi_mpi_communicator_t *MPI_Comm; - -// MPI_Status -struct smpi_mpi_status_t { - int MPI_SOURCE; -}; -typedef struct smpi_mpi_status_t smpi_mpi_status_t; -typedef smpi_mpi_status_t MPI_Status; - -// MPI_Datatype -struct smpi_mpi_datatype_t { - size_t size; -}; -typedef struct smpi_mpi_datatype_t smpi_mpi_datatype_t; -typedef smpi_mpi_datatype_t *MPI_Datatype; - -// MPI_Request -typedef struct smpi_mpi_request_simdata *smpi_mpi_request_simdata_t; -struct smpi_mpi_request_t { - smpi_mpi_communicator_t *comm; - int src; - int dst; - int tag; - - void *buf; - smpi_mpi_datatype_t *datatype; - int count; - - short int completed :1; - - smpi_mpi_request_simdata_t simdata; -}; -typedef struct smpi_mpi_request_t smpi_mpi_request_t; -typedef smpi_mpi_request_t *MPI_Request; - -// MPI_Op -struct smpi_mpi_op_t { - void (*func)(void *x, void *y, void *z); -}; -typedef struct smpi_mpi_op_t smpi_mpi_op_t; -typedef smpi_mpi_op_t *MPI_Op; - -// global SMPI data structure -typedef struct SMPI_MPI_Global { - - smpi_mpi_communicator_t *mpi_comm_world; - - smpi_mpi_datatype_t *mpi_byte; - smpi_mpi_datatype_t *mpi_int; - smpi_mpi_datatype_t *mpi_double; - - smpi_mpi_op_t *mpi_land; - smpi_mpi_op_t *mpi_sum; - -} s_SMPI_MPI_Global_t, *SMPI_MPI_Global_t; -extern SMPI_MPI_Global_t smpi_mpi_global; - -#define MPI_COMM_WORLD (smpi_mpi_global->mpi_comm_world) - -#define MPI_STATUS_IGNORE NULL - -#define MPI_BYTE (smpi_mpi_global->mpi_byte) -#define MPI_DOUBLE (smpi_mpi_global->mpi_double) -#define MPI_INT (smpi_mpi_global->mpi_int) - -#define MPI_LAND (smpi_mpi_global->mpi_land) -#define MPI_SUM (smpi_mpi_glboal->mpi_sum) - -// MPI Functions -int MPI_Init(int *argc, char ***argv); -int MPI_Finalize(void); -int MPI_Abort(MPI_Comm comm, int errorcode); -int MPI_Comm_size(MPI_Comm comm, int *size); -int MPI_Comm_rank(MPI_Comm comm, int *rank); -int MPI_Type_size(MPI_Datatype datatype, size_t *size); -int MPI_Barrier(MPI_Comm comm); -int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request); -int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status); -int MPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request *request); -int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm); - -// smpi functions -XBT_IMPORT_NO_EXPORT(int) smpi_simulated_main(int argc, char **argv); -unsigned int smpi_sleep(unsigned int); -void smpi_exit(int); -int smpi_gettimeofday(struct timeval *tv, struct timezone *tz); - -#endif diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index a92f30f8f3..c37cbc2961 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -19,7 +19,7 @@ function modsource { TMPSOURCE="${TMPDIR}${SOURCE}" cat > ${TMPSOURCE} <