X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/68ebc3a9ce7c3d2c49a438732b5b3b73e4f79973..b65f8c081fd0167701551de334cb84473eebcab9:/src/smpi/smpi_pmpi.cpp diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index d09c579b55..5c5915263b 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -2861,6 +2861,100 @@ int PMPI_Win_unlock(int rank, MPI_Win win){ return retval; } +int PMPI_Win_lock_all(int assert, MPI_Win win){ + int retval = 0; + smpi_bench_end(); + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + } else { + int myrank = smpi_process()->index(); + TRACE_smpi_collective_in(myrank, -1, __FUNCTION__, nullptr); + retval = win->lock_all(assert); + TRACE_smpi_collective_out(myrank, -1, __FUNCTION__); + } + smpi_bench_begin(); + return retval; +} + +int PMPI_Win_unlock_all(MPI_Win win){ + int retval = 0; + smpi_bench_end(); + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + } else { + int myrank = smpi_process()->index(); + TRACE_smpi_collective_in(myrank, -1, __FUNCTION__, nullptr); + retval = win->unlock_all(); + TRACE_smpi_collective_out(myrank, -1, __FUNCTION__); + } + smpi_bench_begin(); + return retval; +} + +int PMPI_Win_flush(int rank, MPI_Win win){ + int retval = 0; + smpi_bench_end(); + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + } else if (rank == MPI_PROC_NULL){ + retval = MPI_SUCCESS; + } else { + int myrank = smpi_process()->index(); + TRACE_smpi_collective_in(myrank, -1, __FUNCTION__, nullptr); + retval = win->flush(rank); + TRACE_smpi_collective_out(myrank, -1, __FUNCTION__); + } + smpi_bench_begin(); + return retval; +} + +int PMPI_Win_flush_local(int rank, MPI_Win win){ + int retval = 0; + smpi_bench_end(); + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + } else if (rank == MPI_PROC_NULL){ + retval = MPI_SUCCESS; + } else { + int myrank = smpi_process()->index(); + TRACE_smpi_collective_in(myrank, -1, __FUNCTION__, nullptr); + retval = win->flush_local(rank); + TRACE_smpi_collective_out(myrank, -1, __FUNCTION__); + } + smpi_bench_begin(); + return retval; +} + +int PMPI_Win_flush_all(MPI_Win win){ + int retval = 0; + smpi_bench_end(); + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + } else { + int myrank = smpi_process()->index(); + TRACE_smpi_collective_in(myrank, -1, __FUNCTION__, nullptr); + retval = win->flush_all(); + TRACE_smpi_collective_out(myrank, -1, __FUNCTION__); + } + smpi_bench_begin(); + return retval; +} + +int PMPI_Win_flush_local_all(MPI_Win win){ + int retval = 0; + smpi_bench_end(); + if (win == MPI_WIN_NULL) { + retval = MPI_ERR_WIN; + } else { + int myrank = smpi_process()->index(); + TRACE_smpi_collective_in(myrank, -1, __FUNCTION__, nullptr); + retval = win->flush_local_all(); + TRACE_smpi_collective_out(myrank, -1, __FUNCTION__); + } + smpi_bench_begin(); + return retval; +} + int PMPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr){ void *ptr = xbt_malloc(size); if(ptr==nullptr)