From 9cf73cc09740865d0de90546a12b2e2d74cfaf6f Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Wed, 4 Nov 2015 11:24:51 +0100 Subject: [PATCH] [SMPI] Renamed smpi/async_small_thres to smpi/async_small_thresh We need a unified naming scheme, and that was particularly easy to fix. --- ChangeLog | 6 ++++++ doc/doxygen/options.doc | 4 ++-- src/simgrid/sg_config.c | 4 ++-- src/smpi/smpi_base.c | 22 +++++++++++----------- src/smpi/smpi_global.c | 2 +- teshsuite/smpi/mpich3-test/runtests | 2 +- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5d4efcd00..136a2c58ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ SimGrid (3.13) UNRELEASED; urgency=low + SMPI + * BC breaks: + - The option smpi/async_small_thres was renamed to smpi/async_small_thresh + as we attempt to unify our naming schemes -> smpi/send_is_detached_thresh + + XBT * Kill the setset datacontainer: it's unused since a while. diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index 9f675d7855..3bc5f7b636 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -294,7 +294,7 @@ to wait 10 microseconds (1e-5 seconds) between emissions. It is possible to specify that messages below a certain size will be sent as soon as the call to MPI_Send is issued, without waiting for the correspondant receive. This threshold can be configured through the -\b smpi/async_small_thres item. The default value is 0. This behavior can also be +\b smpi/async_small_thresh item. The default value is 0. This behavior can also be manually set for MSG mailboxes, by setting the receiving mode of the mailbox with a call to \ref MSG_mailbox_set_async . For MSG, all messages sent to this mailbox will have this behavior, so consider using two mailboxes if needed. @@ -1108,7 +1108,7 @@ silently overflow on other parts of the memory. - \c surf/precision: \ref options_model_precision - \c For collective operations of SMPI, please refer to Section \ref options_index_smpi_coll -- \c smpi/async_small_thres: \ref options_model_network_asyncsend +- \c smpi/async_small_thresh: \ref options_model_network_asyncsend - \c smpi/bw_factor: \ref options_model_smpi_bw_factor - \c smpi/coll_selector: \ref options_model_smpi_collectives - \c smpi/cpu_threshold: \ref options_smpi_bench diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index 624b6d8b21..0182f32624 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -837,10 +837,10 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_double, 1, 1, NULL, NULL); xbt_cfg_setdefault_double(_sg_cfg_set, "smpi/cpu_threshold", 1e-6); - xbt_cfg_register(&_sg_cfg_set, "smpi/async_small_thres", + xbt_cfg_register(&_sg_cfg_set, "smpi/async_small_thresh", "Maximal size of messages that are to be sent asynchronously, without waiting for the receiver", xbt_cfgelm_int, 1, 1, NULL, NULL); - xbt_cfg_setdefault_int(_sg_cfg_set, "smpi/async_small_thres", 0); + xbt_cfg_setdefault_int(_sg_cfg_set, "smpi/async_small_thresh", 0); xbt_cfg_register(&_sg_cfg_set, "smpi/send_is_detached_thres", "Threshold of message size where MPI_Send stops behaving like MPI_Isend and becomes MPI_Ssend", diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index baaee4b392..bc93e0d8df 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -342,16 +342,16 @@ void smpi_mpi_start(MPI_Request request) if (request->flags & RECV) { print_request("New recv", request); - int async_small_thres = sg_cfg_get_int("smpi/async_small_thres"); + int async_small_thresh = sg_cfg_get_int("smpi/async_small_thresh"); xbt_mutex_t mut = smpi_process_mailboxes_mutex(); - if (async_small_thres != 0 ||request->flags & RMA) + if (async_small_thresh != 0 ||request->flags & RMA) xbt_mutex_acquire(mut); - if (async_small_thres == 0 && !(request->flags & RMA)) { + if (async_small_thresh == 0 && !(request->flags & RMA)) { mailbox = smpi_process_mailbox(); } - else if (request->flags & RMA || request->size < async_small_thres){ + else if (request->flags & RMA || request->size < async_small_thresh){ //We have to check both mailboxes (because SSEND messages are sent to the large mbox). begin with the more appropriate one : the small one. mailbox = smpi_process_mailbox_small(); XBT_DEBUG("Is there a corresponding send already posted in the small mailbox %p (in case of SSEND)?", mailbox); @@ -399,7 +399,7 @@ void smpi_mpi_start(MPI_Request request) request, -1.0); XBT_DEBUG("recv simcall posted"); - if (async_small_thres != 0 || request->flags & RMA) + if (async_small_thresh != 0 || request->flags & RMA) xbt_mutex_release(mut); } else { @@ -424,17 +424,17 @@ void smpi_mpi_start(MPI_Request request) XBT_DEBUG("sending size of %zu : sleep %f ", request->size, smpi_os(request->size)); } - int async_small_thres = sg_cfg_get_int("smpi/async_small_thres"); + int async_small_thresh = sg_cfg_get_int("smpi/async_small_thresh"); xbt_mutex_t mut=smpi_process_remote_mailboxes_mutex(receiver); - if (async_small_thres != 0 || request->flags & RMA) + if (async_small_thresh != 0 || request->flags & RMA) xbt_mutex_acquire(mut); - if (!(async_small_thres != 0 || request->flags & RMA)) { + if (!(async_small_thresh != 0 || request->flags & RMA)) { mailbox = smpi_process_remote_mailbox(receiver); } - else if (request->flags & RMA || request->size < async_small_thres) { // eager mode + else if (request->flags & RMA || request->size < async_small_thresh) { // eager mode mailbox = smpi_process_remote_mailbox(receiver); XBT_DEBUG("Is there a corresponding recv already posted in the large mailbox %p?", mailbox); smx_synchro_t action = simcall_comm_iprobe(mailbox, 1,request->dst, request->tag, &match_send, (void*)request); @@ -503,7 +503,7 @@ void smpi_mpi_start(MPI_Request request) if (request->action) simcall_set_category(request->action, TRACE_internal_smpi_get_category()); - if (async_small_thres != 0 || request->flags & RMA) + if (async_small_thresh != 0 || request->flags & RMA) xbt_mutex_release(mut); } @@ -881,7 +881,7 @@ void smpi_mpi_iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* print_request("New iprobe", request); // We have to test both mailboxes as we don't know if we will receive one one or another - if (sg_cfg_get_int("smpi/async_small_thres")>0){ + if (sg_cfg_get_int("smpi/async_small_thresh")>0){ mailbox = smpi_process_mailbox_small(); XBT_DEBUG("trying to probe the perm recv mailbox"); request->action = simcall_comm_iprobe(mailbox, 0, request->src, request->tag, &match_recv, (void*)request); diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 1aa59eee2e..7047bcc99c 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -396,7 +396,7 @@ void smpi_comm_null_copy_buffer_callback(smx_synchro_t comm, static void smpi_check_options(){ //check correctness of MPI parameters - xbt_assert(sg_cfg_get_int("smpi/async_small_thres") <= + xbt_assert(sg_cfg_get_int("smpi/async_small_thresh") <= sg_cfg_get_int("smpi/send_is_detached_thres")); if (sg_cfg_is_default_value("smpi/running_power")) { diff --git a/teshsuite/smpi/mpich3-test/runtests b/teshsuite/smpi/mpich3-test/runtests index b356be972d..721da48c1f 100755 --- a/teshsuite/smpi/mpich3-test/runtests +++ b/teshsuite/smpi/mpich3-test/runtests @@ -154,7 +154,7 @@ foreach $_ (@ARGV) { elsif (/--?maxnp=(.*)/) { $np_max = $1; } elsif (/--?tests=(.*)/) { $listfiles = $1; } elsif (/--?srcdir=(.*)/) { $srcdir = $1; - $mpiexec="$mpiexec -platform ${srcdir}/../../../../examples/platforms/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile_coll --log=root.thr:critical --cfg=smpi/running_power:1e9 --cfg=smpi/async_small_thres:65536"; } + $mpiexec="$mpiexec -platform ${srcdir}/../../../../examples/platforms/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile_coll --log=root.thr:critical --cfg=smpi/running_power:1e9 --cfg=smpi/async_small_thresh:65536"; } elsif (/--?verbose/) { $verbose = 1; } elsif (/--?showprogress/) { $showProgress = 1; } elsif (/--?debug/) { $debug = 1; } -- 2.20.1