Explorar o código

advertise STARPU_LIMIT_MIN_SUBMITTED_TASKS and STARPU_LIMIT_MAX_SUBMITTED_TASKS as a way to limit the amount of consumed memory

Samuel Thibault %!s(int64=9) %!d(string=hai) anos
pai
achega
062bd8ad0e

+ 15 - 0
doc/doxygen/chapters/05check_list_performance.doxy

@@ -181,6 +181,21 @@ execution. For example, in the Cholesky factorization (dense linear algebra
 application), the GEMM task uses up to 3 buffers, so it is possible to set the
 maximum number of task buffers to 3 to run a Cholesky factorization on StarPU.
 
+It is also often useless to submit *all* the tasks at the same time. One can
+make the starpu_task_submit function block when a reasonable given number of
+tasks have been submitted, by setting the STARPU_LIMIT_MIN_SUBMITTED_TASKS and
+STARPU_LIMIT_MAX_SUBMITTED_TASKS environment variables, for instance:
+
+<c>
+export STARPU_LIMIT_MAX_SUBMITTED_TASKS=10000
+export STARPU_LIMIT_MIN_SUBMITTED_TASKS=9000
+</c>
+
+To make StarPU block submission when 10000 tasks are submitted, and unblock
+submission when only 9000 tasks are submitted. Of course this may reduce
+parallelism if the threshold is set too low. The precise balance depends on the
+application task graph.
+
 \section HowtoReuseMemory How to reuse memory
 
 When your application needs to allocate more data than the available amount of

+ 8 - 8
doc/doxygen/chapters/40environment_variables.doxy

@@ -686,25 +686,25 @@ This specifies then size to be used by StarPU to push data when the main
 memory is getting full. The default is unlimited.
 </dd>
 
-<dt>STARPU_LIMIT_MAX_NSUBMITTED_TASKS</dt>
+<dt>STARPU_LIMIT_MAX_SUBMITTED_TASKS</dt>
 <dd>
-\anchor STARPU_LIMIT_MAX_NSUBMITTED_TASKS
-\addindex __env__STARPU_LIMIT_MAX_NSUBMITTED_TASKS    
+\anchor STARPU_LIMIT_MAX_SUBMITTED_TASKS
+\addindex __env__STARPU_LIMIT_MAX_SUBMITTED_TASKS    
 This variable allows the user to control the task submission flow by specifying
 to StarPU a maximum number of submitted tasks allowed at a given time, i.e. when
 this limit is reached task submission becomes blocking until enough tasks have
-completed, specified by STARPU_LIMIT_MIN_NSUBMITTED_TASKS.
+completed, specified by STARPU_LIMIT_MIN_SUBMITTED_TASKS.
 Setting it enables allocation cache buffer reuse in main memory.
 </dd>
 
-<dt>STARPU_LIMIT_MIN_NSUBMITTED_TASKS</dt>
+<dt>STARPU_LIMIT_MIN_SUBMITTED_TASKS</dt>
 <dd>
-\anchor STARPU_LIMIT_MIN_NSUBMITTED_TASKS
-\addindex __env__STARPU_LIMIT_MIN_NSUBMITTED_TASKS    
+\anchor STARPU_LIMIT_MIN_SUBMITTED_TASKS
+\addindex __env__STARPU_LIMIT_MIN_SUBMITTED_TASKS    
 This variable allows the user to control the task submission flow by specifying
 to StarPU a submitted task threshold to wait before unblocking task submission. This
 variable has to be used in conjunction with \ref
-STARPU_LIMIT_MAX_NSUBMITTED_TASKS which puts the task submission thread to
+STARPU_LIMIT_MAX_SUBMITTED_TASKS which puts the task submission thread to
 sleep.  Setting it enables allocation cache buffer reuse in main memory.
 </dd>