X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1a4e577540e52831d3a2aeff7d5ba27a3963d54b..5ed37babb2fa9097abe82df299c0aa259ed84d5a:/src/smpi/bindings/smpi_pmpi_win.cpp diff --git a/src/smpi/bindings/smpi_pmpi_win.cpp b/src/smpi/bindings/smpi_pmpi_win.cpp index b3bab893c3..a125ec9b0f 100644 --- a/src/smpi/bindings/smpi_pmpi_win.cpp +++ b/src/smpi/bindings/smpi_pmpi_win.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2023. 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. */ @@ -21,8 +21,8 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); CHECK_COUNT(6, target_count)\ CHECK_TYPE(7, target_datatype) -#define CHECK_TARGET_DISP(num)\ - if(win->dynamic()==0)\ +#define CHECK_TARGET_DISP(num) \ + if (not win->dynamic()) \ CHECK_NEGATIVE((num), MPI_ERR_RMA_RANGE, target_disp) /* PMPI User level calls */ @@ -30,16 +30,17 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); int PMPI_Win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win){ int retval = 0; CHECK_COMM(5) + CHECK_BUFFER(1, base, size, MPI_BYTE) CHECK_NEGATIVE(2, MPI_ERR_OTHER, size) CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit) - smpi_bench_end(); + CHECK_COLLECTIVE(comm, __func__) + const SmpiBenchGuard suspend_bench; if (base == nullptr && size != 0){ retval= MPI_ERR_OTHER; }else{ *win = new simgrid::smpi::Win( base, size, disp_unit, info, comm); retval = MPI_SUCCESS; } - smpi_bench_begin(); return retval; } @@ -48,10 +49,9 @@ int PMPI_Win_allocate( MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm com CHECK_NEGATIVE(2, MPI_ERR_OTHER, size) CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit) void* ptr = xbt_malloc(size); - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; *static_cast(base) = ptr; - *win = new simgrid::smpi::Win( ptr, size, disp_unit, info, comm,1); - smpi_bench_begin(); + *win = new simgrid::smpi::Win(ptr, size, disp_unit, info, comm, true); return MPI_SUCCESS; } @@ -64,20 +64,18 @@ int PMPI_Win_allocate_shared( MPI_Aint size, int disp_unit, MPI_Info info, MPI_C if(rank==0){ ptr = xbt_malloc(size*comm->size()); } - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; simgrid::smpi::colls::bcast(&ptr, sizeof(void*), MPI_BYTE, 0, comm); simgrid::smpi::colls::barrier(comm); *static_cast(base) = (char*)ptr+rank*size; - *win = new simgrid::smpi::Win( ptr, size, disp_unit, info, comm,rank==0); - smpi_bench_begin(); + *win = new simgrid::smpi::Win(ptr, size, disp_unit, info, comm, rank == 0); return MPI_SUCCESS; } int PMPI_Win_create_dynamic( MPI_Info info, MPI_Comm comm, MPI_Win *win){ CHECK_COMM(2) - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; *win = new simgrid::smpi::Win(info, comm); - smpi_bench_begin(); return MPI_SUCCESS; } @@ -86,9 +84,8 @@ int PMPI_Win_attach(MPI_Win win, void *base, MPI_Aint size){ CHECK_NEGATIVE(3, MPI_ERR_OTHER, size) if (base == nullptr && size != 0) return MPI_ERR_OTHER; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; int retval = win->attach(base, size); - smpi_bench_begin(); return retval; } @@ -96,18 +93,22 @@ int PMPI_Win_detach(MPI_Win win, const void* base) { CHECK_WIN(1, win) CHECK_NULL(2, MPI_ERR_OTHER, base) - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; int retval = win->detach(base); - smpi_bench_begin(); return retval; } int PMPI_Win_free( MPI_Win* win){ CHECK_NULL(1, MPI_ERR_WIN, win) CHECK_WIN(1, (*win)) - smpi_bench_end(); - delete *win; - smpi_bench_begin(); + CHECK_COLLECTIVE((*win)->comm(), __func__) + if (_smpi_cfg_pedantic && (*win)->opened() == 1){//only check in pedantic mode, as it's not clear this is illegal + XBT_WARN("Attempt to destroy a MPI_Win too early -missing MPI_Win_fence ?"); + return MPI_ERR_WIN; + } + const SmpiBenchGuard suspend_bench; + simgrid::smpi::Win::del(*win); + *win = MPI_WIN_NULL; return MPI_SUCCESS; } @@ -152,12 +153,11 @@ int PMPI_Win_get_group(MPI_Win win, MPI_Group * group){ int PMPI_Win_fence( int assert, MPI_Win win){ CHECK_WIN(2, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_fence")); int retval = win->fence(assert); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -168,21 +168,18 @@ int PMPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, CHECK_TARGET_DISP(5) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, - new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_datatype->is_replayable() - ? origin_count - : origin_count * origin_datatype->size(), + new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_count, simgrid::smpi::Datatype::encode(origin_datatype))); retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype); TRACE_smpi_comm_out(my_proc_id); - - smpi_bench_begin(); + return retval; } @@ -196,15 +193,14 @@ int PMPI_Rget( void *origin_addr, int origin_count, MPI_Datatype origin_datatype CHECK_NULL(9, MPI_ERR_ARG, request) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData( - "Rget", target_rank, - origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(), + "Rget", target_rank, origin_count, simgrid::smpi::Datatype::encode(origin_datatype))); retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, @@ -212,7 +208,6 @@ int PMPI_Rget( void *origin_addr, int origin_count, MPI_Datatype origin_datatype TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -223,16 +218,14 @@ int PMPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_data CHECK_TARGET_DISP(5) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); - int dst_traced = group->actor(target_rank); + aid_t dst_traced = group->actor(target_rank); TRACE_smpi_comm_in(my_proc_id, __func__, - new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_datatype->is_replayable() - ? origin_count - : origin_count * origin_datatype->size(), + new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_count, simgrid::smpi::Datatype::encode(origin_datatype))); TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, SMPI_RMA_TAG, origin_count * origin_datatype->size()); @@ -241,7 +234,6 @@ int PMPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_data TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -254,16 +246,15 @@ int PMPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_dat CHECK_TARGET_DISP(5) CHECK_NULL(9, MPI_ERR_ARG, request) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); - int dst_traced = group->actor(target_rank); + aid_t dst_traced = group->actor(target_rank); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData( - "Rput", target_rank, - origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(), + "Rput", target_rank, origin_count, simgrid::smpi::Datatype::encode(origin_datatype))); TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, SMPI_RMA_TAG, origin_count * origin_datatype->size()); @@ -272,7 +263,6 @@ int PMPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_dat TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -285,21 +275,19 @@ int PMPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype orig int retval = 0; - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData( - "Accumulate", target_rank, - origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(), + "Accumulate", target_rank, origin_count, simgrid::smpi::Datatype::encode(origin_datatype))); retval = win->accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -315,15 +303,14 @@ int PMPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype ori int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData( - "Raccumulate", target_rank, - origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(), + "Raccumulate", target_rank, origin_count, simgrid::smpi::Datatype::encode(origin_datatype))); retval = win->accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, @@ -331,18 +318,19 @@ int PMPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype ori TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } -int PMPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, -int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, -MPI_Datatype target_datatype, MPI_Op op, MPI_Win win){ - CHECK_COUNT(2, origin_count) - if(origin_count>0) - CHECK_TYPE(3, origin_datatype) - if (op != MPI_NO_OP) +int PMPI_Get_accumulate(const void* origin_addr, int origin_count, MPI_Datatype origin_datatype, void* result_addr, + int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) +{ + if (op != MPI_NO_OP){ CHECK_BUFFER(1, origin_addr, origin_count, origin_datatype) + CHECK_COUNT(2, origin_count) + if(origin_count>0) + CHECK_TYPE(3, origin_datatype) + } CHECK_COUNT(5, result_count) CHECK_TYPE(6, result_datatype) CHECK_BUFFER(4, result_addr, result_count, result_datatype) @@ -354,15 +342,14 @@ MPI_Datatype target_datatype, MPI_Op op, MPI_Win win){ CHECK_TARGET_DISP(8) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData( - "Get_accumulate", target_rank, - target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(), + "Get_accumulate", target_rank, target_count, simgrid::smpi::Datatype::encode(target_datatype))); retval = win->get_accumulate( origin_addr, origin_count, origin_datatype, result_addr, @@ -371,19 +358,21 @@ MPI_Datatype target_datatype, MPI_Op op, MPI_Win win){ TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } - -int PMPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, -int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, -MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request){ +int PMPI_Rget_accumulate(const void* origin_addr, int origin_count, MPI_Datatype origin_datatype, void* result_addr, + int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, + int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request) +{ if(target_rank==MPI_PROC_NULL) *request = MPI_REQUEST_NULL; - CHECK_COUNT(2, origin_count) - CHECK_TYPE(3, origin_datatype) - CHECK_BUFFER(1, origin_addr, origin_count, origin_datatype) + if (op != MPI_NO_OP){ + CHECK_BUFFER(1, origin_addr, origin_count, origin_datatype) + CHECK_COUNT(2, origin_count) + if(origin_count>0) + CHECK_TYPE(3, origin_datatype) + } CHECK_COUNT(5, result_count) CHECK_TYPE(6, result_datatype) CHECK_BUFFER(4, result_addr, result_count, result_datatype) @@ -395,15 +384,14 @@ MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request){ CHECK_TARGET_DISP(8) CHECK_NULL(10, MPI_ERR_ARG, request) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData( - "Rget_accumulate", target_rank, - target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(), + "Rget_accumulate", target_rank, target_count, simgrid::smpi::Datatype::encode(target_datatype))); retval = win->get_accumulate( origin_addr, origin_count, origin_datatype, result_addr, @@ -412,7 +400,6 @@ MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request){ TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -433,67 +420,61 @@ int PMPI_Compare_and_swap(const void* origin_addr, void* compare_addr, void* res int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); MPI_Group group; win->get_group(&group); TRACE_smpi_comm_in(my_proc_id, __func__, - new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank, - datatype->is_replayable() ? 1 : datatype->size(), + new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank, 1, simgrid::smpi::Datatype::encode(datatype))); retval = win->compare_and_swap(origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win){ CHECK_GROUP(1, group) CHECK_WIN(2, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_post")); int retval = win->post(group,assert); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win){ CHECK_GROUP(1, group) CHECK_WIN(2, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_start")); int retval = win->start(group,assert); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_complete(MPI_Win win){ CHECK_WIN(1, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_complete")); int retval = win->complete(); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_wait(MPI_Win win){ CHECK_WIN(1, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_wait")); int retval = win->wait(); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } @@ -501,97 +482,89 @@ int PMPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win){ CHECK_WIN(4, win) CHECK_PROC_RMA(2, rank, win) int retval = 0; - smpi_bench_end(); + const SmpiBenchGuard suspend_bench; if (lock_type != MPI_LOCK_EXCLUSIVE && lock_type != MPI_LOCK_SHARED) { retval = MPI_ERR_LOCKTYPE; } else { - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_lock")); retval = win->lock(lock_type,rank,assert); TRACE_smpi_comm_out(my_proc_id); } - smpi_bench_begin(); return retval; } int PMPI_Win_unlock(int rank, MPI_Win win){ CHECK_WIN(2, win) CHECK_PROC_RMA(1, rank, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_unlock")); int retval = win->unlock(rank); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_lock_all(int assert, MPI_Win win){ CHECK_WIN(2, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_lock_all")); int retval = win->lock_all(assert); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_unlock_all(MPI_Win win){ CHECK_WIN(1, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_unlock_all")); int retval = win->unlock_all(); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_flush(int rank, MPI_Win win){ CHECK_WIN(2, win) CHECK_PROC_RMA(1, rank, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush")); int retval = win->flush(rank); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_flush_local(int rank, MPI_Win win){ CHECK_WIN(2, win) CHECK_PROC_RMA(1, rank, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_local")); int retval = win->flush_local(rank); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_flush_all(MPI_Win win){ CHECK_WIN(1, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_all")); int retval = win->flush_all(); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; } int PMPI_Win_flush_local_all(MPI_Win win){ CHECK_WIN(1, win) - smpi_bench_end(); - int my_proc_id = simgrid::s4u::this_actor::get_pid(); + const SmpiBenchGuard suspend_bench; + aid_t my_proc_id = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("Win_flush_local_all")); int retval = win->flush_local_all(); TRACE_smpi_comm_out(my_proc_id); - smpi_bench_begin(); return retval; }