Skip to content

Commit bc65d19

Browse files
authored
Merge pull request #3 from 2decomp-fft/doc--api-io
Doc api io
2 parents 32906ed + 06c38a2 commit bc65d19

File tree

7 files changed

+424
-134
lines changed

7 files changed

+424
-134
lines changed

docs/source/index.rst

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,59 @@
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-
6-
Welcome to the documentation for the 2decomp&fft library!
5+
=========================================================
6+
Welcome to the documentation for the 2DECOMP&FFT library!
77
=========================================================
88

9-
.. note::
10-
This website is still **under development**!
11-
12-
The 2DECOMP&FFT library is a software framework written in modern Fortran to build large-scale parallel applications. It is designed for applications using three-dimensional structured mesh and spatially implicit numerical algorithms. At the foundation it implements a general-purpose 2D pencil decomposition for data distribution. On top it provides a highly scalable and efficient interface to perform three-dimensional distributed Fast Fourier Transforms. The library was originaly designed for CPUs only in the 2010's. The new version has be designed to work on CPUs and (NVIDIA) GPUs. We will aim to expend the capabilities of the library in the future (and to fix bugs!).
9+
The 2DECOMP&FFT library is a software framework written in modern Fortran to build large-scale parallel applications.
10+
It is designed for applications using three-dimensional structured mesh and spatially implicit numerical algorithms.
11+
At the foundation it implements a general-purpose 2D pencil decomposition for data distribution.
12+
On top it provides a highly scalable and efficient interface to perform three-dimensional distributed Fast Fourier Transforms.
13+
The library was originaly designed for CPUs only in the 2010's.
14+
The new version has be designed to work on CPUs and (NVIDIA) GPUs. We will aim to expend the capabilities of the library in the future (and to fix bugs!).
1315

14-
**Features**
15-
=============
16+
Features
17+
========
1618

1719
Here is a list of 2DECOMP&FFT's main features:
1820

19-
-General-purpose 2D pencil decomposition module to support building large-scale parallel applications on supercomputers.
21+
* General-purpose 2D pencil decomposition module to support building large-scale parallel applications on supercomputers.
2022

21-
-Highly scalable and efficient distributed Fast Fourier Transform module, supporting three dimensional FFTs (both complex-to-complex and real-to-complex/complex-to-real).
23+
* Highly scalable and efficient distributed Fast Fourier Transform module,
24+
supporting three dimensional FFTs (both complex-to-complex and real-to-complex/complex-to-real).
2225

23-
-Halo-cell support allowing explicit message passing between neighbouring blocks.
26+
* Halo-cell support allowing explicit message passing between neighbouring blocks.
2427

25-
-Parallel I/O module to support the handling of large data sets.
28+
* Parallel I/O module to support the handling of large data sets.
2629

27-
-Interface with most popular external FFT libraries.
30+
* Interface with most popular external FFT libraries.
2831

2932
**2DECOMP&FFT is designed to be:**
3033

31-
**Scalable** - The library and applications built upon it are known to scale well on thousands of CPU cores.
34+
* **Scalable** - The library and applications built upon it are known
35+
to scale well on thousands of CPU cores.
3236

33-
**Flexible** - Software framework to support building higher-level libraries and many types of applications.
37+
* **Flexible** - Software framework to support building higher-level
38+
libraries and many types of applications.
3439

35-
**User-friendly** - Black-box implementation and very clean application programming interface hiding most communication details from applications.
40+
* **User-friendly** - Black-box implementation and very clean application programming
41+
interface hiding most communication details from applications.
3642

37-
**Portable** - Code tested on major hardware architectures, with different compilers.
43+
* **Portable** - Code tested on major hardware architectures, with different compilers.
3844

39-
**Publication**
40-
===============
45+
Publication
46+
===========
4147

4248
N. Li and S. Laizet, "2DECOMP&FFT – A highly scalable 2D decomposition library and FFT interface", Cray User Group 2010 conference, Edinburgh, 2010
4349

4450
**a new paper is in preparation to introduce the new capabilities of the library**
4551

4652
**Acknowledgements**
4753
====================
48-
The library was initially designed thanks to several projects funded under the HECToR Distributed Computational Science and Engineering (CSE) Service operated by NAG Ltd. The new library has been designed thanks to the support of EPSRC via the `CCP Turbulence <https://www.ukturbulence.co.uk/ccp-turbulence.html>`_ (EP/T026170/1).
54+
The library was initially designed thanks to several projects funded under the
55+
HECToR Distributed Computational Science and Engineering (CSE) Service operated by NAG Ltd.
56+
The new library has been designed thanks to the support of EPSRC via the
57+
`CCP Turbulence <https://www.ukturbulence.co.uk/ccp-turbulence.html>`_ (EP/T026170/1).
4958

5059
.. toctree::
5160
:maxdepth: 2

docs/source/pages/api_domain.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
2D Pencil Decomposition API
33
===========================
44

5-
This page explains the key public interfaces of the 2D decomposition library. After reading this section, users should be able to easily build applications using this domain decomposition strategy. The library interface is designed to be very simple. One can refer to the sample applications for a quick start.
5+
This page explains the key public interfaces of the 2D decomposition library. After reading this section, users should be able to easily build applications using this domain decomposition strategy.
6+
The library interface is designed to be very simple. One can refer to the sample applications for a quick start.
67

78
The 2D Pencil Decomposition API is defined in three Fortran module which should be used by applications as:
89

@@ -15,7 +16,8 @@ The 2D Pencil Decomposition API is defined in three Fortran module which should
1516
The ``use decomp_2d_constants`` defines all the parameters, ``use decomp_2d_mpi`` introduces all the MPI
1617
related interfaces and ``use decomp_2d`` cointains the main decomposition and transposition APIs.
1718

18-
**Module decomp_2d_constant: Global Variables**
19+
Module **decomp_2d_constant**: Global Variables
20+
_______________________________________________
1921

2022
The ``decomp_2d_constants`` cointains global parameters that used to define the KIND of floating
2123
point data (e.g. single or double precision).
@@ -46,7 +48,8 @@ The module contains additional parameters to control :
4648

4749
* define the release major and minor version
4850

49-
**Module decomp_2d_mpi: MPI communication**
51+
Module **decomp_2d_mpi**: MPI communication
52+
___________________________________________
5053

5154
The ``decomp_2d_mpi`` cointains global parameters that are used for MPI operation:
5255

@@ -60,9 +63,10 @@ The ``decomp_2d_mpi`` cointains global parameters that are used for MPI operatio
6063

6164
* ``decomp_2d_warning`` - interface to display error message together with line number and function.
6265

63-
**Module decomp_2d: decompostion module**
66+
Module **decomp_2d**: decompostion module
67+
_________________________________________
6468

65-
The ``decomp_2d`` cointains the variables and the routines to perform the global transpostion operations.
69+
The ``decomp_2d`` module cointains the variables and the routines to perform the global transpostion operations.
6670
The important variables are
6771

6872
* ``nx_global, ny_global, nz_global`` - size of the global data.
@@ -129,7 +133,8 @@ The allocation for a x pencil decomposition would be equivalent to the statement
129133

130134
Allocated arrays can be simply released with an ``deallocate(var)`` statement.
131135

132-
**Basic 2D Decomposition API**
136+
Basic 2D Decomposition API
137+
^^^^^^^^^^^^^^^^^^^^^^^^^^
133138

134139
All the global variables described above, the defualt common type ``decomp`` and the MPI initialization is done
135140
using the following call
@@ -193,7 +198,8 @@ Finally, before exit, applications should clean up the memory by:
193198

194199
call decomp_2d_finalize
195200

196-
**Advanced 2D Decomposition API**
201+
Advanced 2D Decomposition API
202+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197203

198204
While the basic decomposition API is very user-friendly, there may be situations in which
199205
applications need to handle more complex data structures. There are quite a few examples:
@@ -211,7 +217,7 @@ applications need to handle more complex data structures. There are quite a few
211217

212218
In all these examples, there are multiple global sizes and applications need to be able to distributed
213219
different data sets as 2D pencils.
214-
``2decomp&FFT`` provides a powerful and flexible programming interface to handle this:
220+
2DECOMP&FFT provides a powerful and flexible programming interface to handle this:
215221

216222
::
217223

docs/source/pages/api_fft.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ To use the FFT programming interface, first of all, one additional Fortran modul
88

99
use decomp_2d_fft
1010

11+
Initialisation of the FFT module
12+
________________________________
13+
1114
The FFT interface is built on top of the 2D decomposition library, which, naturally,
1215
needs to be initialised first:
1316

@@ -55,7 +58,8 @@ The result of the ``decomp_2d_fft_init`` operation is to create two new objects
5558

5659
* ``PHYSICAL_IN_Z`` - :math:`nx\times ny\times nz/2+1` (default) or :math:`n1\times n2\times n3/2+1` (customized)
5760

58-
**Complex-to-complex Transforms**
61+
Complex-to-complex Transforms
62+
_____________________________
5963

6064
The library supports three-dimensional FFTs whose data is distributed as 2D pencils and stored in ordinary ijk-ordered 3D arrays across processors.
6165
For complex-to-complex (c2c) FFTs, the user interface is:
@@ -70,7 +74,8 @@ The input array ``input`` and ``output`` array out are both complex and
7074
and have to be either a X-pencil/Z-pencil combination or vice versa, depending on the direction of FFT and
7175
how the FFT interface is initialised (``PHYSICAL_IN_X``, the default, or ``PHYSICAL_IN_Z`` the optional).
7276

73-
**Real-to-complex & Complex-to-Real Transforms**
77+
Real-to-complex & Complex-to-Real Transforms
78+
____________________________________________
7479

7580
The interface for the the real-to-complex and complex-to-real transform is
7681

@@ -102,10 +107,11 @@ Please note that the complex output arrays obtained from X-pencil and Z-pencil i
102107
However, if *Hermitian redundancy* is taken into account, no physical information is lost and the real input can be fully recovered
103108
through the corresponding inverse FFT from either complex array.
104109

105-
Please also note that ``2decomp&FFT`` does not scale the transforms. So a forward transform followed by a backward transform
110+
Please also note that 2DECOMP&FFT does not scale the transforms. So a forward transform followed by a backward transform
106111
will not recover the input unless applications normalise the result by the size of the transforms.
107112

108-
**Finalisation**
113+
Deallocation of the FFT module
114+
______________________________
109115

110116
Finally, to release the memory used by the FFT interface:
111117

0 commit comments

Comments
 (0)