X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7a3a100990355eb757dc81106b5aac6daed0b8e1..2eb9b18898a625855f580a0b98a262568b084423:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index ba669e79dc..e9fa18d799 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -8,10 +8,6 @@ #include #include -#if _POSIX_TIMERS -#include -#endif - #include #include #include @@ -202,6 +198,8 @@ SG_BEGIN_DECL() #define MPI_WIN_BASE -1 #define MPI_WIN_SIZE -2 #define MPI_WIN_DISP_UNIT -3 +#define MPI_WIN_CREATE_FLAVOR -4 +#define MPI_WIN_MODEL -5 typedef ptrdiff_t MPI_Aint; typedef long long MPI_Offset; @@ -217,6 +215,7 @@ typedef struct { int MPI_TAG; int MPI_ERROR; int count; + int cancelled; } MPI_Status; typedef SMPI_Win* MPI_Win; @@ -312,6 +311,11 @@ XBT_PUBLIC_DATA const MPI_Datatype MPI_INTEGER16; #define MPI_DOUBLE_PRECISION MPI_DOUBLE #define MPI_2DOUBLE_PRECISION MPI_2DOUBLE +#define MPI_WIN_FLAVOR_CREATE 0 +#define MPI_WIN_FLAVOR_ALLOCATE 1 +#define MPI_WIN_FLAVOR_DYNAMIC 2 +#define MPI_WIN_FLAVOR_SHARED 3 + typedef void MPI_User_function(void *invec, void *inoutvec, int *len, MPI_Datatype * datatype); typedef SMPI_Op *MPI_Op; @@ -593,6 +597,8 @@ MPI_CALL(XBT_PUBLIC int, MPI_Win_create, (void* base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win* win)); MPI_CALL(XBT_PUBLIC int, MPI_Win_allocate, (MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void* base, MPI_Win* win)); +MPI_CALL(XBT_PUBLIC int, MPI_Win_allocate_shared, + (MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void* base, MPI_Win* win)); MPI_CALL(XBT_PUBLIC int, MPI_Win_create_dynamic, (MPI_Info info, MPI_Comm comm, MPI_Win* win)); MPI_CALL(XBT_PUBLIC int, MPI_Win_attach, (MPI_Win win, void* base, MPI_Aint size)); MPI_CALL(XBT_PUBLIC int, MPI_Win_detach, (MPI_Win win, void* base)); @@ -621,6 +627,8 @@ MPI_CALL(XBT_PUBLIC int, MPI_Win_flush, (int rank, MPI_Win win)); MPI_CALL(XBT_PUBLIC int, MPI_Win_flush_local, (int rank, MPI_Win win)); MPI_CALL(XBT_PUBLIC int, MPI_Win_flush_all, (MPI_Win win)); MPI_CALL(XBT_PUBLIC int, MPI_Win_flush_local_all, (MPI_Win win)); +MPI_CALL(XBT_PUBLIC int, MPI_Win_shared_query, (MPI_Win win, int rank, MPI_Aint* size, int* disp_unit, void* baseptr)); +MPI_CALL(XBT_PUBLIC int, MPI_Win_sync, (MPI_Win win)); MPI_CALL(XBT_PUBLIC MPI_Win, MPI_Win_f2c, (MPI_Fint win)); MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Win_c2f, (MPI_Win win)); @@ -919,13 +927,7 @@ XBT_PUBLIC int smpi_get_host_pstate(); XBT_PUBLIC double smpi_get_host_consumed_energy(); -XBT_PUBLIC int smpi_usleep(useconds_t usecs); -#if _POSIX_TIMERS > 0 -XBT_PUBLIC int smpi_nanosleep(const struct timespec* tp, struct timespec* t); -XBT_PUBLIC int smpi_clock_gettime(clockid_t clk_id, struct timespec* tp); -#endif -XBT_PUBLIC unsigned int smpi_sleep(unsigned int secs); -XBT_PUBLIC int smpi_gettimeofday(struct timeval* tv, void* tz); + XBT_PUBLIC unsigned long long smpi_rastro_resolution(); XBT_PUBLIC unsigned long long smpi_rastro_timestamp(); XBT_PUBLIC void smpi_sample_1(int global, const char* file, int line, int iters, double threshold); @@ -934,7 +936,7 @@ XBT_PUBLIC void smpi_sample_3(int global, const char* file, int line); /** * Need a public setter for SMPI copy_callback function, so users can define - * their own while still using default SIMIX_copy_callback for MSG copies. + * their own while still using default SIMIX_copy_callback for S4U copies. */ XBT_PUBLIC void smpi_comm_set_copy_data_callback(void (*callback)(smx_activity_t, void*, size_t)); @@ -977,7 +979,7 @@ XBT_PUBLIC void* smpi_shared_set_call(const char* func, const char* input, void* /* Fortran specific stuff */ XBT_PUBLIC int smpi_main(const char* program, int argc, char* argv[]); -XBT_ATTRIB_DEPRECATED_v322("Use Actor::self()->getPid(): v3.22 will turn this warning into an error.") XBT_PUBLIC +XBT_ATTRIB_DEPRECATED_v322("Use s4u::this_actor::getPid(): v3.22 will turn this warning into an error.") XBT_PUBLIC int smpi_process_index(); XBT_PUBLIC void smpi_process_init(int* argc, char*** argv); @@ -1060,10 +1062,11 @@ SG_END_DECL() XBT_PUBLIC int smpi_is_shared(void* ptr, std::vector>& private_blocks, size_t* offset); -std::vector> shift_and_frame_private_blocks(const std::vector> vec, +std::vector> shift_and_frame_private_blocks(const std::vector>& vec, size_t offset, size_t buff_size); -std::vector> merge_private_blocks(std::vector> src, - std::vector> dst); +std::vector> merge_private_blocks(const std::vector>& src, + const std::vector>& dst); + #endif #endif