X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e7d1d5c0992980f857cb281b7f168b1ca9b54297..51b3df03e813ceb19bdcbc8564a2529dab183325:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 0f28c90ac7..12e2ae6d8a 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)); @@ -911,21 +919,16 @@ XBT_PUBLIC void smpi_execute_flops(double flops); XBT_PUBLIC void smpi_execute(double duration); XBT_PUBLIC void smpi_execute_benched(double duration); -XBT_PUBLIC double smpi_get_host_power_peak_at(int pstate_index); -XBT_PUBLIC double smpi_get_host_current_power_peak(); -XBT_PUBLIC int smpi_get_host_nb_pstates(); -XBT_PUBLIC void smpi_set_host_pstate(int pstate_index); -XBT_PUBLIC int smpi_get_host_pstate(); +// PLEASE NOTE: If you remove these functions, the entire smpi_dvfs.cpp file can be removed as well!! +XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_pstate_speed(sg_host_self(), pstate_index) instead") XBT_PUBLIC double smpi_get_host_power_peak_at(int pstate_index); +XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_speed(sg_host_self()) instead") XBT_PUBLIC double smpi_get_host_current_power_peak(); +XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_nb_pstates(sg_host_self()) instead") XBT_PUBLIC int smpi_get_host_nb_pstates(); +XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_set_pstate(sg_host_self(), pstate_index) instead") XBT_PUBLIC void smpi_set_host_pstate(int pstate_index); +XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_pstate(sg_host_self()) instead") XBT_PUBLIC int smpi_get_host_pstate(); + +XBT_ATTRIB_DEPRECATED_v324("Please use sg_host_get_consumed_energy(sg_host_self()) instead") XBT_PUBLIC double smpi_get_host_consumed_energy(); -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); @@ -977,7 +980,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 +1063,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