Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change default stack size in simgrid to 8MiB.
authorAugustin Degomme <degomme@idpann.imag.fr>
Tue, 11 Mar 2014 14:30:35 +0000 (15:30 +0100)
committerAugustin Degomme <degomme@idpann.imag.fr>
Wed, 12 Mar 2014 09:40:36 +0000 (10:40 +0100)
This should not really allocate the 8 MiB in RAM, thus occupating the same amount of real memory than before
This behavior is at least true on Linux and BSD systems

doc/doxygen/options.doc
src/simgrid/sg_config.c
src/simix/smx_context.c

index b9ab5201086c6e8e11502a43923dc2a5694823f3..a30daea6610b5c23dbe12084be852f7ea4326b6e 100644 (file)
@@ -391,7 +391,7 @@ stacks), leading to segfaults with corrupted stack traces.
 
 If you want to push the scalability limits of your code, you really
 want to reduce the \b contexts/stack_size item. Its default value
-is 128 (in KiB), while our Chord simulation works with stacks as small
+is 8 (in MiB), while our Chord simulation works with stacks as small
 as 16 KiB, for example. For the thread factory, the default value 
 is the one of the system, if it is too large/small, it has to be set 
 with this parameter.
index 37bb10968fc2af41e33a540c9ce8d68e071a9def..f9617c14524c1efa254533a6ffbe4c0378ab0ffa 100644 (file)
@@ -654,7 +654,7 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register(&_sg_cfg_set, "contexts/stack_size",
                      "Stack size of contexts in Kib",
                      xbt_cfgelm_int, 1, 1, _sg_cfg_cb_context_stack_size, NULL);
-    xbt_cfg_setdefault_int(_sg_cfg_set, "contexts/stack_size", 128);
+    xbt_cfg_setdefault_int(_sg_cfg_set, "contexts/stack_size", 8*1024);
     /* No, it was not set yet (the above setdefault() changed this to 1). */
     smx_context_stack_size_was_set = 0;
 
index 214ea7197aef01f519222ee54decbee4ef9a783b..85a8eca90e585e658c5dd45188d1266354bb4973 100644 (file)
@@ -19,7 +19,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_context, simix,
 
 char* smx_context_factory_name = NULL; /* factory name specified by --cfg=contexts/factory:value */
 smx_ctx_factory_initializer_t smx_factory_initializer_to_use = NULL;
-int smx_context_stack_size = 128 * 1024;
+int smx_context_stack_size = 8 * 1024 * 1024;
 int smx_context_stack_size_was_set = 0;
 #ifdef HAVE_THREAD_LOCAL_STORAGE
 static __thread smx_context_t smx_current_context_parallel;