You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/pages/contributing.rst
+44-21Lines changed: 44 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
=============
1
+
============
2
2
Contributing
3
-
=============
3
+
============
4
4
5
5
Overview of the contribution process
6
6
====================================
@@ -43,55 +43,78 @@ bug not currently referenced by an existing issue, or have an idea on
43
43
how to improve a part of 2DECOMP&FFT, please open a new item on the issue
44
44
tracker before opening a pull request.
45
45
46
-
# Contributing
46
+
Contributing
47
+
============
48
+
49
+
1. You want to contribute but have no idea how ? Please refer to the section :ref:`labelGetStarted`.
50
+
2. You have identified a bug ? Please refer to the section :ref:`labelBug`.
51
+
3. You have improved a part of the code or have developed a new functionality ?
52
+
Please refer to the section :ref:`labelAdvanced`.
47
53
48
-
1. You want to contribute but have no idea how ? Please refer to the [Get started](#get-started) section.
49
-
2. You have identified a bug ? Please refer to the [Bug](#bug) section.
50
-
3. You have improved a part of the code or have developed a new functionality ? Please refer to the [advanced](#advanced-contribution) section.
54
+
.. _labelGetStarted:
51
55
52
-
## Get started
56
+
Get started
57
+
___________
53
58
54
-
The recommended strategy to contribute is to start with a [discussion](https://github.com/2decomp-fft/2decomp-fft/discussions) or to pick an existing issue.
55
-
To modify or experiment with the code, fork the 2decomp github repository and commit changes in a dedicated branch of your fork.
56
-
When the modification is ready for review, one can open a pull request as described in the [advanced](#advanced-contribution) section below.
59
+
The recommended strategy to contribute is to start with a
To modify or experiment with the code, fork the 2DECOMP&FFT github repository
64
+
and commit changes in a dedicated branch of your fork.
65
+
When the modification is ready for review, one can open a pull request as described in the section
66
+
:ref:`labelAdvanced` below.
57
67
58
-
## Bug
68
+
.. _labelBug:
59
69
60
-
It appears that you have identified a bug in the 2decomp library.
61
-
If you are not sure this is really a bug in the library, you should go to the [discussions](https://github.com/2decomp-fft/2decomp-fft/discussions) section and open a new discussion.
70
+
Bug
71
+
___
72
+
73
+
It appears that you have identified a bug in the 2DECOMP&FFT library.
74
+
If you are not sure this is really a bug in the library,
Firstly, try to reproduce the error with a debug build of the library, a small problem size and a small number of MPI ranks.
80
+
Firstly, try to reproduce the error with a debug build of the library,
81
+
a small problem size and a small number of MPI ranks.
65
82
It makes bug-hunting much easier.
66
83
Unfortunately, this is not always possible.
67
84
Please note that for a debug build, the log contains all the environment variables.
68
85
Use it to hunt the bug but think twice before sharing it as it can expose sensitive and personal information.
69
86
At least, please try to reproduce the bug on another machine with another compiler.
70
87
71
-
Secondly, if you have modified the source code of the 2decomp library, you must reproduce the bug without the modifications in 2decomp.
88
+
Secondly, if you have modified the source code of the 2DECOMP&FFT library,
89
+
you must reproduce the bug without the modifications in 2DECOMP&FFT.
72
90
The development team can only provide support for sections of code available in the present repository.
73
91
74
92
Thirdly, you must provide a minimal working example.
75
-
The program using 2decomp and exposing the bug should be relatively small.
93
+
The program using 2DECOMP&FFT and exposing the bug should be relatively small.
76
94
The development team will not provide support if the program exposing the bug is very long.
77
95
The programs available in the examples section are a good starting point for a minimal working example, ideally you could contribute the minimal working example to the existing examples.
78
96
79
97
At this stage, you probably did your best to simplify the problem at hand.
80
98
Open an issue and select the bug report template.
81
-
Provide a meaningful title, do your best to complete all the sections of the template and provide the version of the compiler, the version of the MPI / FFT library, ...
99
+
Provide a meaningful title, do your best to complete all the sections of the template
100
+
and provide the version of the compiler, the version of the MPI / FFT library, ...
82
101
If you think you have a fix for the bug, please expose it inside the issue.
83
102
It is recommended to wait for feedback before opening a pull request.
84
103
85
-
## Advanced contribution
104
+
.. _labelAdvanced:
105
+
106
+
Advanced contribution
107
+
_____________________
86
108
87
109
One should read this section before opening a pull request.
88
110
To fix a bug, please open an issue and use the bug report template first.
89
111
To improve a part of the code or develop a new functionality, please open an issue and use the feature request template first.
90
-
If you are not sure about your contribution, open a [discussion](https://github.com/2decomp-fft/2decomp-fft/discussions) first.
112
+
If you are not sure about your contribution, open a
To activate the testing the option ``-DBUILD_TESTING=ON`` can be added or
97
+
alternativey the option can be activated in the GUI interface ``ccmake``.
98
+
After building the library can be tested by running
99
+
100
+
::
101
+
102
+
ctest --test-dir $path_to_build_directory
103
+
104
+
which uses the ``ctest`` utility. By default tests are performed in serial,
105
+
but more than 1 rank can be used by setting ``MPIEXEC_MAX_NUMPROCS`` under ``ccmake`` utility.
106
+
It is also possible to specify the decomposition by setting
107
+
``prow`` and ``pcol`` parameters at the configure stage or using ``ccmake``.
108
+
During the configure stage users should ensure that the number of MPI tasks ``MPIEXEC_MAX_NUMPROCS``
109
+
is equal to the product of *pcol* times *prow*.
110
+
Mesh resolution can also be imposed using the parameters ``NX``, ``NY`` and ``NZ``.
111
+
112
+
For the GPU implementation please be aware that it is based on a single MPI rank per GPU.
113
+
Therefore, to test multiple GPUs, use the maximum number of available GPUs
114
+
on the system/node and not the maximum number of MPI tasks.
115
+
116
+
.. _labelGPU:
117
+
88
118
GPU compilation
89
119
===============
90
120
@@ -101,7 +131,7 @@ To properly configure for GPU build the following needs to be used
101
131
Note, further configuration can be performed using ``ccmake``,
102
132
however the initial configuration of GPU builds must include the ``-DBUILD_TARGET=gpu`` flag as shown above.
103
133
104
-
By default CUDA aware MPI will be used together with `cuFFT` for the FFT library. The configure will automatically look for the GPU architecture available on the system. If you are building on a HPC system please use a computing node for the installation. Useful variables to be added are
134
+
By default CUDA aware MPI will be used together with ``cudaFFT`` for the FFT library. The configure will automatically look for the GPU architecture available on the system. If you are building on a HPC system please use a computing node for the installation. Useful variables to be added are
105
135
106
136
- ``-DENABLE_NCCL=yes`` to activate the NCCL collectives
107
137
- ``-DENABLE_MANAGED=yes`` to activate the automatic memory management form the NVHPC compiler
@@ -240,11 +270,14 @@ _____________________
240
270
FFTW
241
271
^^^^
242
272
243
-
The library [fftw](http://www.fftw.org/index.html) can be used as a backend for the FFT engine.
244
-
The version 3.3.10 was tested, is supported and can be downloaded [here](http://www.fftw.org/download.html).
273
+
The library `FFTW <http://www.fftw.org/index.html>`_ can be used as a backend for the FFT engine.
274
+
The version 3.3.10 was tested, is supported and can be downloaded
Below is a suggestion for the compilation of the library in double precision
280
+
(add ``--enable-single`` for a single precision build):
248
281
249
282
::
250
283
@@ -256,7 +289,8 @@ Below is a suggestion for the compilation of the library in double precision (ad
256
289
make -j check
257
290
make install
258
291
259
-
Please note that the resulting build is not compatible with CMake (https://github.com/FFTW/fftw3/issues/130).
292
+
Please note that the resulting build is not compatible with CMake
293
+
`see here <https://github.com/FFTW/fftw3/issues/130>`_.
260
294
As a workaround, one can open the file `/path/to/fftw3/install/lib/cmake/fftw3/FFTW3Config.cmake` and comment the line
261
295
262
296
::
@@ -280,9 +314,12 @@ Note the legacy **fftw** interface lacks interface definitions and will fail whe
280
314
Caliper
281
315
^^^^^^^
282
316
283
-
The library [caliper](https://github.com/LLNL/Caliper) can be used to profile the execution of the code. The version 2.9.1 was tested and is supported,
284
-
version 2.8.0 has also been tested and is still expected to work. Please note that one must build caliper and decomp2d against the same C/C++/Fortran compilers and MPI libray. For build instructions,
285
-
please check [here](https://github.com/LLNL/Caliper#building-and-installing) and [here](https://software.llnl.gov/Caliper/CaliperBasics.html#build-and-install).
317
+
The library `caliper <https://github.com/LLNL/Caliper>`_ can be used to profile the execution of the code.
318
+
The version 2.9.1 was tested and is supported,
319
+
version 2.8.0 has also been tested and is still expected to work.
320
+
Please note that one must build caliper and decomp2d against the same C/C++/Fortran compilers and MPI libray. For build instructions,
0 commit comments