扫描手机二维码

欢迎您的访问
您是第 位访客

开通时间:..

最后更新时间:..

  • 高安康 ( 副研究员 )

    的个人主页 http://faculty.ustc.edu.cn/gaoankang/zh_CN/index.htm

  •   副研究员
教师博客 当前位置: 中文主页 >> 教师博客
Nektar++ on the USTC HPC cluster hanhai20
点击次数:

Access to the cluster


ssh username@211.86.151.102


Compilation instructions

Before you start compiling Nektar++, you need to load the following modules

module load cmake/3.19.0 intel/2019.update5  \
hpcx/2.9.0/intel-2019.update5 mkl/2019.update5 \
gcc/10.3.0 boost/1.71.0/intel-2019.update5




The following environment variable can be defined to help cmake find the correct boost version

export BOOST_HOME=/opt/boost/1.71.0/intel-2019.update5





Download the source code

git clone https://gitlab.nektar.info/nektar/nektar.git nektar++









Create the build directory

cd nektar++
mkdir build
cd build









run cmake

CC=mpicc CXX=mpicxx
cmake -DNEKTAR_USE_MPI=ON -DNEKTAR_USE_MKL=ON \
-DNEKTAR_USE_SYSTEM_BLAS_LAPACK=OFF \
-DNEKTAR_USE_FFTW=ON -DNEKTAR_USE_HDF5=ON \
-DTHIRDPARTY_BUILD_BOOST=OFF \
-DTHIRDPARTY_BUILD_HDF5=ON  \
-DNEKTAR_ENABLE_SIMD_AVX512=ON  \
-DCMAKE_CXX_FLAGS=-mavx512f\ -mfma  \
-DTHIRDPARTY_BUILD_FFTW=ON  \
-DTHIRDPARTY_BUILD_BLAS_LAPACK=OFF   ..


Then unload gcc

module unload gcc/10.3.0


Then run

make -j4 install








Submit jobs

Create an interactive job on the compute node in the test queue

salloc -p test -N 1 -n 1 --qos=testqos




Submit a job using sbatch, sbatch job.sub, with a job.sub file

#!/bin/sh

#SBATCH -J gear2D
#SBATCH -o job-%j.log
#SBATCH -e job-%j.err
#SBATCH -n 40
#SBATCH --time=0:05:0

echo Time is `date`
echo Directory is $PWD
echo This job runs on the following nodes:
echo $SLURM_JOB_NODELIST
echo This job has allocated $SLURM_JOB_CPUS_PER_NODE cpu cores.

module load cmake/3.19.0
module load intel/2019.update5
module load hpcx/2.9.0/intel-2019.update5
module load mkl/2019.update5
module load gcc/10.3.0
export NEK_DIR=/home/ses/agao20/code/nektar++/build2
export NEK_BUILD=$NEK_DIR/dist/bin
export LD_LIBRARY_PATH=/gpfs/opt/gcc/10.3.0/lib64:/lib64:$NEK_DIR/ThirdParty/dist/lib:$NEK_DIR/dist/lib64:$LD_LIBRARY_PATH

MPIRUN=mpirun #Intel mpi and Open MPI
$MPIRUN $NEK_BUILD/IncNavierStokesSolver gear.xml condition.xml  -i Hdf5 -v &> runlog


References

https://www.nektar.info/nektar-on-archer2/
https://www.nektar.info/nektar-ic-hpc/



版权所有 ©2020 中国科学技术大学
地址:安徽省合肥市金寨路 96 号,邮政编码:230026