From: navarro Date: Mon, 16 Jan 2012 16:37:09 +0000 (+0100) Subject: Put xbt_cfg_register for smpi into surf_config.c file X-Git-Tag: exp_20120216~125^2~15 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8744043b8a87826b6850929f0ec1bd4404c2fcfa Put xbt_cfg_register for smpi into surf_config.c file --- diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 470be9c857..c43f3f2d30 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -246,24 +246,6 @@ int MAIN__(void) { srand(SMPI_RAND_SEED); - double default_reference_speed = 20000.0; - xbt_cfg_register(&_surf_cfg_set, "smpi/running_power", - "Power of the host running the simulation (in flop/s). Used to bench the operations.", - xbt_cfgelm_double, &default_reference_speed, 1, 1, NULL, - NULL); - - int default_display_timing = 0; - xbt_cfg_register(&_surf_cfg_set, "smpi/display_timing", - "Boolean indicating whether we should display the timing after simulation.", - xbt_cfgelm_int, &default_display_timing, 1, 1, NULL, - NULL); - - double default_threshold = 1e-6; - xbt_cfg_register(&_surf_cfg_set, "smpi/cpu_threshold", - "Minimal computation time (in seconds) not discarded.", - xbt_cfgelm_double, &default_threshold, 1, 1, NULL, - NULL); - if(getenv("SMPI_PRETEND_CC") != NULL) { /* Hack to ensure that smpicc can pretend to be a simple compiler. Particularly handy to pass it to the configuration tools */ return 0; diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index a136ff96c2..25f9a045a8 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -514,6 +514,28 @@ void surf_config_init(int *argc, char **argv) NULL, NULL); xbt_cfg_setdefault_string(_surf_cfg_set, "ns3/TcpModel", "default"); #endif + +//SMPI + double default_reference_speed = 20000.0; + xbt_cfg_register(&_surf_cfg_set, "smpi/running_power", + "Power of the host running the simulation (in flop/s). Used to bench the operations.", + xbt_cfgelm_double, &default_reference_speed, 1, 1, NULL, + NULL); + + int default_display_timing = 0; + xbt_cfg_register(&_surf_cfg_set, "smpi/display_timing", + "Boolean indicating whether we should display the timing after simulation.", + xbt_cfgelm_int, &default_display_timing, 1, 1, NULL, + NULL); + + double default_threshold = 1e-6; + xbt_cfg_register(&_surf_cfg_set, "smpi/cpu_threshold", + "Minimal computation time (in seconds) not discarded.", + xbt_cfgelm_double, &default_threshold, 1, 1, NULL, + NULL); +//END SMPI + + if (!surf_path) { /* retrieves the current directory of the current process */ const char *initial_path = __surf_get_initial_path();