Skip to content

Commit 8665a8b

Browse files
committed
Update links in several pages
1 parent 3f0b702 commit 8665a8b

File tree

3 files changed

+95
-34
lines changed

3 files changed

+95
-34
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
sphinx-quickstart on Wed Feb 15 14:31:32 2023.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
5+
56
=========================================================
67
Welcome to the documentation for the 2DECOMP&FFT library!
78
=========================================================

docs/source/pages/contributing.rst

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
=============
1+
============
22
Contributing
3-
=============
3+
============
44

55
Overview of the contribution process
66
====================================
@@ -43,55 +43,78 @@ bug not currently referenced by an existing issue, or have an idea on
4343
how to improve a part of 2DECOMP&FFT, please open a new item on the issue
4444
tracker before opening a pull request.
4545

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`.
4753

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:
5155

52-
## Get started
56+
Get started
57+
___________
5358

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
60+
`discussion <https://github.com/2decomp-fft/2decomp-fft/discussions>`_
61+
or to pick an
62+
`existing issue <https://github.com/2decomp-fft/2decomp-fft/issues>`_.
63+
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.
5767

58-
## Bug
68+
.. _labelBug:
5969

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,
75+
you should go to the
76+
`discussions <https://github.com/2decomp-fft/2decomp-fft/discussions>`_
77+
section and open a new discussion.
6278
Otherwise, follow the steps below.
6379

64-
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.
6582
It makes bug-hunting much easier.
6683
Unfortunately, this is not always possible.
6784
Please note that for a debug build, the log contains all the environment variables.
6885
Use it to hunt the bug but think twice before sharing it as it can expose sensitive and personal information.
6986
At least, please try to reproduce the bug on another machine with another compiler.
7087

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.
7290
The development team can only provide support for sections of code available in the present repository.
7391

7492
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.
7694
The development team will not provide support if the program exposing the bug is very long.
7795
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.
7896

7997
At this stage, you probably did your best to simplify the problem at hand.
8098
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, ...
82101
If you think you have a fix for the bug, please expose it inside the issue.
83102
It is recommended to wait for feedback before opening a pull request.
84103

85-
## Advanced contribution
104+
.. _labelAdvanced:
105+
106+
Advanced contribution
107+
_____________________
86108

87109
One should read this section before opening a pull request.
88110
To fix a bug, please open an issue and use the bug report template first.
89111
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
113+
`discussion <https://github.com/2decomp-fft/2decomp-fft/discussions>`_ first.
91114
This helps raise awareness of the work and prevents repeated effort from occurring.
92115

93-
The code in a pull-request should be formatted using the `fprettify` program.
94-
See the code sample in the `scripts` folder.
116+
The code in a pull-request should be formatted using the ``fprettify`` program.
117+
See the code sample in the ``scripts`` folder.
95118

96119
Pull requests must be focused, small, coherent and have a detailed description.
97120
The longer the pull request, the harder the review.

docs/source/pages/installation.rst

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The value provided with the environment variable must be a positive integer belo
3939
Two ``BUILD_TARGETS`` are available namely ``mpi`` and ``gpu``.
4040
For the ``mpi`` target no additional options should be required,
4141
whereas for ``gpu`` extra options are necessary at the configure stage.
42-
Please see section [GPU Compilation](#gpu-compilation)
42+
Please see :ref:`labelGPU` section.
4343

4444
Once the build system has been configured, you can build 2DECOMP&FFT by running
4545

@@ -49,9 +49,10 @@ Once the build system has been configured, you can build 2DECOMP&FFT by running
4949

5050
appending ``-v`` will display additional information about the build, such as compiler flags.
5151

52-
After building the library can be tested. Please see section [Testing and examples](#testing-and-examples)
52+
After building the library can be tested using ``ctest``. Please see :ref:`labelTest` section
5353

54-
Options can be added to change the level of verbosity. Finally, the build library can be installed by running
54+
Options can be added to change the level of verbosity.
55+
Finally, the build library can be installed by running
5556

5657
::
5758

@@ -65,7 +66,8 @@ The default location for **libdecomp2d.a** is
6566

6667
unless the variable ``CMAKE_INSTALL_PREFIX`` is modified.
6768

68-
The module files generated by the build process will similarly be installed to ``$path_to_build_directory/opt/install``,
69+
The module files generated by the build process will similarly be installed to
70+
``$path_to_build_directory/opt/install``,
6971
users of the library should add this to the include paths for their program.
7072

7173
As indicated above, by default a static **libdecomp2d.a** will be compiled,
@@ -85,6 +87,34 @@ Occasionally a clean build is required, this can be performed by running
8587
8688
cmake --build $path_to_build_directory --target clean
8789

90+
.. _labelTest:
91+
92+
Testing and examples
93+
====================
94+
95+
By default building of the tests is deactivated.
96+
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+
88118
GPU compilation
89119
===============
90120

@@ -101,7 +131,7 @@ To properly configure for GPU build the following needs to be used
101131
Note, further configuration can be performed using ``ccmake``,
102132
however the initial configuration of GPU builds must include the ``-DBUILD_TARGET=gpu`` flag as shown above.
103133

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
105135

106136
- ``-DENABLE_NCCL=yes`` to activate the NCCL collectives
107137
- ``-DENABLE_MANAGED=yes`` to activate the automatic memory management form the NVHPC compiler
@@ -240,11 +270,14 @@ _____________________
240270
FFTW
241271
^^^^
242272

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
275+
`here [FFTW Download] <http://www.fftw.org/download.html>`_.
245276
Please note that one should build fftw and decomp2d against the same compilers.
246-
For build instructions, please check [here](http://www.fftw.org/fftw3_doc/Installation-on-Unix.html).
247-
Below is a suggestion for the compilation of the library in double precision (add ``--enable-single`` for a single precision build):
277+
For build instructions, please check
278+
`the instructions <http://www.fftw.org/fftw3_doc/Installation-on-Unix.html>`_.
279+
Below is a suggestion for the compilation of the library in double precision
280+
(add ``--enable-single`` for a single precision build):
248281

249282
::
250283

@@ -256,7 +289,8 @@ Below is a suggestion for the compilation of the library in double precision (ad
256289
make -j check
257290
make install
258291

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>`_.
260294
As a workaround, one can open the file `/path/to/fftw3/install/lib/cmake/fftw3/FFTW3Config.cmake` and comment the line
261295

262296
::
@@ -280,9 +314,12 @@ Note the legacy **fftw** interface lacks interface definitions and will fail whe
280314
Caliper
281315
^^^^^^^
282316

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,
321+
please check `the relative GitHub page <https://github.com/LLNL/Caliper#building-and-installing>`_
322+
and `here <https://software.llnl.gov/Caliper/CaliperBasics.html#build-and-install>`_.
286323
Below is a suggestion for the compilation of the library using the GNU compilers:
287324

288325
::

0 commit comments

Comments
 (0)