From 42a19da0afa7d15b2aa87dea813ea427a21a4db5 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 12 Mar 2014 11:24:05 +0100 Subject: [PATCH] Stack size is expressed in KiB. Keep the same unit in doc. --- doc/doxygen/options.doc | 2 +- src/simgrid/sg_config.c | 4 ++-- src/smpi/smpirun.in | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index a30daea661..b70680d11c 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -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 8 (in MiB), while our Chord simulation works with stacks as small +is 8192 (in KiB), 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. diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index f9617c1452..64ebadd68e 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -650,9 +650,9 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_string, 1, 1, _sg_cfg_cb_context_factory, NULL); xbt_cfg_setdefault_string(_sg_cfg_set, "contexts/factory", dflt_ctx_fact); - /* stack size of contexts in Ko */ + /* stack size of contexts in KiB */ xbt_cfg_register(&_sg_cfg_set, "contexts/stack_size", - "Stack size of contexts in Kib", + "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", 8*1024); /* No, it was not set yet (the above setdefault() changed this to 1). */ diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 7126a55906..9ba0724359 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -427,7 +427,7 @@ ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} status=$? if [ ${status} = 139 ]; then echo "ERROR: A segmentation fault was triggered. -A common cause in SimGrid may be the use of a too small stack size for the simulated processes (default 128KiB). +A common cause in SimGrid may be the use of a too small stack size for the simulated processes (default 8192 KiB). Please see contexts/stack_size parameter , or http://simgrid.org/simgrid/latest/doc/options.html#options_virt_stacksize "; fi if [ -z "${KEEP}" ] ; then -- 2.20.1