From d62ca6f4286ff1f96f0b3e067427962098e54809 Mon Sep 17 00:00:00 2001 From: James Misaka Date: Sat, 11 Nov 2023 11:25:51 +0800 Subject: [PATCH 1/2] Toolchain 2023.5 (#3196) * Update install_elpa.sh update elpa version to 2023.05.001 * Update cmake version to 3.27.6 * Update gcc version to 13.2.0 * Update install_openblas.sh - update OpenBLAS version to 0.3.24 - update NUM_THREADS to 128 in compiling * Set default intel compiler to `icpx` * update build.sh scripts * Update README.md * Update README.md * modified toolchain*.sh * Update toolchain_intel-mpich.sh * remove error message in build*.sh when do install * Update README.md * minor update * Update README.md * version 2023.5 tag * Update README for GPU version * update optional message in README --- toolchain/README.md | 78 +++++++++++++++++--- toolchain/build_abacus_gnu.sh | 15 ++-- toolchain/build_abacus_intel-mpich.sh | 23 +++--- toolchain/build_abacus_intel.sh | 22 +++--- toolchain/install_abacus_toolchain.sh | 6 +- toolchain/scripts/VERSION | 2 +- toolchain/scripts/stage0/install_cmake.sh | 6 +- toolchain/scripts/stage0/install_gcc.sh | 4 +- toolchain/scripts/stage2/install_openblas.sh | 10 +-- toolchain/scripts/stage3/install_elpa.sh | 8 +- toolchain/toolchain_gnu.sh | 2 +- toolchain/toolchain_intel-mpich.sh | 13 ++-- toolchain/toolchain_intel.sh | 11 +-- 13 files changed, 133 insertions(+), 67 deletions(-) diff --git a/toolchain/README.md b/toolchain/README.md index b7702a55b7..e067fa22c7 100644 --- a/toolchain/README.md +++ b/toolchain/README.md @@ -1,5 +1,5 @@ # The ABACUS Toolchain -Version 2023.4 +Version 2023.5 ## Author [QuantumMisaka](https://github.com/QuantumMisaka) @@ -31,7 +31,7 @@ and give setup files that you can use to compile ABACUS. - [ ] Better compliation method for ABACUS-DEEPMD and ABACUS-DEEPKS. - [ ] A better `setup` and toolchain code structure. - [ ] Modulefile generation scripts. -- [ ] Support for `acml` toolchain (scripts are partly in toolchain now) or other AMD compiler and math lib like `AOCL` and `AOCC` +- [ ] Support for AMD compiler and math lib like `AOCL` and `AOCC` ## Usage Online & Offline @@ -39,6 +39,8 @@ Main script is `install_abacus_toolchain.sh`, which will use scripts in `scripts` directory to compile install dependencies of ABACUS. +You can just `./install_abacus_toolchain.sh -h` to get more help message. + **Notice: You SHOULD `source` or `module load` related environments before use toolchain method for installation, espacially for `gcc` or `intel-oneAPI` !!!! for example, `module load mkl mpi icc compiler`** **Notice: You SHOULD keep your environments systematic, for example, you CANNOT load `intel-OneAPI` environments while use gcc toolchain !!!** @@ -51,7 +53,7 @@ to compile install dependencies of ABACUS. All packages will be downloaded from [cp2k-static/download](https://www.cp2k.org/static/downloads). by `wget` , and will be detailedly compiled and installed in `install` directory by toolchain scripts, despite of: - `CEREAL` which will be downloaded from [CEREAL](https://github.com/USCiLab/cereal) -- `LibNPY` which will be downloaded from [LIBNPY](https://github.com/llohse/libnpy) +- `Libnpy` which will be downloaded from [LIBNPY](https://github.com/llohse/libnpy) - `LibRI` which will be downloaded from [LibRI](https://github.com/abacusmodeling/LibRI) - `LibCOMM` which will be downloaded from [LibComm](https://github.com/abacusmodeling/LibComm) Notice: These packages will be downloaded by `wget` from `github.com`, which is hard to be done in Chinese Internet. You may need to use offline installation method. @@ -78,7 +80,28 @@ just by using this toolchain > cp ***.tar.gz build/ ``` -Notice: for `CEREAL`, `LibNPY`, `LibRI` and `LibCOMM`, +The needed dependencies version default: +- `cmake` 3.27.6 +- `gcc` 13.2.0 (which will always NOT be installed, But use system) +- `OpenMPI` 4.1.5 +- `MPICH` 4.1.2 +- `OpenBLAS` 0.3.24 (Intel toolchain need `get_vars.sh` tool from it) +- `ScaLAPACK` 2.2.1 +- `FFTW` 3.3.10 +- `LibXC` 6.2.2 +- `ELPA` 2023.05.001 +- `CEREAL` 1.3.2 +And Intel-oneAPI need user or server manager to manually install from Intel. +[Intel-oneAPI](https://www.intel.cn/content/www/cn/zh/developer/tools/oneapi/toolkits.html) + +Dependencies below are optional, which is NOT installed by default: +- `LibTorch` 2.0.1 +- `Libnpy` 0.1.0 +- `LibRI` 0.1.0 +- `LibComm` 0.1.0 +Users can install them by using `--with-*=install` in toolchain*.sh, which is `no` in default. + +Notice: for `CEREAL`, `Libnpy`, `LibRI` and `LibComm`, you need to download them from github.com, rename it as formatted, and put them in `build` directory at the same time e.g.: @@ -118,7 +141,7 @@ If compliation is successful, a message will be shown like this: > ./build_abacus_intel.sh > or you can modify the builder scripts to suit your needs. ``` -You can run build_abacus_gnu.sh or build_abacus_intel.sh to build ABACUS +You can run `build_abacus_gnu.sh` or `build_abacus_intel.sh` to build ABACUS by gnu-toolchain or intel-toolchain respectively, the builder scripts will automatically locate the environment and compile ABACUS. You can manually change the builder scripts to suit your needs. @@ -139,13 +162,20 @@ or you can also do it in a more completely way: > rm -rf install build/*/* build/OpenBLAS*/ build/setup_* ``` -Users can get help messages by simply: +## Common Problem and Solution +### GPU version of ABACUS +add following options in build*.sh: ```shell -> ./install_abacus_toolchain.sh -h # or --help +cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_CXX_COMPILER=icpx \ + -DMPI_CXX_COMPILER=mpiicpc \ + ...... + -DUSE_CUDA=1 \ + -DCMAKE_CUDA_COMPILER=${path to cuda toolkit}/bin/nvcc \ + ...... ``` - -## Common Problem and Solution +### shell problem If you encounter problem like: ```shell /bin/bash^M: bad interpreter: No such file or directory @@ -157,6 +187,36 @@ or `permission denied` problem, you can simply run: And also, you can fix `permission denied` problem via `chmod +x` if `pre_set.sh` have no execution permission. +### libtorch and deepks problem +If deepks feature have problem, you can manually change libtorch version +from 2.0.1 to 1.12.0 in `toolchain/scripts/stage4/install_libtorch.sh`. +Also, you can install ABACUS without deepks by removing all the deepks and related options. + +NOTICE: if you want deepks feature, your intel-mkl environment should be accessible in building process. you can check it in `build_abacus_gnu.sh` + +### deepmd feature problem +When you encounter problem like `GLIBCXX_3.4.29 not found`, it is sure that your `gcc` version is lower than the requirement of `libdeepmd`. + +After my test, you need `gcc`>11.3.1 to enable deepmd feature in ABACUS. + +### ELPA problem via Intel-oneAPI toolchain in AMD server +The default compiler for Intel-oneAPI is `icpx` and `icx`, which will cause problem when compling ELPA in AMD server. + +The best way is to change `icpx` to `icpc`, `icx` to `icc`. user can manually change it in toolchain*.sh via `--with-intel-classic=yes` + + +### LibRI and LibComm problem +(There is some problem sometimes when compling with LibRI and LibComm, detailed information is needed) + + +### Intel-oneAPI problem +Sometimes Intel-oneAPI have problem to link `mpirun`, +which will always show in 2023.2.0 version of MPI in Intel-oneAPI. +Try `source /path/to/setvars.sh` or install another version of IntelMPI may help. + +More problem and possible solution can be accessed via [#2928](https://github.com/deepmodeling/abacus-develop/issues/2928) + + ## Advanced Installation Usage diff --git a/toolchain/build_abacus_gnu.sh b/toolchain/build_abacus_gnu.sh index 259facdf32..66fb821caf 100755 --- a/toolchain/build_abacus_gnu.sh +++ b/toolchain/build_abacus_gnu.sh @@ -18,13 +18,13 @@ source $INSTALL_DIR/setup cd $ABACUS_DIR ABACUS_DIR=$(pwd) -BUILD_DIR=build_abacus +BUILD_DIR=build_abacus_gnu rm -rf $BUILD_DIR PREFIX=$ABACUS_DIR -LAPACK=$INSTALL_DIR/openblas-0.3.23/lib +LAPACK=$INSTALL_DIR/openblas-0.3.24/lib SCALAPACK=$INSTALL_DIR/scalapalack-2.2.1/lib -ELPA=$INSTALL_DIR/elpa-2021.11.002/cpu +ELPA=$INSTALL_DIR/elpa-2023.05.001/cpu FFTW3=$INSTALL_DIR/fftw-3.3.10 CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal LIBXC=$INSTALL_DIR/libxc-6.2.2 @@ -46,7 +46,6 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DENABLE_LCAO=ON \ -DENABLE_LIBXC=ON \ -DUSE_OPENMP=ON \ - -DENABLE_ASAN=OFF \ -DUSE_ELPA=ON \ # -DENABLE_DEEPKS=1 \ # -DTorch_DIR=$LIBTORCH \ @@ -58,12 +57,14 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ # -DTensorFlow_DIR=$DEEPMD \ # # add mkl env for libtorch to link -# # gnu-toolchain will lack of -lmkl when load libtorch -# # need to fix -- zhaoqing in 2023-09-02 +# if one want to install libtorch, mkl should be load in build process +# for -lmkl when load libtorch # module load mkl +# if one want's to include deepmd, your gcc version should be >= 11.3.0 + cmake --build $BUILD_DIR -j `nproc` -cmake --install $BUILD_DIR +cmake --install $BUILD_DIR 2>/dev/null # generate abacus_env.sh cat << EOF > "${TOOL}/abacus_env.sh" diff --git a/toolchain/build_abacus_intel-mpich.sh b/toolchain/build_abacus_intel-mpich.sh index a2daff3bd5..181378804a 100755 --- a/toolchain/build_abacus_intel-mpich.sh +++ b/toolchain/build_abacus_intel-mpich.sh @@ -4,7 +4,7 @@ #SBATCH -n 16 #SBATCH -o install.log #SBATCH -e install.err -# install ABACUS with libxc and deepks +# build and install ABACUS with libxc, also can with deepks and deepmd # JamesMisaka in 2023.08.31 # Build ABACUS by intel-toolchain with mpich @@ -19,21 +19,21 @@ source $INSTALL_DIR/setup cd $ABACUS_DIR ABACUS_DIR=$(pwd) -BUILD_DIR=build_abacus +BUILD_DIR=build_abacus_intel-mpich rm -rf $BUILD_DIR PREFIX=$ABACUS_DIR -ELPA=$INSTALL_DIR/elpa-2021.11.002/cpu +ELPA=$INSTALL_DIR/elpa-2023.05.001/cpu CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal LIBXC=$INSTALL_DIR/libxc-6.2.2 -LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch -LIBNPY=$INSTALL_DIR/libnpy-0.1.0/include +# LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch +# LIBNPY=$INSTALL_DIR/libnpy-0.1.0/include # LIBRI=$INSTALL_DIR/LibRI-0.1.0 # LIBCOMM=$INSTALL_DIR/LibComm-0.1.0 # DEEPMD=$HOME/apps/anaconda3/envs/deepmd cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DCMAKE_CXX_COMPILER=icpc \ + -DCMAKE_CXX_COMPILER=icpx \ -DMPI_CXX_COMPILER=mpicxx \ -DMKLROOT=$MKLROOT \ -DELPA_DIR=$ELPA \ @@ -42,19 +42,20 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DENABLE_LCAO=ON \ -DENABLE_LIBXC=ON \ -DUSE_OPENMP=ON \ - -DENABLE_ASAN=OFF \ -DUSE_ELPA=ON \ - -DENABLE_DEEPKS=1 \ - -DTorch_DIR=$LIBTORCH \ - -Dlibnpy_INCLUDE_DIR=$LIBNPY \ + # -DENABLE_DEEPKS=1 \ + # -DTorch_DIR=$LIBTORCH \ + # -Dlibnpy_INCLUDE_DIR=$LIBNPY \ # -DENABLE_LIBRI=ON \ # -DLIBRI_DIR=$LIBRI \ # -DLIBCOMM_DIR=$LIBCOMM \ # -DDeePMD_DIR=$DEEPMD \ # -DTensorFlow_DIR=$DEEPMD \ +# if one want's to include deepmd, your gcc version should be >= 11.3.0 + cmake --build $BUILD_DIR -j `nproc` -cmake --install $BUILD_DIR +cmake --install $BUILD_DIR 2>/dev/null # generate abacus_env.sh cat << EOF > "${TOOL}/abacus_env.sh" diff --git a/toolchain/build_abacus_intel.sh b/toolchain/build_abacus_intel.sh index c745c90fd5..6be78f2069 100755 --- a/toolchain/build_abacus_intel.sh +++ b/toolchain/build_abacus_intel.sh @@ -19,22 +19,22 @@ source $INSTALL_DIR/setup cd $ABACUS_DIR ABACUS_DIR=$(pwd) -BUILD_DIR=build_abacus +BUILD_DIR=build_abacus_intel rm -rf $BUILD_DIR PREFIX=$ABACUS_DIR -ELPA=$INSTALL_DIR/elpa-2021.11.002/cpu +ELPA=$INSTALL_DIR/elpa-2023.05.001/cpu CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal LIBXC=$INSTALL_DIR/libxc-6.2.2 -LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch -LIBNPY=$INSTALL_DIR/libnpy-0.1.0/include +# LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch +# LIBNPY=$INSTALL_DIR/libnpy-0.1.0/include # LIBRI=$INSTALL_DIR/LibRI-0.1.0 # LIBCOMM=$INSTALL_DIR/LibComm-0.1.0 # DEEPMD=$HOME/apps/anaconda3/envs/deepmd # if use deepks and deepmd cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DCMAKE_CXX_COMPILER=icpc \ + -DCMAKE_CXX_COMPILER=icpx \ -DMPI_CXX_COMPILER=mpiicpc \ -DMKLROOT=$MKLROOT \ -DELPA_DIR=$ELPA \ @@ -42,13 +42,11 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DLibxc_DIR=$LIBXC \ -DENABLE_LCAO=ON \ -DENABLE_LIBXC=ON \ - -DENABLE_LIBRI=OFF \ -DUSE_OPENMP=ON \ - -DENABLE_ASAN=OFF \ -DUSE_ELPA=ON \ - -DENABLE_DEEPKS=1 \ - -DTorch_DIR=$LIBTORCH \ - -Dlibnpy_INCLUDE_DIR=$LIBNPY \ +# -DENABLE_DEEPKS=1 \ +# -DTorch_DIR=$LIBTORCH \ +# -Dlibnpy_INCLUDE_DIR=$LIBNPY \ # -DENABLE_LIBRI=ON \ # -DLIBRI_DIR=$LIBRI \ # -DLIBCOMM_DIR=$LIBCOMM \ @@ -56,7 +54,9 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \ # -DTensorFlow_DIR=$DEEPMD \ cmake --build $BUILD_DIR -j `nproc` -cmake --install $BUILD_DIR +cmake --install $BUILD_DIR 2>/dev/null + +# if one want's to include deepmd, your gcc version should be >= 11.3.0 # generate abacus_env.sh cat << EOF > "${TOOL}/abacus_env.sh" diff --git a/toolchain/install_abacus_toolchain.sh b/toolchain/install_abacus_toolchain.sh index 0f5c1b6572..be41687307 100755 --- a/toolchain/install_abacus_toolchain.sh +++ b/toolchain/install_abacus_toolchain.sh @@ -118,7 +118,7 @@ The --enable-FEATURE options follow the rules: --enable-FEATURE=no Disable this particular feature --enable-FEATURE The option keyword alone is equivalent to --enable-FEATURE=yes - + ===== NOTICE: THESE FEATURE AER NOT INCLUDED IN ABACUS ===== --enable-cuda Turn on GPU (CUDA) support (can be combined with --enable-opencl). Default = no @@ -302,9 +302,9 @@ enable_tsan="__FALSE__" enable_opencl="__FALSE__" enable_cuda="__FALSE__" enable_hip="__FALSE__" -export intel_classic="yes" +export intel_classic="no" # no, then icc->icx, icpc->icpx, -# which cannot compile elpa-2021 and fftw.3.3.10 in some place +# which cannot compile elpa in AMD server # due to some so-called cross-compile problem # and will lead to problem in force calculation # but icx is recommended by intel compiler diff --git a/toolchain/scripts/VERSION b/toolchain/scripts/VERSION index 7668ac0dba..219f75857a 100644 --- a/toolchain/scripts/VERSION +++ b/toolchain/scripts/VERSION @@ -1,2 +1,2 @@ # version file to force a rebuild of the entire toolchain -VERSION="2023.4" +VERSION="2023.5" diff --git a/toolchain/scripts/stage0/install_cmake.sh b/toolchain/scripts/stage0/install_cmake.sh index ed6dcba35a..6f08a62b1d 100755 --- a/toolchain/scripts/stage0/install_cmake.sh +++ b/toolchain/scripts/stage0/install_cmake.sh @@ -20,13 +20,13 @@ cd "${BUILDDIR}" case "${with_cmake}" in __INSTALL__) echo "==================== Installing CMake ====================" - cmake_ver="3.26.3" + cmake_ver="3.27.6" if [ "${OPENBLAS_ARCH}" = "arm64" ]; then cmake_arch="linux-aarch64" - cmake_sha256="b002c22b926aacd6fefe64bcf08620216088eb72f55ac532b7bcfd4d93443d50" + cmake_sha256="a83e01ed1cdf44c2e33e0726513b9a35a8c09e3b5a126fd720b3c8a9d5552368" elif [ "${OPENBLAS_ARCH}" = "x86_64" ]; then cmake_arch="linux-x86_64" - cmake_sha256="8ec0ef24375a1d0e78de2f790b4545d0718acc55fd7e2322ecb8e135696c77fe" + cmake_sha256="8c449dabb2b2563ec4e6d5e0fb0ae09e729680efab71527b59015131cea4a042" else report_error ${LINENO} \ "cmake installation for ARCH=${ARCH} is not supported. You can try to use the system installation using the flag --with-cmake=system instead." diff --git a/toolchain/scripts/stage0/install_gcc.sh b/toolchain/scripts/stage0/install_gcc.sh index 13b8d8c780..2effe52ca7 100755 --- a/toolchain/scripts/stage0/install_gcc.sh +++ b/toolchain/scripts/stage0/install_gcc.sh @@ -6,8 +6,8 @@ [ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0 SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)" -gcc_ver="13.1.0" -gcc_sha256="bacd4c614d8bd5983404585e53478d467a254249e0f1bb747c8bc6d787bd4fa2" +gcc_ver="13.2.0" +gcc_sha256="8cb4be3796651976f94b9356fa08d833524f62420d6292c5033a9a26af315078" source "${SCRIPT_DIR}"/common_vars.sh source "${SCRIPT_DIR}"/tool_kit.sh diff --git a/toolchain/scripts/stage2/install_openblas.sh b/toolchain/scripts/stage2/install_openblas.sh index fd11d4dc2a..c4b922d51b 100755 --- a/toolchain/scripts/stage2/install_openblas.sh +++ b/toolchain/scripts/stage2/install_openblas.sh @@ -6,8 +6,8 @@ [ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0 SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)" -openblas_ver="0.3.23" # Keep in sync with get_openblas_arch.sh -openblas_sha256="5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114" +openblas_ver="0.3.24" # Keep in sync with get_openblas_arch.sh +openblas_sha256="ceadc5065da97bd92404cac7254da66cc6eb192679cf1002098688978d4d5132" openblas_pkg="OpenBLAS-${openblas_ver}.tar.gz" source "${SCRIPT_DIR}"/common_vars.sh @@ -76,7 +76,7 @@ case "${with_openblas}" in make -j $(get_nprocs) \ MAKE_NB_JOBS=0 \ TARGET=${TARGET} \ - NUM_THREADS=64 \ + NUM_THREADS=128 \ USE_THREAD=1 \ USE_OPENMP=1 \ NO_AFFINITY=1 \ @@ -88,7 +88,7 @@ case "${with_openblas}" in make -j $(get_nprocs) \ MAKE_NB_JOBS=0 \ TARGET=NEHALEM \ - NUM_THREADS=64 \ + NUM_THREADS=128 \ USE_THREAD=1 \ USE_OPENMP=1 \ NO_AFFINITY=1 \ @@ -100,7 +100,7 @@ case "${with_openblas}" in make -j $(get_nprocs) \ MAKE_NB_JOBS=0 \ TARGET=${TARGET} \ - NUM_THREADS=64 \ + NUM_THREADS=128 \ USE_THREAD=1 \ USE_OPENMP=1 \ NO_AFFINITY=1 \ diff --git a/toolchain/scripts/stage3/install_elpa.sh b/toolchain/scripts/stage3/install_elpa.sh index 59c2a72fa5..7b112c7070 100755 --- a/toolchain/scripts/stage3/install_elpa.sh +++ b/toolchain/scripts/stage3/install_elpa.sh @@ -7,10 +7,12 @@ SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)" # From https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html -elpa_ver="2021.11.002" -elpa_sha256="576f1caeed7883b81396640fda0f504183866cf6cbd4bc71d1383ba2208f1f97" # 2021.11.002, by sha256sum +elpa_ver="2023.05.001" +elpa_sha256="ec64be5d6522810d601a3b8e6a31720e3c3eb4af33a434d8a64570d76e6462b6" +#elpa_ver="2021.11.002" +#elpa_sha256="576f1caeed7883b81396640fda0f504183866cf6cbd4bc71d1383ba2208f1f97" #elpa_ver="2022.11.001" -# elpa_sha256="35e397d7c0af95bb43bc7bef7fff29425c1da400fa0cd86ae8d3bd2ff2f9d999" # 2022.11.001 +#elpa_sha256="35e397d7c0af95bb43bc7bef7fff29425c1da400fa0cd86ae8d3bd2ff2f9d999" source "${SCRIPT_DIR}"/common_vars.sh diff --git a/toolchain/toolchain_gnu.sh b/toolchain/toolchain_gnu.sh index c12066ae39..57105f601b 100755 --- a/toolchain/toolchain_gnu.sh +++ b/toolchain/toolchain_gnu.sh @@ -6,7 +6,7 @@ #SBATCH -e compile.err # JamesMisaka in 2023-09-16 -# install abacus by gnu-toolchain +# install abacus dependency by gnu-toolchain # one can use mpich or openmpi # libtorch and libnpy are for deepks support, which can be =no diff --git a/toolchain/toolchain_intel-mpich.sh b/toolchain/toolchain_intel-mpich.sh index b40d0f3aec..ffc2626670 100755 --- a/toolchain/toolchain_intel-mpich.sh +++ b/toolchain/toolchain_intel-mpich.sh @@ -6,8 +6,8 @@ #SBATCH -e compile.err # JamesMisaka in 2023-09-16 -# install abacus by intel-toolchain -# use mkl , and mpich instead of intelmpi +# install abacus dependency by intel-toolchain +# use mkl ,and mpich instead of intelmpi # libtorch and libnpy are for deepks support, which can be =no # module load mkl compiler @@ -21,9 +21,10 @@ --with-fftw=no \ --with-elpa=install \ --with-cereal=install \ ---with-libtorch=install \ ---with-libnpy=install \ +--with-libtorch=no \ +--with-libnpy=no \ --with-libri=no \ --with-libcomm=no \ ---with-intel-classic=yes \ -| tee compile.log \ No newline at end of file +--with-intel-classic=no \ +| tee compile.log +# if you are using AMD server: set --with-intel-classic=yes \ No newline at end of file diff --git a/toolchain/toolchain_intel.sh b/toolchain/toolchain_intel.sh index 1253bfd1b4..8f391be008 100755 --- a/toolchain/toolchain_intel.sh +++ b/toolchain/toolchain_intel.sh @@ -6,7 +6,7 @@ #SBATCH -e compile.err # JamesMisaka in 2023-08-31 -# install abacus by intel-toolchain +# install abacus dependency by intel-toolchain # use mkl and intelmpi # but mpich and openmpi can also be tried # libtorch and libnpy are for deepks support, which can be =no @@ -22,9 +22,10 @@ --with-fftw=no \ --with-elpa=install \ --with-cereal=install \ ---with-libtorch=install \ ---with-libnpy=install \ +--with-libtorch=no \ +--with-libnpy=no \ --with-libri=no \ --with-libcomm=no \ ---with-intel-classic=yes \ -| tee compile.log \ No newline at end of file +--with-intel-classic=no \ +| tee compile.log +# if you are using AMD server: set --with-intel-classic=yes \ No newline at end of file From 6a2a6cef52c4529517c547cf423aca6c99609aed Mon Sep 17 00:00:00 2001 From: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Date: Sat, 11 Nov 2023 21:42:54 +0800 Subject: [PATCH 2/2] modify symmetry_autoclose to true (#3193) * modify symmetry_autoclose to true * modify value of symmetry_prec to 1e-6 in source/module_io/test/support/INPUT * fix ut of write input test --- docs/advanced/input_files/input-main.md | 2 +- source/module_io/input.cpp | 2 +- source/module_io/test/input_test.cpp | 4 ++-- source/module_io/test/input_test_para.cpp | 2 +- source/module_io/test/support/INPUT | 2 +- source/module_io/test/write_input_test.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index f34ceeb1bd..b31402c55c 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -438,7 +438,7 @@ These variables are used to control general system parameters. - **Description**: Control how to deal with error in symmetry analysis due to inaccurate lattice parameters or atom positions in STRU file, especially useful when *[calculation](#calculation)==cell-relax* - False: quit with an error message - True: automatically set symmetry to 0 and continue running without symmetry analysis -- **Default**: False +- **Default**: True ### kpar diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index 23054fdaaf..3d9449e6d1 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -211,7 +211,7 @@ void Input::Default(void) init_vel = false; ref_cell_factor = 1.0; symmetry_prec = 1.0e-6; // LiuXh add 2021-08-12, accuracy for symmetry - symmetry_autoclose = false; // whether to close symmetry automatically when error occurs in symmetry analysis + symmetry_autoclose = true; // whether to close symmetry automatically when error occurs in symmetry analysis cal_force = 0; force_thr = 1.0e-3; force_thr_ev2 = 0; diff --git a/source/module_io/test/input_test.cpp b/source/module_io/test/input_test.cpp index 9798113411..17aa0dca8f 100644 --- a/source/module_io/test/input_test.cpp +++ b/source/module_io/test/input_test.cpp @@ -89,7 +89,7 @@ TEST_F(InputTest, Default) EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.ref_cell_factor,1.0); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec, 1.0e-6); - EXPECT_FALSE(INPUT.symmetry_autoclose); + EXPECT_TRUE(INPUT.symmetry_autoclose); EXPECT_EQ(INPUT.cal_force, 0); EXPECT_DOUBLE_EQ(INPUT.force_thr,1.0e-3); EXPECT_DOUBLE_EQ(INPUT.force_thr_ev2,0); @@ -446,7 +446,7 @@ TEST_F(InputTest, Read) EXPECT_EQ(INPUT.symmetry,"1"); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec, 1.0e-6); - EXPECT_FALSE(INPUT.symmetry_autoclose); + EXPECT_TRUE(INPUT.symmetry_autoclose); EXPECT_EQ(INPUT.cal_force, 0); EXPECT_NEAR(INPUT.force_thr,1.0e-3,1.0e-7); EXPECT_DOUBLE_EQ(INPUT.force_thr_ev2,0); diff --git a/source/module_io/test/input_test_para.cpp b/source/module_io/test/input_test_para.cpp index bbebe1acae..2f592331d4 100644 --- a/source/module_io/test/input_test_para.cpp +++ b/source/module_io/test/input_test_para.cpp @@ -95,7 +95,7 @@ TEST_F(InputParaTest,Bcast) EXPECT_EQ(INPUT.symmetry,"default"); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec, 1.0e-6); - EXPECT_FALSE(INPUT.symmetry_autoclose); + EXPECT_TRUE(INPUT.symmetry_autoclose); EXPECT_EQ(INPUT.cal_force, 0); EXPECT_DOUBLE_EQ(INPUT.force_thr,1.0e-3); EXPECT_DOUBLE_EQ(INPUT.force_thr_ev2,0); diff --git a/source/module_io/test/support/INPUT b/source/module_io/test/support/INPUT index 8cec1a5479..5a62b2416e 100644 --- a/source/module_io/test/support/INPUT +++ b/source/module_io/test/support/INPUT @@ -22,7 +22,7 @@ nbands_sto 256 #number of stochastic bands nbands_istate 5 #number of bands around Fermi level for get_pchg calulation symmetry 1 #the control of symmetry init_vel False #read velocity from STRU or not -symmetry_prec 1e-05 #accuracy for symmetry +symmetry_prec 1e-06 #accuracy for symmetry nelec 0 #input number of electrons out_mul 0 # mulliken charge or not noncolin 0 #using non-collinear-spin diff --git a/source/module_io/test/write_input_test.cpp b/source/module_io/test/write_input_test.cpp index 164a22c4dc..e5d7f6343e 100644 --- a/source/module_io/test/write_input_test.cpp +++ b/source/module_io/test/write_input_test.cpp @@ -72,7 +72,7 @@ TEST_F(write_input, General1) EXPECT_THAT(output, testing::HasSubstr("init_vel 0 #read velocity from STRU or not")); EXPECT_THAT(output, testing::HasSubstr("symmetry_prec 1e-05 #accuracy for symmetry")); EXPECT_THAT(output, - testing::HasSubstr("symmetry_autoclose 0 #whether to close symmetry automatically when " + testing::HasSubstr("symmetry_autoclose 1 #whether to close symmetry automatically when " "error occurs in symmetry analysis")); EXPECT_THAT(output, testing::HasSubstr("nelec 0 #input number of electrons")); EXPECT_THAT(output, testing::HasSubstr("out_mul 0 # mulliken charge or not"));