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
reduce the use of simcall_process_sleep() -> this_actor::sleep_for()
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_request.cpp
diff --git
a/src/smpi/mpi/smpi_request.cpp
b/src/smpi/mpi/smpi_request.cpp
index
e9a2a49
..
0473991
100644
(file)
--- a/
src/smpi/mpi/smpi_request.cpp
+++ b/
src/smpi/mpi/smpi_request.cpp
@@
-398,6
+398,7
@@
void Request::start()
mut->unlock();
} else { /* the RECV flag was not set, so this is a send */
simgrid::smpi::ActorExt* process = smpi_process_remote(simgrid::s4u::Actor::by_pid(dst_));
mut->unlock();
} else { /* the RECV flag was not set, so this is a send */
simgrid::smpi::ActorExt* process = smpi_process_remote(simgrid::s4u::Actor::by_pid(dst_));
+ xbt_assert(process, "Actor pid=%d is gone??", dst_);
int rank = src_;
if (TRACE_smpi_view_internals()) {
TRACE_smpi_send(rank, rank, dst_, tag_, size_);
int rank = src_;
if (TRACE_smpi_view_internals()) {
TRACE_smpi_send(rank, rank, dst_, tag_, size_);
@@
-438,7
+439,7
@@
void Request::start()
}
if(sleeptime > 0.0){
}
if(sleeptime > 0.0){
- sim
call_process_sleep
(sleeptime);
+ sim
grid::s4u::this_actor::sleep_for
(sleeptime);
XBT_DEBUG("sending size of %zu : sleep %f ", size_, sleeptime);
}
XBT_DEBUG("sending size of %zu : sleep %f ", size_, sleeptime);
}
@@
-539,7
+540,7
@@
int Request::test(MPI_Request * request, MPI_Status * status, int* flag) {
}
if(smpi_test_sleep > 0)
}
if(smpi_test_sleep > 0)
- sim
call_process_sleep(nsleeps*
smpi_test_sleep);
+ sim
grid::s4u::this_actor::sleep_for(nsleeps *
smpi_test_sleep);
Status::empty(status);
*flag = 1;
Status::empty(status);
*flag = 1;
@@
-635,7
+636,7
@@
int Request::testany(int count, MPI_Request requests[], int *index, int* flag, M
//multiplier to the sleeptime, to increase speed of execution, each failed testany will increase it
static int nsleeps = 1;
if(smpi_test_sleep > 0)
//multiplier to the sleeptime, to increase speed of execution, each failed testany will increase it
static int nsleeps = 1;
if(smpi_test_sleep > 0)
- sim
call_process_sleep(nsleeps*
smpi_test_sleep);
+ sim
grid::s4u::this_actor::sleep_for(nsleeps *
smpi_test_sleep);
try{
i = simcall_comm_testany(comms.data(), comms.size()); // The i-th element in comms matches!
} catch (const Exception&) {
try{
i = simcall_comm_testany(comms.data(), comms.size()); // The i-th element in comms matches!
} catch (const Exception&) {
@@
-853,8
+854,8
@@
void Request::finish_wait(MPI_Request* request, MPI_Status * status)
//integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
double sleeptime =
simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->orecv(req->real_size());
//integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
double sleeptime =
simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->orecv(req->real_size());
- if
(sleeptime > 0.0)
{
- sim
call_process_sleep
(sleeptime);
+ if
(sleeptime > 0.0)
{
+ sim
grid::s4u::this_actor::sleep_for
(sleeptime);
XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
}
unref(&(req->detached_sender_));
XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
}
unref(&(req->detached_sender_));