瀏覽代碼

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

Samuel Thibault 9 年之前
父節點
當前提交
062bd8ad0e
共有 2 個文件被更改,包括 23 次插入8 次删除
  1. 15 0
      doc/doxygen/chapters/05check_list_performance.doxy
  2. 8 8
      doc/doxygen/chapters/40environment_variables.doxy

+ 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
 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.
 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
 \section HowtoReuseMemory How to reuse memory
 
 
 When your application needs to allocate more data than the available amount of
 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.
 memory is getting full. The default is unlimited.
 </dd>
 </dd>
 
 
-<dt>STARPU_LIMIT_MAX_NSUBMITTED_TASKS</dt>
+<dt>STARPU_LIMIT_MAX_SUBMITTED_TASKS</dt>
 <dd>
 <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
 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
 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
 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.
 Setting it enables allocation cache buffer reuse in main memory.
 </dd>
 </dd>
 
 
-<dt>STARPU_LIMIT_MIN_NSUBMITTED_TASKS</dt>
+<dt>STARPU_LIMIT_MIN_SUBMITTED_TASKS</dt>
 <dd>
 <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
 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
 to StarPU a submitted task threshold to wait before unblocking task submission. This
 variable has to be used in conjunction with \ref
 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.
 sleep.  Setting it enables allocation cache buffer reuse in main memory.
 </dd>
 </dd>