-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Documentation for Parallel execution with Numba and OpenMP (#1481)
* removed openmp requirements from the installation docs * added section for parallel execution * added parallelisation section to toctree * added ref to parallelisation section in using formal integral section * empty commit * made suggested changes
- Loading branch information
Showing
4 changed files
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. _parallelisation: | ||
|
||
***************************************** | ||
Parallel execution with Numba and OpenMP | ||
***************************************** | ||
|
||
Enabling parallel execution with OpenMP | ||
======================================== | ||
|
||
Manually, cloning the repository enables other options such as running the code in parallel (enabling OpenMP). | ||
In general, we encourage downloading the compilers from `conda` as we then can ensure that they work with TARDIS. | ||
Within the TARDIS conda environment do:: | ||
|
||
conda install -c conda-forge compilers | ||
|
||
For macOS:: | ||
|
||
conda install -c conda-forge llvm-openmp | ||
|
||
For Linux:: | ||
|
||
conda install -c conda-forge openmp | ||
|
||
To compile TARDIS for parallel execution:: | ||
|
||
python setup.py install --with-openmp | ||
|
||
|
||
|
||
Numba Usage Guide | ||
=========== | ||
|
||
The ``montecarlo`` section of the Configuration file accepts the parameter ``nthreads`` which sets the number of | ||
threads to be used for parallelisation. Setting the value of the parameter between 1 and the environment variable | ||
``NUMBA_NUM_THREADS`` (which is, by default, the number of CPU cores on your system) will automatically invoke Numba | ||
to parallelise the code. (See :ref:`config-file` section). |