Skip to content

Commit

Permalink
USE_NETCDF->USE_PNETCDF and added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hklion committed Nov 12, 2024
1 parent 2fcd4ff commit 17a3147
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 12 deletions.
28 changes: 24 additions & 4 deletions Docs/sphinx_doc/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ REMORA can be built using either GNU Make or CMake. The following instructions a
Minimum Requirements
~~~~~~~~~~~~~~~~~~~~

ERF requires a C++ compiler that supports the C++17 standard and a C compiler that supports the C99 standard.
REMORA requires a C++ compiler that supports the C++17 standard and a C compiler that supports the C99 standard.
Building with GPU support may be done with CUDA, HIP, or SYCL.
For CUDA, REMORA requires versions >= 11.0. For HIP and SYCL, only the latest compilers are supported.
Prerequisites for building with GNU Make include Python (>= 2.7, including 3) and standard tools available
Expand All @@ -18,7 +18,7 @@ in any Unix-like environments (e.g., Perl and sed). For building with CMake, the
**While REMORA is designed to work with SYCL, we do not make any guarantees that it will build and run on your Intel platform.**

Paradigm
~~~~~~~~~~
~~~~~~~~

REMORA uses the paradigm that different executables are built in different subdirectories within the ``Exec`` directory. When
using gmake (see below), the user/developer should build in the directory of the selected problem. When using
Expand All @@ -30,6 +30,24 @@ The problem directories within ``Exec`` include ``Upwelling`` a test case demons
#Rayleigh damping, and 3) tests for features under development in ``Exec/DevTests``, such as moving terrain. There is a
#README in each problem directory that describes the purpose/role of that problem.


NetCDF (Optional)
~~~~~~~~~~~~~~~~~

REMORA uses `PnetCDF <https://parallel-netcdf.github.io/>`_ for optional NetCDF support. To build REMORA with PnetCDF, first install PnetCDF as per the instructions. Make a note of the directory where the library is installed, which we will call ``PNETCDF_DIR``. When compiling, add the PnetCDF ``pkgconfig`` directory to the environment variable ``PKG_CONFIG_PATH``, e.g.:

.. code:: shell
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PNETCDF_DIR/lib/pkgconfig
At run-time, you may need to add PnetCDF to the link path, e.g.:

.. code:: shell
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PNETCDF_DIR/lib
See sections below for compiler-specific instructions for how to enable netCDF support.

GNU Make
~~~~~~~~

Expand Down Expand Up @@ -84,7 +102,7 @@ or if using tcsh,
+-----------------+----------------------------------+------------------+-------------+
| DEBUG | Whether to use DEBUG mode | TRUE / FALSE | FALSE |
+-----------------+----------------------------------+------------------+-------------+
| USE_NETCDF | Whether to compile with NETCDF | TRUE / FALSE | FALSE |
| USE_PNETCDF | Whether to compile with PnetCDF | TRUE / FALSE | FALSE |
+-----------------+----------------------------------+------------------+-------------+
| USE_PARTICLES | Whether to compile with particle | TRUE / FALSE | FALSE |
| | functionality enabled | | |
Expand Down Expand Up @@ -116,6 +134,7 @@ or if using tcsh,
like ``REMORA3d.gnu.MPI.ex``, indicating that this is a 3-d version of the code, made with
``COMP=gnu``, and ``USE_MPI=TRUE``.


Job info
~~~~~~~~

Expand Down Expand Up @@ -148,7 +167,7 @@ An example CMake configure command to build REMORA with MPI is listed below:
-DCMAKE_Fortran_COMPILER:STRING=mpifort \
.. && make

An example CMake configure command to build REMORA with MPI and particles is listed below:
An example CMake configure command to build REMORA with MPI, PnetCDF, and particles is listed below:

::

Expand All @@ -158,6 +177,7 @@ An example CMake configure command to build REMORA with MPI and particles is lis
-DCMAKE_C_COMPILER:STRING=mpicc \
-DCMAKE_Fortran_COMPILER:STRING=mpifort \
-DREMORA_ENABLE_PARTICLES:BOOL=ON \
-DREMORA_ENABLE_PNETCDF:BOOL=ON \
.. && make


Expand Down
2 changes: 1 addition & 1 deletion Exec/Advection/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DEBUG = FALSE
TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/Channel_Test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DEBUG = FALSE
TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/DoubleGyre/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DEBUG = FALSE
TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/DoublyPeriodic/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DEBUG = FALSE
TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/IdealMiniGrid/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ USE_ASSERTION = TRUE
# Debugging
DEBUG = FALSE

USE_NETCDF = TRUE
USE_PNETCDF = TRUE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/ParticlesOverSeaMount/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DEBUG = FALSE
TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE
USE_PARTICLES = TRUE

# GNU Make
Expand Down
2 changes: 1 addition & 1 deletion Exec/Seamount/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ USE_ASSERTION = TRUE
# Debugging
DEBUG = FALSE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE

# GNU Make
Bpack := ./Make.package
Expand Down
2 changes: 1 addition & 1 deletion Exec/Upwelling/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DEBUG = FALSE
TEST = TRUE
USE_ASSERTION = TRUE

USE_NETCDF = FALSE
USE_PNETCDF = FALSE

# GNU Make
Bpack := ./Make.package
Expand Down

0 comments on commit 17a3147

Please sign in to comment.