Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / doc / doxygen / options.doc
index ec9f520..200b091 100644 (file)
@@ -136,7 +136,7 @@ int main(int argc, char *argv[]) {
 
 - @c surf/precision: @ref options_model_precision
 
-- @c <b>For collective operations of SMPI, please refer to Section @ref options_index_smpi_coll</b>
+- <b>For collective operations of SMPI, please refer to Section @ref options_index_smpi_coll</b>
 - @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
@@ -164,7 +164,7 @@ int main(int argc, char *argv[]) {
 - @c smpi/test: @ref options_model_smpi_test
 - @c smpi/wtime: @ref options_model_smpi_wtime
 
-- @c <b>Tracing configuration options can be found in Section @ref tracing_tracing_options</b>.
+- <b>Tracing configuration options can be found in Section @ref tracing_tracing_options</b>.
 
 - @c storage/model: @ref options_storage_model
 - @c verbose-exit: @ref options_generic_exit
@@ -1248,28 +1248,33 @@ at least one huge page:
 Then, you can pass the option --cfg=smpi/shared-malloc-hugepage:/home/huge
 to smpirun to actually activate the huge page support in shared mallocs.
 
-@subsection options_model_smpi_wtime smpi/wtime: Inject constant times for calls to MPI_Wtime
+@subsection options_model_smpi_wtime smpi/wtime: Inject constant times for calls to MPI_Wtime, gettimeofday and clock_gettime
 
-@b Default value: 0
-
-By setting this option, you can control the amount of time a process sleeps
-when MPI_Wtime() is called; this is important, because SimGrid normally only
-advances the time while communication is happening and thus,
-MPI_Wtime will not add to the time, resulting in a deadlock if used as a
-break-condition.
+@b Default value: 1ms
 
-Here is an example:
+This option controls the amount of (simulated) time spent in calls to
+MPI_Wtime(), gettimeofday() and clock_gettime(). If you set this value
+to 0, the simulated clock is not advanced in these calls, which leads
+to issue if your application contains such a loop:
 
 @code{.unparsed}
     while(MPI_Wtime() < some_time_bound) {
-        ...
+        /* some tests, with no communication nor computation */
     }
 @endcode
 
-If the time is never advanced, this loop will clearly never end as MPI_Wtime()
-always returns the same value. Hence, pass a (small) value to the smpi/wtime
-option to force a call to MPI_Wtime to advance the time as well.
-
+When the option smpi/wtime is set to 0, the time advances only on
+communications and computations, so the previous code results in an
+infinite loop: the current [simulated] time will never reach @c
+some_time_bound.  This infinite loop is avoided when that option is
+set to a small amount, as it is by default since SimGrid v3.21.
+
+Note that if your application does not contain any loop depending on
+the current time only, then setting this option to a non-zero value
+will slow down your simulations by a tiny bit: the simulation loop has
+to be broken and reset each time your code ask for the current time.
+If the simulation speed really matters to you, you can avoid this
+extra delay by setting smpi/wtime to 0.
 
 @section options_generic Configuring other aspects of SimGrid