From: Augustin Degomme Date: Mon, 11 Feb 2013 14:50:16 +0000 (+0100) Subject: add option to set the threshold where smpi send stops behaving like isend. X-Git-Tag: v3_9_90~501 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/56ac3ccc6b9d7ff1843570eda320e4d547fed157 add option to set the threshold where smpi send stops behaving like isend. This was hardcoded to 65536, but experiments show that sometimes 327680 might be better --- diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index 3d853d4482..5a6faa9fa5 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -663,6 +663,12 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_int, &default_small_messages_threshold, 1, 1, NULL, NULL); + int default_send_is_detached_threshold = 65536; + 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", + xbt_cfgelm_int, &default_send_is_detached_threshold, 1, 1, NULL, + NULL); + //For smpi/bw_factor and smpi/lat_factor //Default value have to be "threshold0:value0;threshold1:value1;...;thresholdN:valueN" //test is if( size >= thresholdN ) return valueN; diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 38a9b54eea..19cce6ba09 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -313,7 +313,7 @@ void smpi_mpi_start(MPI_Request request) XBT_DEBUG("Send request %p is not in the permanent receive mailbox (buf: %p)",request,request->buf); mailbox = smpi_process_remote_mailbox(receiver); } - if (request->size < 64*1024 ) { //(FIXME: this limit should be configurable) + if (request->size < sg_cfg_get_int("smpi/send_is_detached_thres") ) { //(FIXME: this limit should be configurable) void *oldbuf = NULL; request->detached = 1; request->refcount++;