A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add some new pt2pt tests from mpich
[simgrid.git]
/
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 9c7e74d403ea370ce6e4c71bd072c744eed1ca41..a125ec9b0fe09a83e9d51d12c618089dd46fbaba 100644
(file)
--- a/
src/smpi/bindings/smpi_pmpi_win.cpp
+++ b/
src/smpi/bindings/smpi_pmpi_win.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-202
3
. 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. */
/* 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. */
@@
-33,6
+33,7
@@
int PMPI_Win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MP
CHECK_BUFFER(1, base, size, MPI_BYTE)
CHECK_NEGATIVE(2, MPI_ERR_OTHER, size)
CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit)
CHECK_BUFFER(1, base, size, MPI_BYTE)
CHECK_NEGATIVE(2, MPI_ERR_OTHER, size)
CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit)
+ CHECK_COLLECTIVE(comm, __func__)
const SmpiBenchGuard suspend_bench;
if (base == nullptr && size != 0){
retval= MPI_ERR_OTHER;
const SmpiBenchGuard suspend_bench;
if (base == nullptr && size != 0){
retval= MPI_ERR_OTHER;
@@
-100,12
+101,14
@@
int PMPI_Win_detach(MPI_Win win, const void* base)
int PMPI_Win_free( MPI_Win* win){
CHECK_NULL(1, MPI_ERR_WIN, win)
CHECK_WIN(1, (*win))
int PMPI_Win_free( MPI_Win* win){
CHECK_NULL(1, MPI_ERR_WIN, win)
CHECK_WIN(1, (*win))
+ 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;
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;
- return simgrid::smpi::Win::del(*win);
+ simgrid::smpi::Win::del(*win);
+ *win = MPI_WIN_NULL;
return MPI_SUCCESS;
}
return MPI_SUCCESS;
}