From be0260670ba51b0c8ded02e57265745a29f3e8c2 Mon Sep 17 00:00:00 2001 From: chenshaoheng Date: Wed, 6 Sep 2023 07:30:25 +0000 Subject: [PATCH 1/6] update package/hdf-eos5/1.16/install.sh. Signed-off-by: chenshaoheng --- package/hdf-eos5/1.16/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/hdf-eos5/1.16/install.sh b/package/hdf-eos5/1.16/install.sh index b627928..97cc249 100755 --- a/package/hdf-eos5/1.16/install.sh +++ b/package/hdf-eos5/1.16/install.sh @@ -8,7 +8,7 @@ cd ${JARVIS_TMP} tar -xvf ${JARVIS_DOWNLOAD}/HDF-EOS5.1.16.tar cd hdfeos5 -./configure CC=${HDF5_PATH}/bin/h5pcc --with-hdf4=${HDF5_PATH} --with-zlib=/usr/local --prefix=$1 +./configure CC=${HDF5_PATH}/bin/h5pcc --with-hdf4=${HDF5_PATH} --with-zlib=/usr/local --prefix=$1 --build=aarch64-unknown-linux-gnu make -j make install cp -r include $1/ \ No newline at end of file -- Gitee From 2dc7fcc047cbdda6237a32e51b5e38234820ee2d Mon Sep 17 00:00:00 2001 From: iotwins <834352945@qq.com> Date: Wed, 13 Sep 2023 16:49:05 +0800 Subject: [PATCH 2/6] fix install script --- init.sh | 2 +- package/g2clib/1.6.0/install.sh | 3 +- package/nco/5.1.4/install.sh | 15 +++ package/pnetcdf/1.12.1/install.sh | 1 + src/loopService.py | 2 +- templates/bcc-esm/bccesm.arm.cpu.config | 79 +++++++-------- templates/bcc-esm/build.csh | 6 +- templates/ncl/6.5.0/data.NCL.arm.cpu.config | 103 ++++++++++++++++++++ 8 files changed, 164 insertions(+), 47 deletions(-) create mode 100644 package/nco/5.1.4/install.sh create mode 100644 templates/ncl/6.5.0/data.NCL.arm.cpu.config diff --git a/init.sh b/init.sh index 4393bf8..89d24b2 100644 --- a/init.sh +++ b/init.sh @@ -14,7 +14,7 @@ export JARVIS_UTILS=${CUR_PATH}/software/utils export JARVIS_DOWNLOAD=${CUR_PATH}/downloads export JARVIS_MODULES=${CUR_PATH}/software/modulefiles export JARVIS_MODULEDEPS=${CUR_PATH}/software/moduledeps -export JARVIS_TMP=${CUR_PATH}/tmp +export JARVIS_TMP=/tmp export DOWNLOAD_TOOL=${CUR_PATH}/package/common/download.sh export CHECK_DEPS=${CUR_PATH}/package/common/check_deps.sh export CHECK_ROOT=${CUR_PATH}/package/common/check_root.sh diff --git a/package/g2clib/1.6.0/install.sh b/package/g2clib/1.6.0/install.sh index a29d992..52707bb 100755 --- a/package/g2clib/1.6.0/install.sh +++ b/package/g2clib/1.6.0/install.sh @@ -9,8 +9,9 @@ tar -xvf ${JARVIS_DOWNLOAD}/g2clib-image/g2clib-1.6.0-patch.tar.gz cd g2clib-1.6.0-patch sed -i '22c INC=-I/glade/p/work/haley/dev/external/gnu/4.7.2/include -I${JASPER_PATH}/include' makefile +sed -i '33c CC=clang' makefile make all mkdir $1/lib mkdir $1/include mv libgrib2c.a $1/lib/ -cp grib2.h $1/include/ \ No newline at end of file +cp grib2.h $1/include/ diff --git a/package/nco/5.1.4/install.sh b/package/nco/5.1.4/install.sh new file mode 100644 index 0000000..72f2f0b --- /dev/null +++ b/package/nco/5.1.4/install.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -x +set -e +. ${DOWNLOAD_TOOL} -u https://sourceforge.net/projects/nco/files/nco-5.1.4.tar.gz +cd ${JARVIS_TMP} +rm -rf nco-5.1.4 +tar zxvf ${JARVIS_DOWNLOAD}/nco-5.1.4.tar.gz +cd nco-5.1.4 +echo ${UDUNITS_PATH} +export NETCDF_INC=${NETCDF_PATH}/include +export NETCDF_LIB=${NETCDF_PATH}/lib +./configure CPPFLAGS="-I${ANTLR_PATH}/include -I${UDUNITS_PATH}/include" CFLAGS="-L${ANTLR_PATH}/lib -I${NETCDF_PATH}/include -I${UDUNITS_PATH}/include -L${UDUNITS_PATH}/lib " --prefix=$1 +make +make install diff --git a/package/pnetcdf/1.12.1/install.sh b/package/pnetcdf/1.12.1/install.sh index aec4214..1e79057 100755 --- a/package/pnetcdf/1.12.1/install.sh +++ b/package/pnetcdf/1.12.1/install.sh @@ -4,6 +4,7 @@ set -e pnetcdf_version='1.12.1' . ${DOWNLOAD_TOOL} -u http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/pnetcdf-${pnetcdf_version}.tar.gz cd ${JARVIS_TMP} +rm -rf pnetcdf-${pnetcdf_version} tar zxvf ${JARVIS_DOWNLOAD}/pnetcdf-${pnetcdf_version}.tar.gz cd pnetcdf-${pnetcdf_version} ./configure --prefix=$1 --build=aarch64-linux --enable-shared --enable-fortran --enable-large-file-test diff --git a/src/loopService.py b/src/loopService.py index d154ec0..469acfa 100644 --- a/src/loopService.py +++ b/src/loopService.py @@ -126,7 +126,7 @@ program SimulateExample end do call system_clock(t_stop) time2 = t_stop-t_start - write(*,*) ''********The origin loop time used(ms)'********',time2 + write(*,*) '********The origin loop time used(ms)********',time2 write(*,*) ' ACC:', (time2-time1)*100.0/time2,'%' write(*,*) 'Check if two result is consistent, Please add your code here:' loop_i: {loop_code.strip()} loop_i diff --git a/templates/bcc-esm/bccesm.arm.cpu.config b/templates/bcc-esm/bccesm.arm.cpu.config index 7e8b422..7723d4e 100644 --- a/templates/bcc-esm/bccesm.arm.cpu.config +++ b/templates/bcc-esm/bccesm.arm.cpu.config @@ -10,47 +10,48 @@ set -e ./jarvis -install bisheng/2.1.0 com module purge module use ./software/modulefiles -module load bisheng2/2.1.0 +./jarvis -install openblas/0.3.18 any +module load bisheng/2.1.0 export CC=`which clang` export CXX=`which clang++` export FC=`which flang` -./jarvis -install hmpi/1.1.1 bisheng -module load hmpi1/1.1.1 -./jarvis -bench mpi -./jarvis -install fftw/3.3.8 bisheng -./jarvis -bench mpi +./jarvis -install kml/1.6.0/bisheng clang +./jarvis -install hmpi/1.2.0 clang +module load hmpi/1.2.0 export CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort -./jarvis -install hdf5/1.10.1 clang+mpi -./jarvis -install pnetcdf/1.11.2 clang+mpi -./jarvis -install netcdf/4.7.0 clang+mpi -tar -xvf BCC_ESM.tar +./jarvis -install hdf5/1.12.0/clang clang+mpi +module load hdf5-clang/1.12.0 +./jarvis -install pnetcdf/1.12.1 clang+mpi +module load pnetcdf/1.12.1 +./jarvis -install netcdf/4.7.4/clang clang+mpi [ENV] module purge -module use /workspace/public/software/modules/ -module use software/moduledeps -module load compilers/bisheng/2.1.0/bisheng2.1.0 mpi/hmpi/1.1.1/bisheng2.1.0 libs/pnetcdf/1.12.1/bisheng2.1.0_hmpi1.1.1 libs/netcdf/netcdf_c_4.7.4_fortran_4.5.3/bisheng2.1.0_hmpi1.1.1 libs/fftw/3.3.8/bisheng2.1.0-hmpi1.1.1 libs/hdf5/1.12.0/bisheng2.1.0_hmpi1.1.1 -module load gcc7.3.0/openblas/0.3.18 -export LIBS_DIR=/workspace/public/software/libs -export NETCDF_DIR=${LIBS_DIR}/netcdf/netcdf_c_4.7.4_fortran_4.5.3/bisheng2.1.0_hmpi1.1.1 -export PNETCDF_DIR=${LIBS_DIR}/pnetcdf/1.12.1/bisheng2.1.0_hmpi1.1.1 -export FFTW_DIR=${LIBS_DIR}/fftw/3.3.8/bisheng2.1.0_hmpi1.1.1 -export MPI_DIR=/workspace/public/software/mpi/hmpi/1.1.1/bisheng2.1.0/ompi +module use software/modulefiles +module load bisheng/2.1.0 +module load hmpi/1.2.0 +module load openblas/0.3.18 +#module load kml-bisheng/1.6.0 +module load hdf5-clang/1.12.0 +module load pnetcdf/1.12.1 +module load netcdf-clang/4.7.4 +export NETCDF_DIR=${NETCDF_CLANG_PATH} +export PNETCDF_DIR=${PNETCDF_PATH} +export MPI_DIR=${HMPI_PATH} +#export KML_LIB=$KML_BISHENG_PATH/lib export USER_CC=mpicc export USER_FC=mpifort export CC=mpicc CXX=mpicxx FC=mpifort F77=mpifort -export CSMDATA=/workspace/home/BCC_ESM-T382/INIDATA +export CSMDATA=/share/BCC_ESM-T382/INIDATA export DATA_PATH=$CSMDATA/data export MODEL_PATH=$JARVIS_ROOT/esm export WORK_PATH=$MODEL_PATH/T382L70p25 +export EXEROOT=$WORK_PATH/output -export COMMON_PRECISE_OPT="-ffp-contract=off -mllvm -disable-sincos-opt -faarch64-pow-alt-precision=18 -mllvm -enable-alt-precision-math-functions -Hx,124,0xc00000 -Mflushz" +export COMMON_PRECISE_OPT="-g -ffp-contract=off -mllvm -disable-sincos-opt -faarch64-pow-alt-precision=18 -mllvm -enable-alt-precision-math-functions -Hx,124,0xc00000 -Mflushz" export LD_KML="-L${KML_LIB} -lkm_l9" export ATM_PRECISE=$COMMON_PRECISE_OPT -export LND_PRECISE=$COMMON_PRECISE_OPT export ICE_PRECISE=$COMMON_PRECISE_OPT -export OCN_PRECISE=$COMMON_PRECISE_OPT -export CPL_PRECISE=$COMMON_PRECISE_OPT chmod +x -R $MODEL_PATH/tools chmod +x -R $WORK_PATH/*.csh chmod +x -R $MODEL_PATH/models @@ -71,32 +72,32 @@ csh -f build.csh 1 [CLEAN] rm -rf OBJ +rm -rf output [RUN] -#run = ./build.csh 2 2>&1 | tee run.log -run = ./build.csh 2 +run = ./build.csh 2 2>&1 | tee run.log binary = nodes = 1 [BATCH] #! /bin/bash time1=$(date "+%Y-%m-%d"); -perfdir="perf-data/${time1}-28n-AJ-IJ-CPL8t-2day-8min" -mkdir $perfdir -cp output/atm/atm.log.* $perfdir/atm.log -cp output/atm/timing.0 $perfdir/timing.atm.log -cp output/cpl/cpl.log.* $perfdir/cpl.log -cp output/ice/ice.log.* $perfdir/ice.log -cp output/lnd/lnd.log.* $perfdir/lnd.log -cp output/lnd/timing.0 $perfdir/timing.lnd.log -cp output/ocn/ocn.log.* $perfdir/ocn.log +perfdir="perf-data/${time1}-BS" +mkdir -p $perfdir +cp -rf output/atm/atm.log.* $perfdir/ +cp -rf output/atm/timing.0 $perfdir/timing.0.atm +cp -rf output/cpl/cpl.log.* $perfdir/ +cp -rf output/ice/ice.log.* $perfdir/ +cp -rf output/lnd/lnd.log.* $perfdir/ +cp -rf output/lnd/timing.0 $perfdir/timing.0.lnd +cp -rf output/ocn/ocn.log.* $perfdir/ +cp -rf output/esm_* $perfdir/ echo "All of the data has archived under $perfdir" -PRECT_GPCP(gpcp_vars) SST_HADISST TS_NCEP exit 0 -outputdir="job10-12M" -export MSS_testpath=/share/esm10/T382L70p25/output10-121n-8cpl/atm -#export WKDIR=$JARVIS_ROOT/diag-ncl/cn-test/$outputdir/ +outputdir="esm-output" +export MSS_testpath=/share/esm/T382L70p25/output/atm +export WKDIR=$JARVIS_ROOT/diag-ncl/$outputdir/ image_dir=$WKDIR/${outputdir}-obs export test_prefix=$outputdir cd $MSS_testpath diff --git a/templates/bcc-esm/build.csh b/templates/bcc-esm/build.csh index 46b83ca..181e0af 100644 --- a/templates/bcc-esm/build.csh +++ b/templates/bcc-esm/build.csh @@ -39,10 +39,6 @@ setenv OCNINIFILEDATE 20010101.000000 setenv CASESTR "Datm CLM3 MOM SIS 0 Start" # short descriptive text string setenv CSMROOT $MODEL_PATH # root directory of source -############################################################################# -# allocate exe directory -############################################################################# -setenv EXEROOT $WORK_PATH/output ############################################################################# setenv ARCROOT $WORK_PATH/RESULT/ARC # archive root directory @@ -213,7 +209,7 @@ if ( $argv[1] == 2 ) then setenv OMP_STACKSIZE 3G setenv KMP_AFFINITY compact echo "`date` -- CSM JOB SUBMIT HAS FINISHED" - chmod +x run.sh + cp -rf ../run.sh ./ && chmod +x run.sh dsub -s run.sh env | egrep '(MP_|LOADL|XLS|FPE|DSM|OMP|MPC)' # document above env vars endif diff --git a/templates/ncl/6.5.0/data.NCL.arm.cpu.config b/templates/ncl/6.5.0/data.NCL.arm.cpu.config new file mode 100644 index 0000000..d63f0de --- /dev/null +++ b/templates/ncl/6.5.0/data.NCL.arm.cpu.config @@ -0,0 +1,103 @@ +[SERVER] +11.11.11.11 + +[DOWNLOAD] +NCL/6.6.2 https://github.com/chen-shaoheng/NCL-SOURCE/releases/download/ncl-6.6.2/ncl-6.6.2.tar.gz + +[DEPENDENCY] +set -e +set -x +module purge +cd /etc/yum.repos.d/ +mkdir -p backup +cp *.repo backup/ +sed -i -e 's|$releasever|8-stream|g' /etc/yum.repos.d/CentOS-* +sed -i '15 s/^/#/' /etc/yum.repos.d/CentOS-AppStream.repo +sed -i '16 s/^#//' /etc/yum.repos.d/CentOS-AppStream.repo +sed -i '15 s/^/#/' /etc/yum.repos.d/CentOS-Base.repo +sed -i '16 s/^#//' /etc/yum.repos.d/CentOS-Base.repo +sed -i '16 s/^/#/' /etc/yum.repos.d/CentOS-centosplus.repo +sed -i '17 s/^#//' /etc/yum.repos.d/CentOS-centosplus.repo +sed -i '19 s/^/#/' /etc/yum.repos.d/CentOS-CR.repo +sed -i '20 s/^#//' /etc/yum.repos.d/CentOS-CR.repo +sed -i '15 s/^/#/' /etc/yum.repos.d/CentOS-Devel.repo +sed -i '16 s/^#//' /etc/yum.repos.d/CentOS-Devel.repo +sed -i '16 s/^/#/' /etc/yum.repos.d/CentOS-Extras.repo +sed -i '17 s/^#//' /etc/yum.repos.d/CentOS-Extras.repo +sed -i '5 s/^/#/' /etc/yum.repos.d/CentOS-fasttrack.repo +sed -i '6 s/^#//' /etc/yum.repos.d/CentOS-fasttrack.repo +sed -i '15 s/^/#/' /etc/yum.repos.d/CentOS-HA.repo +sed -i '16 s/^#//' /etc/yum.repos.d/CentOS-HA.repo +sed -i '15 s/^/#/' /etc/yum.repos.d/CentOS-PowerTools.repo +sed -i '16 s/^#//' /etc/yum.repos.d/CentOS-PowerTools.repo +sed -i '18c enabled=1' /etc/yum.repos.d/CentOS-PowerTools.repo + +yum clean all && yum makecache +yum remove epel-release -y +yum install -y epel-release +sed -i -e 's|$releasever|8|g' /etc/yum.repos.d/epel* +yum install -y netcdf-fortran-devel hdf-static hdf-devel g2clib-static gdal-devel proj-devel imake libXaw-devel flex-static udunits2-devel byacc cairo-devel flex gsl-devel openblas-devel + +yum -y install xorg-x11-xauth xorg-x11-server-utils xorg-x11-server-Xnest libXtst +yum install -y rpmbuild +yum install rpmdevtools -y +rpmdev-setuptree + + +[ENV] +module purge +#!/bin/bash +module use ./software/modulefiles/ +module add bisheng/2.5.0 hmpi/1.2.0 jasper/1.900.2 +export CC=clang +export CXX=clang++ +export FC=flang + +module add hdf5-clang/1.10.1 netcdf-clang/4.7.4 +export HDF5=${HDF5_CLANG_PATH} +export NETCDF_PATH=${NETCDF_CLANG_PATH} +export NETCDF=${NETCDF_PATH} + +module add pnetcdf/1.11.2 + +module add proj/5.2.0 +module add libpng/1.6.37 +module add gdal/2.2.4 +module add libjpeg/v9b +module add g2clib/1.6.0 +module add udunits/2.2.28 +module add gsl/2.6 +module add hdf-eos2/2.20 +module add hdf-eos5/1.16 +module add mesa/3.1 +module add vis5dplus/1.3.0 +module add szip/2.1.1 + + +[APP] +app_name = NCL +build_dir = ${JARVIS_TMP}/ncl_6.6.2 +binary_dir = +case_dir = + +[BUILD] +cd ${JARVIS_TMP} +tar -xvf ncl-6.6.2.tar.gz +cd ncl-6.6.2 +#add linux_aarch64 branch +sed -i '380a case aarch64:' config/ymake +sed -i '381a set model = $mach' config/ymake +sed -i '382a set arch = $mach' config/ymake +sed -i '383a set sysincs = LINUX' config/ymake +sed -i '384a set vendor = ARM' config/ymake +sed -i '385a breaksw' config/ymake + +./Configure -v + +make Everything +make all install + +[RUN] +run = export NCARG_FONTCAPS=/usr/lib64/ncarg/fontcaps && export NCARG_GRAPHCAPS=/usr/lib64/ncarg/graphcaps && export NCARG_ROOT=/usr && export NCARG_DATABASE=/usr/lib64/ncarg/database && export NCARG_LIB=/usr/lib64/ncarg && export NCARG_NCARG=/usr/share/ncarg && ncl -Q +binary = +nodes = 1 -- Gitee From 2c97aa960435336daffea5ade06f18ff19330b29 Mon Sep 17 00:00:00 2001 From: iotwins <834352945@qq.com> Date: Wed, 13 Sep 2023 17:24:50 +0800 Subject: [PATCH 3/6] add gitignore --- .gitignore | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c6f0b2d..f6f4a41 100644 --- a/.gitignore +++ b/.gitignore @@ -71,4 +71,32 @@ installed app/* test.sh *.swp -workloads/* \ No newline at end of file +workloads/* +esm-pio +esm2 +esm3 +esm4* +esm5 +esm-pio-yzc +T382L70p25 +container +esm/lib +esm/tools +examples +job_run.sh +clean.sh +batch_run.sh +osu +test +esm-* +software-zj +ncl-chen-test +esm.* +vscode* +log +run.sh +esm2.* +osu.arm.* +bccesm.arm* +diag-ncl +container \ No newline at end of file -- Gitee From bb660fb497425b9619c4a91435b08e62fbf5fb6e Mon Sep 17 00:00:00 2001 From: Qiyu8 Date: Wed, 13 Sep 2023 11:39:01 +0800 Subject: [PATCH 4/6] colourful jarvis --- jarvis | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jarvis b/jarvis index a4bbbaa..b3d48d1 100755 --- a/jarvis +++ b/jarvis @@ -1,9 +1,10 @@ #!/bin/bash -echo " __ ___ .______ ____ ____ __ _______. "; -echo " | | / \ | _ \ \ \ / / | | / | "; -echo " | | / ^ \ | |_) | \ \/ / | | | (----\` "; -echo " .--. | | / /_\ \ | / \ / | | \ \ "; -echo " | \`--' | / _____ \ | |\ \----. \ / | | .----) | "; -echo " \______/ /__/ \__\ | _| \`._____| \__/ |__| |_______/ "; +echo -e "\e[1;31m __ ___ .______ ____ ____ __ _______. "; +echo -e "\e[1;32m | | / \ | _ \ \ \ / / | | / | "; +echo -e "\e[1;33m | | / ^ \ | |_) | \ \/ / | | | (----\` "; +echo -e "\e[1;34m .--. | | / /_\ \ | / \ / | | \ \ "; +echo -e "\e[1;35m | \`--' | / _____ \ | |\ \----. \ / | | .----) | "; +echo -e "\e[1;36m \______/ /__/ \__\ | _| \`._____| \__/ |__| |_______/ "; +echo -e "\e[0m" #prevent whitespace problems python3 ./src/jarvis.py "$@" -- Gitee From 881eb7ac188f825e2daba2d8c47435deb9f34b23 Mon Sep 17 00:00:00 2001 From: Qiyu8 Date: Wed, 13 Sep 2023 15:47:58 +0800 Subject: [PATCH 5/6] add kp-hpc script --- package/kp-hpc/1.0.0/install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 package/kp-hpc/1.0.0/install.sh diff --git a/package/kp-hpc/1.0.0/install.sh b/package/kp-hpc/1.0.0/install.sh new file mode 100644 index 0000000..3244daa --- /dev/null +++ b/package/kp-hpc/1.0.0/install.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -x +set -e +file_name=kunpeng-hpc-1.0.0-aarch64-linux +. ${DOWNLOAD_TOOL} -u https://mirrors.huaweicloud.com/kunpeng/archive/Kunpeng_SDK/HPC/${file_name}.tar.gz +cd ${JARVIS_TMP} +tar -xvf ${JARVIS_DOWNLOAD}/${file_name}.tar.gz +cd ${file_name}/script +./install.sh \ No newline at end of file -- Gitee From c09c39d2f3527ede420b364a78c38e5756255074 Mon Sep 17 00:00:00 2001 From: iotwins <834352945@qq.com> Date: Wed, 13 Sep 2023 17:46:12 +0800 Subject: [PATCH 6/6] fix gitignore --- .gitignore | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index f6f4a41..c6f0b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -71,32 +71,4 @@ installed app/* test.sh *.swp -workloads/* -esm-pio -esm2 -esm3 -esm4* -esm5 -esm-pio-yzc -T382L70p25 -container -esm/lib -esm/tools -examples -job_run.sh -clean.sh -batch_run.sh -osu -test -esm-* -software-zj -ncl-chen-test -esm.* -vscode* -log -run.sh -esm2.* -osu.arm.* -bccesm.arm* -diag-ncl -container \ No newline at end of file +workloads/* \ No newline at end of file -- Gitee