From 8e7de05f366b6793eb401b96d797e861aa5a5279 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 9 Feb 2016 18:31:32 +0100 Subject: [PATCH] Parallelism.md --- Parallelism.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Parallelism.md b/Parallelism.md index 3bc70d4..298fee5 100644 --- a/Parallelism.md +++ b/Parallelism.md @@ -12,21 +12,18 @@ the running program. The typical scheme is the following: -1) The program (IRPF90) asks `qp_run` to create a new queue for a state of - the calculation -2) The program adds multiple tasks to do to the queue -3) The program starts a **collector** thread that waits for the results - computed by the workers -4) The program starts multiple **worker** threads that will fetch tasks to do - from the queue, compute the corresponding task, and send the result directly - to the collector. Then, the queue is informed that the task has been done -5) When the queue is empty and all workers have sent their results, the - last worker receives from `qp_run` a *control* integer, and sends it to - the collector thread -6) The collector thread checks that the control integer is correct : this can be - for instance the number of AOs to compute and the number of actually - computed AOs. -7) The parallel section is terminated +#) The program (IRPF90) asks `qp_run` to create a new queue for a state of the calculation + +#) The program adds multiple tasks to do to the queue + +#) The program starts a **collector** thread that waits for the results computed by the workers + +#) The program starts multiple **worker** threads that will fetch tasks to do from the queue, compute the corresponding task, and send the result directly to the collector. Then, the queue is informed that the task has been done + +#) When the queue is empty and all workers have sent their results, the last worker receives from `qp_run` a *control* integer, and sends it to the collector thread + +#) The collector thread checks that the control integer is correct : this can be for instance the number of AOs to compute and the number of actually computed AOs. +#) The parallel section is terminated The task scheduler