Skip to content

Commit

Permalink
Merge pull request #2921 from boutproject/mpcdf-update
Browse files Browse the repository at this point in the history
MPCDF update
  • Loading branch information
bendudson authored Jun 26, 2024
2 parents 71d7858 + d67016a commit 20b47f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
14 changes: 7 additions & 7 deletions bin/bout-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ netcdf() {

nccxx() {
cd $BUILD
wget -c ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx4-$NCCXXVER.tar.gz || :
wget -c https://downloads.unidata.ucar.edu/netcdf-cxx/$NCCXXVER/netcdf-cxx4-$NCCXXVER.tar.gz || :
tar -xf netcdf-cxx4-$NCCXXVER.tar.gz
cd netcdf-cxx4-$NCCXXVER
CPPFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib/" ./configure --prefix=$PREFIX $NCCXXFLAGS
Expand Down Expand Up @@ -286,17 +286,17 @@ set -x
## Setup folders and links
setup
## Build and install hdf5
hdf5
test $NO_HDF5 || hdf5
## Build and install netcdf
netcdf
test $NO_NETCDF || netcdf
## Build and install C++ interface for netcdf
nccxx
test $NO_NCXX || nccxx
## Build and install FFTW
fftw
test $NO_FFTW || fftw
## Build and install Sundials
sundials
test $NO_SUNDIALS || sundials
## Build and install PETSc
petsc
test $NO_PETSC || petsc
## Download BOUT++ submodules
submod
# Install python packages
Expand Down
15 changes: 7 additions & 8 deletions manual/sphinx/user_docs/advanced_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,25 +145,24 @@ where ``<build-directory>`` is the path to the build directory

MPCDF HPC Systems
~~~~~~~~~~~~~~~~~
After cloning BOUT-dev and checking out the branch you want (e.g. db-outer), run:
.. code-block:: bash
module purge # or at least onload intel and impi and mkl
module load gcc/10 cmake/3.18 openmpi/4
# ensure python3 is >= python3.6 - skip if you have a newer python3 loaded
mkdir -p $HOME/bin ; test -e $HOME/bin/python3 || ln -s $(which python3.6) $HOME/bin/python3
BUILD=/ptmp/$USER/bout-deps bin/bout-build-deps.sh
module purge # or at least onload intel
module load gcc/13 anaconda/3/2021.11 impi/2021.9 hdf5-serial/1.12.2 mkl/2022.0 netcdf-serial/4.8.1 fftw-mpi/3.3.10
BUILD=/ptmp/$USER/bout-deps NO_HDF5=1 NO_NETCDF=1 NO_FFTW=1 bin/bout-build-deps.sh
and follow the instructions for configuring BOUT++. To enable openMP
for a production run use:

.. code-block:: bash
module load bout-dep
cmake .. -DBOUT_USE_NETCDF=ON -DnetCDF_ROOT=$BOUT_DEP -DnetCDFCxx_ROOT=$BOUT_DEP \
cmake .. -DBOUT_USE_NETCDF=ON -DnetCDFCxx_ROOT=$BOUT_DEP \
-DBOUT_USE_PETSC=ON -DPETSC_DIR=$BOUT_DEP \
-DBOUT_USE_FFTW=ON -DFFTW_ROOT=$BOUT_DEP \
-DBOUT_USE_FFTW=ON \
-DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=$BOUT_DEP \
-DBOUT_ENABLE_OPENMP=ON \
-DBOUT_ENABLE_OPENMP=OFF \
-DCMAKE_BUILD_TYPE=Release
Expand Down

0 comments on commit 20b47f4

Please sign in to comment.