diff --git a/.github/workflows/ase_plugin_test.yml b/.github/workflows/ase_plugin_test.yml index bce0a379012..3b5dd93a697 100644 --- a/.github/workflows/ase_plugin_test.yml +++ b/.github/workflows/ase_plugin_test.yml @@ -48,9 +48,9 @@ jobs: - name: Configure & Build ABACUS (GNU) run: | git config --global --add safe.directory `pwd` - export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} - export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} - export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} + export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU_DIST32_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} + export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} + export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU_DIST32_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} source toolchain/install/setup rm -rf build diff --git a/.github/workflows/build_test_cmake.yml b/.github/workflows/build_test_cmake.yml index 5da22cb3de4..ea4ce366fd0 100644 --- a/.github/workflows/build_test_cmake.yml +++ b/.github/workflows/build_test_cmake.yml @@ -70,9 +70,9 @@ jobs: - name: Build run: | git config --global --add safe.directory `pwd` - export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} - export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} - export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} + export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU_DIST32_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} + export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} + export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU_DIST32_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} source toolchain/install/setup rm -rf build diff --git a/interfaces/Multiwfn_interface/molden.py b/interfaces/Multiwfn_interface/molden.py index 471767089f6..1935267a2c9 100644 --- a/interfaces/Multiwfn_interface/molden.py +++ b/interfaces/Multiwfn_interface/molden.py @@ -841,7 +841,7 @@ def read_stru(fpath): if 'LATTICE_VECTORS' in blocks: stru['lat']['vec'] = [[float(x) for x in line.split()] for line in blocks['LATTICE_VECTORS']] elif 'LATTICE_PARAMETER' in blocks: - stru['lat']['param'] = [float(x) for x in blocks['LATTICE_PARAMETERS'].split()] + stru['lat']['param'] = [float(x) for x in blocks['LATTICE_PARAMETER'][0].split()] #============ ATOMIC_SPECIES ============ stru['species'] = [ dict(zip(['symbol', 'mass', 'pp_file', 'pp_type'], line.split())) for line in blocks['ATOMIC_SPECIES'] ] diff --git a/python/pyabacus/src/pyabacus/io/stru.py b/python/pyabacus/src/pyabacus/io/stru.py index 0327898fc45..429f9dd09fb 100644 --- a/python/pyabacus/src/pyabacus/io/stru.py +++ b/python/pyabacus/src/pyabacus/io/stru.py @@ -134,7 +134,7 @@ def _trim(line): for line in blocks['LATTICE_VECTORS']] elif 'LATTICE_PARAMETER' in blocks: stru['lat']['param'] = [float(x) - for x in blocks['LATTICE_PARAMETERS'].split()] + for x in blocks['LATTICE_PARAMETER'][0].split()] #============ ATOMIC_SPECIES ============ stru['species'] = [_atomic_species_from_file(line) diff --git a/source/source_base/module_container/ATen/core/tensor.cpp b/source/source_base/module_container/ATen/core/tensor.cpp index 92babb361c9..0affb9d995f 100644 --- a/source/source_base/module_container/ATen/core/tensor.cpp +++ b/source/source_base/module_container/ATen/core/tensor.cpp @@ -196,7 +196,7 @@ Tensor Tensor::slice(const std::vector &start, const std::vector &size int offset_out = i * size[1] * size[2] + j * size[2]; TEMPLATE_ALL_2(this->data_type_, this->device_, kernels::synchronize_memory()( - output.data() + offset_out, this->data() + offset, size[1])) + output.data() + offset_out, this->data() + offset, size[2])) } } } diff --git a/source/source_basis/module_nao/two_center_table.cpp b/source/source_basis/module_nao/two_center_table.cpp index 821e881a458..d2ef6fb6257 100644 --- a/source/source_basis/module_nao/two_center_table.cpp +++ b/source/source_basis/module_nao/two_center_table.cpp @@ -135,7 +135,7 @@ bool TwoCenterTable::is_present(const int itype1, return itype1 >= 0 && itype1 < index_map_.shape().dim_size(0) && l1 >= 0 && l1 < index_map_.shape().dim_size(1) && izeta1 >= 0 && izeta1 < index_map_.shape().dim_size(2) && itype2 >= 0 && itype2 < index_map_.shape().dim_size(3) && l2 >= 0 && l2 < index_map_.shape().dim_size(4) && izeta2 >= 0 - && izeta2 < index_map_.shape().dim_size(5) && l >= 0 && l <= index_map_.shape().dim_size(6) + && izeta2 < index_map_.shape().dim_size(5) && l >= 0 && l < index_map_.shape().dim_size(6) && index_map_.get_value(itype1, l1, izeta1, itype2, l2, izeta2, l) >= 0; } diff --git a/source/source_esolver/esolver_of.cpp b/source/source_esolver/esolver_of.cpp index b7122428f21..ee44b1bc4f4 100644 --- a/source/source_esolver/esolver_of.cpp +++ b/source/source_esolver/esolver_of.cpp @@ -115,7 +115,7 @@ void ESolver_OF::before_all_runners(UnitCell& ucell, const Input_para& inp) this->nelec_[0] = this->pelec->nelec_spin[0]; this->nelec_[1] = this->pelec->nelec_spin[1]; } - delete[] this->kedf_manager_; + delete this->kedf_manager_; this->kedf_manager_ = new KEDF_Manager(); this->kedf_manager_->init(inp, this->pw_rho, this->dV_, this->nelec_[0]); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT KEDF"); diff --git a/tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh b/tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh index a810997e5ed..50b7e779ce4 100755 --- a/tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh +++ b/tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh @@ -651,8 +651,8 @@ if [ "${EXE_orbital:0-3:3}" != ".py" ]; then echo ok ; -else - +else + : fi diff --git a/tools/02_postprocessing/rt-tddft-tools/projection.py b/tools/02_postprocessing/rt-tddft-tools/projection.py index 80d54504b1b..34553f7118f 100644 --- a/tools/02_postprocessing/rt-tddft-tools/projection.py +++ b/tools/02_postprocessing/rt-tddft-tools/projection.py @@ -6,7 +6,7 @@ def __init__(self, stepref, klist, steps, fdir='./OUT.ABACUS', wfc_dir='', s_dir self.klist = klist self.steps = steps self.wfc_dir = fdir + wfc_dir - self.s_dir = fdir suffix + s_dir + self.s_dir = fdir + s_dir wfc_ref, Ocp_ref = self.read_wfc(klist[0]+1, stepref+1, dir=self.wfc_dir) self.nband = len(Ocp_ref) self.nlocal = len(wfc_ref[0])