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
fire on_start for one-sided communication instead of on_send/recv
[simgrid.git]
/
teshsuite
/
s4u
/
wait-any-for
/
wait-any-for.cpp
diff --git
a/teshsuite/s4u/wait-any-for/wait-any-for.cpp
b/teshsuite/s4u/wait-any-for/wait-any-for.cpp
index 3c4200c06c201d0d9eff8357865a3422bd0d67a6..c7b689be3e8646be97f7853ee20859bc780c6fc8 100644
(file)
--- a/
teshsuite/s4u/wait-any-for/wait-any-for.cpp
+++ b/
teshsuite/s4u/wait-any-for/wait-any-for.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2019-202
1
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2019-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. */
@@
-31,11
+31,11
@@
static void worker()
std::vector<simgrid::s4u::CommPtr> comms = {put1, put2, get1, get2};
while (not comms.empty()) {
std::vector<simgrid::s4u::CommPtr> comms = {put1, put2, get1, get2};
while (not comms.empty()) {
-
int index = simgrid::s4u::Comm::wait_any_for(&
comms, 0.5);
+
ssize_t index = simgrid::s4u::Comm::wait_any_for(
comms, 0.5);
if (index < 0)
XBT_INFO("wait_any_for: Timeout reached");
else {
if (index < 0)
XBT_INFO("wait_any_for: Timeout reached");
else {
- XBT_INFO("wait_any_for: A comm finished (index=%d, #comms=%zu)", index, comms.size());
+ XBT_INFO("wait_any_for: A comm finished (index=%
z
d, #comms=%zu)", index, comms.size());
comms.erase(comms.begin() + index);
}
}
comms.erase(comms.begin() + index);
}
}
@@
-49,7
+49,7
@@
int main(int argc, char* argv[])
{
simgrid::s4u::Engine e(&argc, argv);
e.load_platform(argv[1]);
{
simgrid::s4u::Engine e(&argc, argv);
e.load_platform(argv[1]);
- simgrid::s4u::Actor::create("worker",
simgrid::s4u::Host::
by_name("Tremblay"), worker);
+ simgrid::s4u::Actor::create("worker",
e.host_
by_name("Tremblay"), worker);
e.run();
return 0;
}
e.run();
return 0;
}