X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a3848e5ea6b2305d6059c89705edaccbec356455..6651fd794cc26384fac2bffa8efb5f8106c82c59:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index eea00325d0..3901734b77 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -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 @@ -40,11 +40,14 @@ SG_BEGIN_DECL() #define MPI_MAX_LIBRARY_VERSION_STRING 100 #define SMPI_RAND_SEED 5 #define MPI_ANY_SOURCE -555 -#define MPI_BOTTOM (void *)0 +#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 @@ -162,10 +165,12 @@ typedef struct { int count; } MPI_Status; -#define MPI_STATUS_IGNORE NULL -#define MPI_STATUSES_IGNORE NULL +#define MPI_STATUS_IGNORE ((MPI_Status*)NULL) +#define MPI_STATUSES_IGNORE ((MPI_Status*)NULL) +#define MPI_FORTRAN_STATUS_IGNORE -1 +#define MPI_FORTRAN_STATUSES_IGNORE -1 -#define MPI_DATATYPE_NULL NULL +#define MPI_DATATYPE_NULL ((MPI_Datatype)NULL) XBT_PUBLIC_DATA( MPI_Datatype ) MPI_CHAR; XBT_PUBLIC_DATA( MPI_Datatype ) MPI_SHORT; XBT_PUBLIC_DATA( MPI_Datatype ) MPI_INT; @@ -212,12 +217,13 @@ 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; typedef struct s_smpi_mpi_op *MPI_Op; -#define MPI_OP_NULL NULL +#define MPI_OP_NULL ((MPI_Op)NULL) XBT_PUBLIC_DATA( MPI_Op ) MPI_MAX; XBT_PUBLIC_DATA( MPI_Op ) MPI_MIN; XBT_PUBLIC_DATA( MPI_Op ) MPI_MAXLOC; @@ -234,22 +240,23 @@ XBT_PUBLIC_DATA( MPI_Op ) MPI_BXOR; struct s_smpi_mpi_group; typedef struct s_smpi_mpi_group *MPI_Group; -#define MPI_GROUP_NULL NULL +#define MPI_GROUP_NULL ((MPI_Group)NULL) XBT_PUBLIC_DATA( MPI_Group ) MPI_GROUP_EMPTY; struct s_smpi_mpi_communicator; typedef struct s_smpi_mpi_communicator *MPI_Comm; -#define MPI_COMM_NULL NULL +#define MPI_COMM_NULL ((MPI_Comm)NULL) XBT_PUBLIC_DATA( MPI_Comm ) MPI_COMM_WORLD; -#define MPI_UNIVERSE_SIZE smpi_comm_size(MPI_COMM_WORLD) +XBT_PUBLIC_DATA( int ) MPI_UNIVERSE_SIZE; #define MPI_COMM_SELF smpi_process_comm_self() 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)); @@ -279,6 +286,9 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Type_commit, (MPI_Datatype* datatype)); MPI_CALL(XBT_PUBLIC(int), MPI_Type_hindexed, (int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype)); +MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_hindexed, + (int count, int* blocklens, MPI_Aint* indices, + MPI_Datatype old_type, MPI_Datatype* newtype)); MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_hindexed_block, (int count, int blocklength, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype)); @@ -291,6 +301,9 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_hvector, MPI_CALL(XBT_PUBLIC(int), MPI_Type_indexed, (int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype)); +MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_indexed, + (int count, int* blocklens, int* indices, + MPI_Datatype old_type, MPI_Datatype* newtype)); MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_indexed_block, (int count, int blocklength, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype)); @@ -559,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)); @@ -668,6 +682,15 @@ XBT_PUBLIC(MPI_Comm) smpi_process_comm_self(void); XBT_PUBLIC(void) smpi_exit(int); */ +XBT_PUBLIC(void) smpi_execute_flops(double flops); +XBT_PUBLIC(void) smpi_execute(double duration); + +XBT_PUBLIC(double) smpi_get_host_power_peak_at(int pstate_index); +XBT_PUBLIC(double) smpi_get_host_current_power_peak(void); +XBT_PUBLIC(int) smpi_get_host_nb_pstates(void); +XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index); +XBT_PUBLIC(double) smpi_get_host_consumed_energy(void); + XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs); XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv); XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void); @@ -709,6 +732,7 @@ XBT_PUBLIC(int) __attribute__((weak)) MAIN__(void); XBT_PUBLIC(int) smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]); XBT_PUBLIC(void) __attribute__((weak)) user_main_(void); XBT_PUBLIC(int) smpi_process_index(void); +XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv); /* Trace replay specific stuff */ XBT_PUBLIC(void) smpi_replay_init(int *argc, char***argv);