From 17a3147713bb818758c84305c550e5cc31f17e1d Mon Sep 17 00:00:00 2001 From: Hannah Klion Date: Tue, 12 Nov 2024 13:05:00 -0800 Subject: [PATCH] USE_NETCDF->USE_PNETCDF and added documentation --- Docs/sphinx_doc/building.rst | 28 ++++++++++++++++++++++---- Exec/Advection/GNUmakefile | 2 +- Exec/Channel_Test/GNUmakefile | 2 +- Exec/DoubleGyre/GNUmakefile | 2 +- Exec/DoublyPeriodic/GNUmakefile | 2 +- Exec/IdealMiniGrid/GNUmakefile | 2 +- Exec/ParticlesOverSeaMount/GNUmakefile | 2 +- Exec/Seamount/GNUmakefile | 2 +- Exec/Upwelling/GNUmakefile | 2 +- 9 files changed, 32 insertions(+), 12 deletions(-) diff --git a/Docs/sphinx_doc/building.rst b/Docs/sphinx_doc/building.rst index 964091be..65db5753 100644 --- a/Docs/sphinx_doc/building.rst +++ b/Docs/sphinx_doc/building.rst @@ -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 @@ -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 @@ -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 `_ 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 ~~~~~~~~ @@ -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 | | | @@ -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 ~~~~~~~~ @@ -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: :: @@ -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 diff --git a/Exec/Advection/GNUmakefile b/Exec/Advection/GNUmakefile index 2344b7fd..0de6f324 100644 --- a/Exec/Advection/GNUmakefile +++ b/Exec/Advection/GNUmakefile @@ -26,7 +26,7 @@ DEBUG = FALSE TEST = TRUE USE_ASSERTION = TRUE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE # GNU Make Bpack := ./Make.package diff --git a/Exec/Channel_Test/GNUmakefile b/Exec/Channel_Test/GNUmakefile index b0ca2511..efe77048 100644 --- a/Exec/Channel_Test/GNUmakefile +++ b/Exec/Channel_Test/GNUmakefile @@ -23,7 +23,7 @@ DEBUG = FALSE TEST = TRUE USE_ASSERTION = TRUE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE # GNU Make Bpack := ./Make.package diff --git a/Exec/DoubleGyre/GNUmakefile b/Exec/DoubleGyre/GNUmakefile index f12e7007..bcf08990 100644 --- a/Exec/DoubleGyre/GNUmakefile +++ b/Exec/DoubleGyre/GNUmakefile @@ -23,7 +23,7 @@ DEBUG = FALSE TEST = TRUE USE_ASSERTION = TRUE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE # GNU Make Bpack := ./Make.package diff --git a/Exec/DoublyPeriodic/GNUmakefile b/Exec/DoublyPeriodic/GNUmakefile index 10603dc4..cdb60396 100644 --- a/Exec/DoublyPeriodic/GNUmakefile +++ b/Exec/DoublyPeriodic/GNUmakefile @@ -26,7 +26,7 @@ DEBUG = FALSE TEST = TRUE USE_ASSERTION = TRUE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE # GNU Make Bpack := ./Make.package diff --git a/Exec/IdealMiniGrid/GNUmakefile b/Exec/IdealMiniGrid/GNUmakefile index d210d2d7..d2a33eea 100644 --- a/Exec/IdealMiniGrid/GNUmakefile +++ b/Exec/IdealMiniGrid/GNUmakefile @@ -23,7 +23,7 @@ USE_ASSERTION = TRUE # Debugging DEBUG = FALSE -USE_NETCDF = TRUE +USE_PNETCDF = TRUE # GNU Make Bpack := ./Make.package diff --git a/Exec/ParticlesOverSeaMount/GNUmakefile b/Exec/ParticlesOverSeaMount/GNUmakefile index 39bb8193..afb9c9ca 100644 --- a/Exec/ParticlesOverSeaMount/GNUmakefile +++ b/Exec/ParticlesOverSeaMount/GNUmakefile @@ -23,7 +23,7 @@ DEBUG = FALSE TEST = TRUE USE_ASSERTION = TRUE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE USE_PARTICLES = TRUE # GNU Make diff --git a/Exec/Seamount/GNUmakefile b/Exec/Seamount/GNUmakefile index 8b5259d2..9aad836f 100644 --- a/Exec/Seamount/GNUmakefile +++ b/Exec/Seamount/GNUmakefile @@ -23,7 +23,7 @@ USE_ASSERTION = TRUE # Debugging DEBUG = FALSE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE # GNU Make Bpack := ./Make.package diff --git a/Exec/Upwelling/GNUmakefile b/Exec/Upwelling/GNUmakefile index 683792d4..1fbe5a6b 100644 --- a/Exec/Upwelling/GNUmakefile +++ b/Exec/Upwelling/GNUmakefile @@ -24,7 +24,7 @@ DEBUG = FALSE TEST = TRUE USE_ASSERTION = TRUE -USE_NETCDF = FALSE +USE_PNETCDF = FALSE # GNU Make Bpack := ./Make.package