From c61e9c0522e8acda68952daf96392dd5e39ca547 Mon Sep 17 00:00:00 2001 From: yuanchunlin Date: Tue, 27 Feb 2024 11:51:40 +0800 Subject: [PATCH 1/5] cp2k_modify --- package/elpa/2020.11.001/install.sh | 34 ++++++++++++ templates/CP2K/8.2/Linux-arm-clang.psmp | 15 +++--- templates/CP2K/8.2/data.CP2K.arm.cpu.config | 57 ++++++++++++--------- 3 files changed, 76 insertions(+), 30 deletions(-) create mode 100755 package/elpa/2020.11.001/install.sh diff --git a/package/elpa/2020.11.001/install.sh b/package/elpa/2020.11.001/install.sh new file mode 100755 index 0000000..b4d048f --- /dev/null +++ b/package/elpa/2020.11.001/install.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -x +set -e +. ${DOWNLOAD_TOOL} -u https://www.cp2k.org/static/downloads/elpa-2020.11.001.tar.gz +cd ${JARVIS_TMP} +rm -rf elpa-2020.11.001 +tar -xvf ${JARVIS_DOWNLOAD}/elpa-2020.11.001.tar.gz +cd elpa-2020.11.001 + +array=(${LD_LIBRARY_PATH//:/ }) +for var in ${array[@]} +do + if [[ -e $var/libopenblas.so ]];then + openblas_path=$var + fi + if [[ -e $var/libscalapack.a ]];then + scalapack_path=$var + fi +done + +if [ ! -n "$openblas_path" ];then + echo "Please load openblas." + exit 1 +fi +if [ ! -n "$scalapack_path" ];then + echo "Please load scalapack." + exit 1 +fi + + +./configure --prefix=$1 --enable-openmp --enable-shared=no LIBS="$scalapack_path/libscalapack.a $openblas_path/libopenblas.a" --disable-sse --disable-sse-assembly --disable-avx --disable-avx2 --disable-avx512 + +make -j 4 +make install diff --git a/templates/CP2K/8.2/Linux-arm-clang.psmp b/templates/CP2K/8.2/Linux-arm-clang.psmp index ecc0022..e7e08a2 100644 --- a/templates/CP2K/8.2/Linux-arm-clang.psmp +++ b/templates/CP2K/8.2/Linux-arm-clang.psmp @@ -11,18 +11,20 @@ GNU_PATH = path2 include $(MPI_PATH)/plumed/2.6.2/lib/plumed/src/lib/Plumed.inc.static -ELPA_VER = 2019.05.001 +ELPA_VER = 2020.11.001 ELPA_INC = $(MPI_PATH)/elpa/$(ELPA_VER)/include/elpa_openmp-$(ELPA_VER) ELPA_LIB = $(MPI_PATH)/elpa/$(ELPA_VER)/lib +LIBVORI = $(GNU_PATH)/libvori/21.04.12/lib + FFTW_INC = $(MPI_PATH)/fftw/3.3.8/include FFTW_LIB = $(MPI_PATH)/fftw/3.3.8/lib LIBINT_INC = $(MPI_PATH)/libint/2.6.0/include LIBINT_LIB = $(MPI_PATH)/libint/2.6.0/lib -LIBXC_INC = $(GNU_PATH)/libxc/4.3.4/include -LIBXC_LIB = $(GNU_PATH)/libxc/4.3.4/lib +LIBXC_INC = $(GNU_PATH)/libxc/5.1.4/include +LIBXC_LIB = $(GNU_PATH)/libxc/5.1.4/lib SPGLIB_INC = $(GNU_PATH)/spglib/1.16.0/include SPGLIB_LIB = $(GNU_PATH)/spglib/1.16.0/lib64 @@ -30,14 +32,14 @@ SPGLIB_LIB = $(GNU_PATH)/spglib/1.16.0/lib64 #LIBXSMM_INC = $(GNU_PATH)/libxsmm/1.14/include #LIBXSMM_LIB = $(GNU_PATH)/libxsmm/1.14/lib -CFLAGS = -O2 -g -mtune=native +CFLAGS = -O2 -g -mtune=native -fopenmp DFLAGS = -D__FFTW3 -D__LIBINT -D__LIBXC -D__ELPA #-D__LIBXSMM -D__ELPA DFLAGS += -D__MPI_VERSION=3 -D__PLUMED2 -D__SPGLIB DFLAGS += -D__parallel -D__SCALAPACK FCFLAGS = $(CFLAGS) $(DFLAGS) -FCFLAGS += -ffree-form -ffree-line-length-none +FCFLAGS += -ffree-form -ffree-line-length-none -fconvert=big-endian FCFLAGS += -fopenmp FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008 FCFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules @@ -46,6 +48,7 @@ FCFLAGS += -I$(FFTW_INC) -I$(LIBINT_INC) -I$(LIBXC_INC) #-I$(LIBXSMM_INC) LDFLAGS = $(FCFLAGS) -static-libgfortran LIBS = $(PLUMED_DEPENDENCIES) -L$(GNU_PATH)/gsl/2.6/lib/ -lgsl -lgslcblas -lz +LIBS += $(LIBVORI)/libvori.a LIBS += $(ELPA_LIB)/libelpa_openmp.a LIBS += $(LIBXC_LIB)/libxcf03.a LIBS += $(LIBXC_LIB)/libxc.a @@ -53,7 +56,7 @@ LIBS += $(LIBINT_LIB)/libint2.a LIBS += $(SPGLIB_LIB)/libsymspg.a LIBS += $(FFTW_LIB)/libfftw3.a LIBS += $(FFTW_LIB)/libfftw3_threads.a -LIBS += $(MPI_PATH)/scalapack-lapack-bisheng/2.1.0/lib/libscalapack.a +LIBS += $(MPI_PATH)/scalapack-clang/2.1.0/lib/libscalapack.a LIBS += $(GNU_PATH)/lapack-bisheng/3.8.0/lib/liblapack.a LIBS += $(GNU_PATH)/lapack-bisheng/3.8.0/lib/librefblas.a LIBS += -ldl -lpthread -lstdc++ diff --git a/templates/CP2K/8.2/data.CP2K.arm.cpu.config b/templates/CP2K/8.2/data.CP2K.arm.cpu.config index 4a37b54..a34f3fb 100644 --- a/templates/CP2K/8.2/data.CP2K.arm.cpu.config +++ b/templates/CP2K/8.2/data.CP2K.arm.cpu.config @@ -2,62 +2,71 @@ 11.11.11.11 [DOWNLOAD] -cp2k/8.2 $JARVIS_PROXY/cp2k/cp2k/archive/refs/tags/v8.2.0.tar.gz cp2k-8.2.tar.gz -dbcsr/2.0.1 $JARVIS_PROXY/cp2k/dbcsr/releases/download/v2.0.1/dbcsr-2.0.1.tar.gz +cp2k/8.2 https://521github.com/extdomains/github.com/cp2k/cp2k/releases/download/v8.2.0/cp2k-8.2.tar.bz2 [DEPENDENCY] module purge module use ./software/modulefiles -./jarvis -install bisheng/2.1.0 com -module load bisheng/2.1.0 +./jarvis -install bisheng/3.2.0-mini com +module load bisheng/3.2.0-mini export CC=clang CXX=clang++ FC=flang - -./jarvis -install hmpi/1.1.1 clang +./jarvis -install cmake/3.23.1 any +module load cmake/3.23.1 +./jarvis -install hmpi/2.3.0 clang ./jarvis -install gmp/6.2.0 clang ./jarvis -install boost/1.72.0 clang ./jarvis -install openblas/0.3.18 clang ./jarvis -install spglib/1.16.0 clang -./jarvis -install libxc/4.3.4 clang +./jarvis -install libxc/5.1.4 clang ./jarvis -install gsl/2.6 clang ./jarvis -install libvori/21.04.12 clang ./jarvis -install lapack/3.8.0/bisheng clang -#./jarvis -install fftw/3.3.8 clang + +module use ./software/moduledeps/bisheng3.2.0 module load openblas/0.3.18 module load gsl/2.6 -module load hmpi/1.1.1 +module load hmpi/2.3.0 module load gmp/6.2.0 module load boost/1.72.0 +module load lapack-bisheng/3.8.0 + +module use ./software/moduledeps/bisheng3.2.0-hmpi2.3.0 export CC=mpicc CXX=mpicxx FC=mpifort ./jarvis -install libint/2.6.0 clang+mpi ./jarvis -install fftw/3.3.8 clang+mpi -./jarvis -install scalapack/2.1.0/lapack-bisheng clang+mpi +./jarvis -install scalapack/2.1.0/clang clang+mpi ./jarvis -install plumed/2.6.2 clang+mpi -module load scalapack-lapack-bisheng/2.1.0 openblas/0.3.18 -./jarvis -install elpa/2019.05.001 clang+mpi -tar -zxvf $JARVIS_DOWNLOAD/cp2k-8.2.tar.gz -tar -zxvf $JARVIS_DOWNLOAD/dbcsr-2.0.1.tar.gz -C ${JARVIS_ROOT}/cp2k-8.2.0/exts/dbcsr +module load scalapack-clang/2.1.0 openblas/0.3.18 +./jarvis -install elpa/2020.11.001 clang+mpi + +rm -rf cp2k-8.2 +tar -jxvf $JARVIS_DOWNLOAD/cp2k-8.2.tar.bz2 [ENV] module purge module use ./software/modulefiles -module load bisheng/2.1.0 -module load hmpi/1.1.1 -module load gsl/2.6 +module use ./software/moduledeps/bisheng3.2.0 +module use ./software/moduledeps/bisheng3.2.0-hmpi2.3.0 +module load bisheng/3.2.0-mini +module load boost/1.72.0 gmp/6.2.0 gsl/2.6 hmpi/2.3.0 lapack-bisheng/3.8.0 libvori/21.04.12 libxc/5.1.4 openblas/0.3.18 spglib/1.16.0 +export CC=mpicc CXX=mpicxx FC=mpifort +module load elpa/2020.11.001 fftw/3.3.8 libint/2.6.0 plumed/2.6.2 scalapack-clang/2.1.0 +export PATH=${JARVIS_ROOT}/cp2k-8.2/exe/Linux-arm-clang:$PATH [APP] app_name = CP2K -build_dir = ${JARVIS_ROOT}/cp2k-8.2.0 -binary_dir = ${JARVIS_ROOT}/cp2k-8.2.0/exe/Linux-arm-clang/ -case_dir = ${JARVIS_ROOT}/cp2k-8.2.0/benchmarks/QS/ +build_dir = ${JARVIS_ROOT} +binary_dir = ${JARVIS_ROOT}/cp2k-8.2/exe/Linux-arm-clang/ +case_dir = ${JARVIS_ROOT}/cp2k-8.2/benchmarks/QS/ [BUILD] -cd ./arch +cd ${JARVIS_ROOT}/cp2k-8.2/arch cp ${JARVIS_ROOT}/templates/CP2K/8.2/Linux-arm-clang.psmp ./ -sed -i "10s%path1%${JARVIS_ROOT}/software/libs/bisheng2.1.0/hmpi1.1.11%g" Linux-arm-clang.psmp -sed -i "11s%path2%${JARVIS_ROOT}/software/libs/bisheng2%g" Linux-arm-clang.psmp +sed -i "9s%path1%${JARVIS_ROOT}/software/libs/bisheng3.2.0/hmpi2.3.0%g" Linux-arm-clang.psmp +sed -i "10s%path2%${JARVIS_ROOT}/software/libs/bisheng3.2.0%g" Linux-arm-clang.psmp cd .. -make -j ARCH=Linux-arm-clang.psmp VERSION=psmp +make -j ARCH=Linux-arm-clang VERSION=psmp [CLEAN] make -j 128 ARCH=Linux-arm-clang VERSION=psmp clean -- Gitee From 9c39b3547556ffa91b5584d8958ae8fb2d710d6f Mon Sep 17 00:00:00 2001 From: yuanchunlin Date: Tue, 27 Feb 2024 06:31:05 +0000 Subject: [PATCH 2/5] update templates/CP2K/8.2/Linux-arm-clang.psmp. Signed-off-by: yuanchunlin --- templates/CP2K/8.2/Linux-arm-clang.psmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CP2K/8.2/Linux-arm-clang.psmp b/templates/CP2K/8.2/Linux-arm-clang.psmp index e7e08a2..b8c0ee2 100644 --- a/templates/CP2K/8.2/Linux-arm-clang.psmp +++ b/templates/CP2K/8.2/Linux-arm-clang.psmp @@ -39,7 +39,7 @@ DFLAGS += -D__MPI_VERSION=3 -D__PLUMED2 -D__SPGLIB DFLAGS += -D__parallel -D__SCALAPACK FCFLAGS = $(CFLAGS) $(DFLAGS) -FCFLAGS += -ffree-form -ffree-line-length-none -fconvert=big-endian +FCFLAGS += -ffree-form -ffree-line-length-none FCFLAGS += -fopenmp FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008 FCFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules -- Gitee From 53ccb740263f7052893f4e0f1307f8040ffbb1dc Mon Sep 17 00:00:00 2001 From: yuanchunlin Date: Wed, 28 Feb 2024 01:30:14 +0000 Subject: [PATCH 3/5] update templates/CP2K/8.2/Linux-arm-clang.psmp. Signed-off-by: yuanchunlin --- templates/CP2K/8.2/Linux-arm-clang.psmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CP2K/8.2/Linux-arm-clang.psmp b/templates/CP2K/8.2/Linux-arm-clang.psmp index b8c0ee2..c01f83d 100644 --- a/templates/CP2K/8.2/Linux-arm-clang.psmp +++ b/templates/CP2K/8.2/Linux-arm-clang.psmp @@ -32,7 +32,7 @@ SPGLIB_LIB = $(GNU_PATH)/spglib/1.16.0/lib64 #LIBXSMM_INC = $(GNU_PATH)/libxsmm/1.14/include #LIBXSMM_LIB = $(GNU_PATH)/libxsmm/1.14/lib -CFLAGS = -O2 -g -mtune=native -fopenmp +CFLAGS = -O2 -g -mtune=native -Mbackslash -Hx,2,0x400000 DFLAGS = -D__FFTW3 -D__LIBINT -D__LIBXC -D__ELPA #-D__LIBXSMM -D__ELPA DFLAGS += -D__MPI_VERSION=3 -D__PLUMED2 -D__SPGLIB -- Gitee From 4dd3bff6846288d80995e8c129ceec4913860561 Mon Sep 17 00:00:00 2001 From: yuanchunlin Date: Thu, 29 Feb 2024 01:31:39 +0000 Subject: [PATCH 4/5] update templates/CP2K/8.2/Linux-arm-clang.psmp. Signed-off-by: yuanchunlin --- templates/CP2K/8.2/Linux-arm-clang.psmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CP2K/8.2/Linux-arm-clang.psmp b/templates/CP2K/8.2/Linux-arm-clang.psmp index c01f83d..8275599 100644 --- a/templates/CP2K/8.2/Linux-arm-clang.psmp +++ b/templates/CP2K/8.2/Linux-arm-clang.psmp @@ -32,7 +32,7 @@ SPGLIB_LIB = $(GNU_PATH)/spglib/1.16.0/lib64 #LIBXSMM_INC = $(GNU_PATH)/libxsmm/1.14/include #LIBXSMM_LIB = $(GNU_PATH)/libxsmm/1.14/lib -CFLAGS = -O2 -g -mtune=native -Mbackslash -Hx,2,0x400000 +CFLAGS = -O2 -g -mtune=native -fopenmp -Mbackslash -Hx,2,0x400000 DFLAGS = -D__FFTW3 -D__LIBINT -D__LIBXC -D__ELPA #-D__LIBXSMM -D__ELPA DFLAGS += -D__MPI_VERSION=3 -D__PLUMED2 -D__SPGLIB -- Gitee From 4d1b560ef40b88f69946062022a1c75df16186f6 Mon Sep 17 00:00:00 2001 From: yuanchunlin Date: Thu, 29 Feb 2024 09:09:42 +0000 Subject: [PATCH 5/5] update templates/CP2K/8.2/data.CP2K.arm.cpu.config. Signed-off-by: yuanchunlin --- templates/CP2K/8.2/data.CP2K.arm.cpu.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CP2K/8.2/data.CP2K.arm.cpu.config b/templates/CP2K/8.2/data.CP2K.arm.cpu.config index a34f3fb..20266bf 100644 --- a/templates/CP2K/8.2/data.CP2K.arm.cpu.config +++ b/templates/CP2K/8.2/data.CP2K.arm.cpu.config @@ -2,7 +2,7 @@ 11.11.11.11 [DOWNLOAD] -cp2k/8.2 https://521github.com/extdomains/github.com/cp2k/cp2k/releases/download/v8.2.0/cp2k-8.2.tar.bz2 +cp2k/8.2 https://github.com/extdomains/github.com/cp2k/cp2k/releases/download/v8.2.0/cp2k-8.2.tar.bz2 [DEPENDENCY] module purge -- Gitee