From dfdf891c085cbf69b6a2dba8c06488997c8d6002 Mon Sep 17 00:00:00 2001 From: Qiyu8 Date: Thu, 27 Apr 2023 22:31:12 +0800 Subject: [PATCH] Add mpich and fix kml/singularity script --- package/kml/1.7.0/bisheng/install.sh | 4 -- package/kml/1.7.0/gcc/install.sh | 5 -- package/mpich/4.1.1/install.sh | 12 +++++ package/singularity/meta.sh | 1 + src/installService.py | 16 ++++++- templates/wrf/4.3.3/wrf.4.3.config | 72 ++++++++++++++++++++++++++++ 6 files changed, 100 insertions(+), 10 deletions(-) create mode 100644 package/mpich/4.1.1/install.sh create mode 100644 templates/wrf/4.3.3/wrf.4.3.config diff --git a/package/kml/1.7.0/bisheng/install.sh b/package/kml/1.7.0/bisheng/install.sh index d55d308..109c21a 100755 --- a/package/kml/1.7.0/bisheng/install.sh +++ b/package/kml/1.7.0/bisheng/install.sh @@ -9,10 +9,6 @@ kml_version=1.7.0 cd ${JARVIS_TMP} rm -rf boostkit-kml-${kml_version}-1.aarch64.rpm unzip -o ${JARVIS_DOWNLOAD}/BoostKit-kml_${kml_version}_bisheng.zip -#rpm -e boostkit-kml-${kml_version}-1.aarch64 -if [ -d /usr/local/kml ];then - rpm -e boostkit-kml -fi rpm --force --nodeps -ivh --relocate /usr/local/kml=$1 --badreloc=$1 boostkit-kml-${kml_version}-1.aarch64.rpm diff --git a/package/kml/1.7.0/gcc/install.sh b/package/kml/1.7.0/gcc/install.sh index 1e9ea12..af76238 100755 --- a/package/kml/1.7.0/gcc/install.sh +++ b/package/kml/1.7.0/gcc/install.sh @@ -9,13 +9,8 @@ kml_version=1.7.0 cd ${JARVIS_TMP} rm -rf boostkit-kml-${kml_version}-1.aarch64.rpm unzip -o ${JARVIS_DOWNLOAD}/BoostKit-kml_${kml_version}.zip -#rpm -e boostkit-kml-${kml_version}-1.aarch64 -if [ -d /usr/local/kml ];then - rpm -e boostkit-kml -fi rpm --force --nodeps -ivh --relocate /usr/local/kml=$1 --badreloc=$1 boostkit-kml-${kml_version}-1.aarch64.rpm - # generate full lapack netlib=${JARVIS_DOWNLOAD}/lapack-3.10.1.tar.gz netlib2=${JARVIS_DOWNLOAD}/scalapack-2.2.0.tar.gz diff --git a/package/mpich/4.1.1/install.sh b/package/mpich/4.1.1/install.sh new file mode 100644 index 0000000..9994386 --- /dev/null +++ b/package/mpich/4.1.1/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -x +set -e +export mpich_ver='4.1.1' +. ${DOWNLOAD_TOOL} -u https://www.mpich.org/static/downloads/${mpich_ver}/mpich-${mpich_ver}.tar.gz +cd ${JARVIS_TMP} +rm -rf mpich-${mpich_ver} +tar -xvf ${JARVIS_DOWNLOAD}/mpich-${mpich_ver}.tar.gz +cd mpich-${mpich_ver} +./configure --prefix=$1 +make -j +make install \ No newline at end of file diff --git a/package/singularity/meta.sh b/package/singularity/meta.sh index d4c3571..abdc263 100644 --- a/package/singularity/meta.sh +++ b/package/singularity/meta.sh @@ -7,6 +7,7 @@ cd ${JARVIS_TMP} file_noext="singularity-ce-$singularity_ver" file_name="${file_noext}.tar.gz" . ${DOWNLOAD_TOOL} -u https://github.com/sylabs/singularity/releases/download/v${singularity_ver}/${file_name} +cd ${JARVIS_TMP} rm -rf ${file_noext} tar -xzvf ${JARVIS_DOWNLOAD}/${file_name} cd ${file_noext} diff --git a/src/installService.py b/src/installService.py index f55556f..3e2dc5e 100644 --- a/src/installService.py +++ b/src/installService.py @@ -109,7 +109,7 @@ class InstallService: name = 'hmpi' version = self.get_hmpi_version() return self.gen_mpi_dict(name, version) - + def get_openmpi_info(self): mpi_info_list = self.get_cmd_output('mpirun -version') mpi_info = mpi_info_list[0].strip() @@ -119,7 +119,21 @@ class InstallService: return None return self.gen_mpi_dict(name, version) + def get_mpich_info(self): + mpi_info_list = self.get_cmd_output('mpirun -version') + mpi_info = "".join(mpi_info_list).strip() + name = 'mpich' + if name not in mpi_info: + return None + version = self.get_version_info(mpi_info) + if not version: + return None + return self.gen_mpi_dict(name, version) + def get_mpi_info(self): + mpich_info = self.get_mpich_info() + if mpich_info: + return mpich_info hmpi_info = self.get_hmpi_info() if hmpi_info: return hmpi_info diff --git a/templates/wrf/4.3.3/wrf.4.3.config b/templates/wrf/4.3.3/wrf.4.3.config new file mode 100644 index 0000000..ebb759b --- /dev/null +++ b/templates/wrf/4.3.3/wrf.4.3.config @@ -0,0 +1,72 @@ +[SERVER] +11.11.11.11 + +[DOWNLOAD] +wrf/4.3.3 https://github.com/wrf-model/WRF/archive/refs/tags/v4.3.3.tar.gz wrf-4.3.3.tar.gz + +[DEPENDENCY] +set -e +set -x +module purge +module use ./software/modulefiles +./jarvis -install kml/1.6.0/gcc any +./jarvis -install bisheng/2.5.0 com +module load bisheng/2.5.0 +export CC=clang CXX=clang++ FC=flang +./jarvis -install jasper/1.900.2 clang +module load jasper/1.900.2 +./jarvis -install hmpi/1.2.0 clang +module load hmpi/1.2.0 +export CC=mpicc CXX=mpicxx FC=mpifort +./jarvis -install hdf5/1.12.0/clang clang+mpi +module load hdf5-clang/1.12.0 +./jarvis -install netcdf/4.7.4/clang clang+mpi +module load netcdf-clang/4.7.4 +./jarvis -install pnetcdf/1.12.1 clang+mpi +module load pnetcdf/1.12.1 +#tar -zxvf $JARVIS_DOWNLOAD/wrf-4.3.3.tar.gz + +[ENV] +#!/bin/bash +module purge +module use ./software/modulefiles +module load bisheng/2.5.0 +module load jasper/1.900.2 +module load hmpi/1.2.0 +module load hdf5-clang/1.12.0 netcdf-clang/4.7.4 pnetcdf/1.12.1 +module load kml-gcc/1.6.0 +export WRFIO_NCD_LARGE_FILE_SUPPORT=1 +export NETCDF=$NETCDF_CLANG_PATH +export HDF5=$HDF5_CLANG_PATH +export PHDF5=$HDF5 +export PNETCDF=$PNETCDF_PATH +export JASPER=$JASPER_PATH +export JASPERLIB=$JASPER_PATH/lib +export JASPREINC=$$JASPER_PATH/include +export CPPFLAGS="-I$HDF5/include -I$PNETCDF/include -I$NETCDF/include" +export LDFLAGS="-L$HDF5/lib -L$PNETCDF/lib -L$NETCDF/lib -lnetcdf -lnetcdff -lpnetcdf -lhdf5_hl -lhdf5 -lz" +export CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif90 F90=mpif90 +export WRF_DIR=$JARVIS_ROOT/WRF-4.3.3 +export MPI_LIB="-L$MPI_LIB -lmpi -lomp" +export INCLUDE=$WRF_DIR/include:$INCLUDE +export WRFIO_NCD_LARGE_FILE_SUPPORT=1 +#移动run/目录下的初始场数据 + +[APP] +app_name = WRF +build_dir = ${WRF_DIR} +binary_dir = +case_dir = ${JARVIS_ROOT}/workloads/test_wrf + +[BUILD] +echo 4 | ./configure +./compile -j 16 em_real 2>&1 | tee compile.log + +[CLEAN] +./clean + +[RUN] +run = dsub -s run.sh +binary = +nodes = 1 + -- Gitee