From a6aa83507b12e775ad11dfb2c328c8de2609562f Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 4 Jun 2024 16:18:19 +0200 Subject: [PATCH 1/3] Update MPCDF instructions --- bin/bout-build-deps.sh | 12 ++++++------ manual/sphinx/user_docs/advanced_install.rst | 15 +++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/bin/bout-build-deps.sh b/bin/bout-build-deps.sh index 19e3b2a0d3..25b50e0948 100755 --- a/bin/bout-build-deps.sh +++ b/bin/bout-build-deps.sh @@ -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 diff --git a/manual/sphinx/user_docs/advanced_install.rst b/manual/sphinx/user_docs/advanced_install.rst index 57ac5f8e3f..048a26a6e3 100644 --- a/manual/sphinx/user_docs/advanced_install.rst +++ b/manual/sphinx/user_docs/advanced_install.rst @@ -145,13 +145,12 @@ where ```` 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: @@ -159,11 +158,11 @@ 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 From 77103c2463af2031b24ee2555586a6c89ede4190 Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 5 Jun 2024 12:00:52 +0200 Subject: [PATCH 2/3] Fix netcdf-cxx4 url --- bin/bout-build-deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bout-build-deps.sh b/bin/bout-build-deps.sh index 25b50e0948..6acd3d82bf 100755 --- a/bin/bout-build-deps.sh +++ b/bin/bout-build-deps.sh @@ -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/4.3.1/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 From d67016ad5f43e0ea15f4fc002c87dcac74cc56b3 Mon Sep 17 00:00:00 2001 From: David Bold Date: Mon, 10 Jun 2024 10:12:31 +0200 Subject: [PATCH 3/3] Fix URL thanks @ZedThree for noticing --- bin/bout-build-deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bout-build-deps.sh b/bin/bout-build-deps.sh index 6acd3d82bf..d96d500dc9 100755 --- a/bin/bout-build-deps.sh +++ b/bin/bout-build-deps.sh @@ -98,7 +98,7 @@ netcdf() { nccxx() { cd $BUILD - wget -c https://downloads.unidata.ucar.edu/netcdf-cxx/4.3.1/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