Difference between revisions of "Delft3D Configuration"

From UFRC
Jump to navigation Jump to search
(Created page with "If you are interested in installing Delft3D locally to accommodate custom changes to the Delft3D base, please follow the following instructions. Currently, Delft3D can be su...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
If you are interested in installing Delft3D locally to accommodate custom changes to the Delft3D  
 
If you are interested in installing Delft3D locally to accommodate custom changes to the Delft3D  
base, please follow the following instructions.
+
base source, you may use the following procedure.  
  
Currently, Delft3D can be successfully installed only with Intel suite of compilers. GCC installation requires  
+
Currently, Delft3D can be successfully installed only with the Intel suite of compilers. GCC installation requires  
extensive changes to code to make it adhere to F90 standard (GCC compiler suite expects strict adherence to the
+
extensive changes to source code to make it adhere to F90 standard (GCC compiler suite expects strict adherence to the
standard.  
+
standard).  
  
The routine below is tested on HPG. However, please refer to https://oss.deltares.nl/web/delft3d/get-started for details.
+
The outline given below is tested on HPG. However, please refer to https://oss.deltares.nl/web/delft3d/get-started for details.
  
 
Clone the repository: svn checkout https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/142586 delft3d_repository
 
Clone the repository: svn checkout https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/142586 delft3d_repository
(The number 142586 is the commit. The current version of delft3D is 4.06.01 (svn checkout https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/142586 delft3d_repository) Note: svn is accessible on HPG by module load ubuntu  
+
(The number 142586 is the commit). The current version of delft3D is 4.06.01 (svn checkout https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/142586 delft3d_repository) Note: svn is accessible on HPG by module load ubuntu  
  
 
Set up the installation environment (as of 04/17/2004)
 
Set up the installation environment (as of 04/17/2004)
  
a) module load intel/2020.0.166 openmpi/4.1.5 netcdf-c/4.9.2 netcdf-f/4.6.1 metis/5.2.cmake/3.26.4  petsc/3.19.4
+
Load the following  Modules:
 +
  1) ufrc              4) metis/5.2.1      7) petsc/3.19.4   10) apptainer/1.3.1
 +
  2) intel/2020.0.166  5) netcdf-c/4.9.2   8) openssl/3.3.0  11) ubuntu/22.04
 +
  3) openmpi/4.1.5      6) netcdf-f/4.6.1   9) proj/9.4.0    12) cmake/3.26.4
  
b) Initialize the following variables.
+
Set the PKG_CONFIG_PATH to (there are no module files for a few of the dependencies and
export NETCDF_CFLAGS="-I/apps/intel/2020.0.166/openmpi/4.1.5/netcdf-c/4.9.2/include\
+
this is the safest way cmake find the dependencies)
                      -I/apps/intel/2020.0.166/openmpi/4.1.5/netcdf-f/4.6.1/include"
 
  
export NETCDF_LIBS="-L/apps/intel/2020.0.166/openmpi/4.1.5/netcdf-c/4.9.2/lib64 -lnetcdf \
+
export PKG_CONFIG_PATH="/apps/intel/2021.0.166/openmpi/4.1.5/netcdf-f/4.6.1/lib/pkgconfig:
                    -L/apps/intel/2020.0.166/openmpi/4.1.5/netcdf-f/4.6.1/lib - lnetcdff"
+
/apps/intel/2020.0.166/openmpi/4.1.5/netcdf-c/4.9.2/lib/pkgconfig:
 +
/apps/intel/2020.0.166/openmpi/4.1.5/petsc/3.19.4/lib/pkgconfig:
 +
/apps/intel/2020.0.166/proj/9.4.0/lib64/pkgconfig:
 +
/apps/intel/2020.0.166/sqlite3/3.45.3/lib/pkgconfig:
 +
/apps/gcc/12.2.0/gdal/3.9.0/lib64/pkgconfig:
 +
/apps/intel/2020.0.166/metis/5.2.1/lib/pkgconfig
  
export PETSc_CFLAGS="-I/apps/intel/2020.0.166/openmpi/4.1.5/petsc/3.19.4/include"
+
cd  delft3d-main
export PETSc_LIBS="-I/apps/intel/2020.0.166/openmpi/4.1.5/petsc/3.19.4/lib"
+
./build.sh  delft3d4
 +
(use ../build.sh -h for available options).
  
export METIS_PARTMESHDUAL="-L/apps/intel/2020.0.166/metis/5.2.1/lib/ -lmetis"
+
This suppose compile and install the software in delft3d4/install {bin,lib,share)
export METIS_CFLAGS="-I/apps/intel/2020.0.166/metis/5.2.1/include/"
+
But this does not quite work. When it fails,
  
c) cd src
+
copy the two python files
  ./autogen.sh
 
  cd third_party_open/kdtree2
 
  ./autogen.sh
 
  cd ../..
 
Configure for HPG
 
./configure prefix=/apps/intel/2020.0.166/openmpi/4.1.5/delft3d/4.6.1 \
 
  --with-mpi --with-netcdf --enable-shared \
 
  --with-petsc
 
  
The installation prefix shown above is for the HPG and you are required to use your custom installation prefix.
+
    1. query_add.py
make ds-install  
+
    2. query_replace.py
If successful, bin, lib, share directories will be installed in your installation prefix.  
+
 
 +
from /dist/apps/delft3d
 +
 
 +
Before running the scripts change the base_dir variable in each script to point to
 +
the current installation. After running the Python scripts
 +
 
 +
cd build_delft3d4
 +
make
 +
make install
 +
 
 +
All of these steps are scripted in Build_delft.sh and  delft_compile.sh (courtesy of Stefano Biondi "Biondi, Stefano"
 +
<stefano.biondi@ufl.edu>)
 +
 
 +
If successful, bin, lib, and share directories will be installed in your installation prefix.  
 
Setup the local module environment as described in https://help.rc.ufl.edu/doc/Modules
 
Setup the local module environment as described in https://help.rc.ufl.edu/doc/Modules

Latest revision as of 13:43, 21 June 2024

If you are interested in installing Delft3D locally to accommodate custom changes to the Delft3D base source, you may use the following procedure.

Currently, Delft3D can be successfully installed only with the Intel suite of compilers. GCC installation requires extensive changes to source code to make it adhere to F90 standard (GCC compiler suite expects strict adherence to the standard).

The outline given below is tested on HPG. However, please refer to https://oss.deltares.nl/web/delft3d/get-started for details.

Clone the repository: svn checkout https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/142586 delft3d_repository (The number 142586 is the commit). The current version of delft3D is 4.06.01 (svn checkout https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/142586 delft3d_repository) Note: svn is accessible on HPG by module load ubuntu

Set up the installation environment (as of 04/17/2004)

Load the following Modules:

 1) ufrc               4) metis/5.2.1      7) petsc/3.19.4   10) apptainer/1.3.1
 2) intel/2020.0.166   5) netcdf-c/4.9.2   8) openssl/3.3.0  11) ubuntu/22.04
 3) openmpi/4.1.5      6) netcdf-f/4.6.1   9) proj/9.4.0     12) cmake/3.26.4

Set the PKG_CONFIG_PATH to (there are no module files for a few of the dependencies and this is the safest way cmake find the dependencies)

export PKG_CONFIG_PATH="/apps/intel/2021.0.166/openmpi/4.1.5/netcdf-f/4.6.1/lib/pkgconfig:
/apps/intel/2020.0.166/openmpi/4.1.5/netcdf-c/4.9.2/lib/pkgconfig:
/apps/intel/2020.0.166/openmpi/4.1.5/petsc/3.19.4/lib/pkgconfig:
/apps/intel/2020.0.166/proj/9.4.0/lib64/pkgconfig:
/apps/intel/2020.0.166/sqlite3/3.45.3/lib/pkgconfig:
/apps/gcc/12.2.0/gdal/3.9.0/lib64/pkgconfig:
/apps/intel/2020.0.166/metis/5.2.1/lib/pkgconfig
cd  delft3d-main
./build.sh  delft3d4
(use ../build.sh -h for available options).

This suppose compile and install the software in delft3d4/install {bin,lib,share) But this does not quite work. When it fails,

copy the two python files

    1. query_add.py
    2. query_replace.py

from /dist/apps/delft3d

Before running the scripts change the base_dir variable in each script to point to the current installation. After running the Python scripts

cd build_delft3d4
make
make install

All of these steps are scripted in Build_delft.sh and delft_compile.sh (courtesy of Stefano Biondi "Biondi, Stefano" <stefano.biondi@ufl.edu>)

If successful, bin, lib, and share directories will be installed in your installation prefix. Setup the local module environment as described in https://help.rc.ufl.edu/doc/Modules