Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
aea159b
add PDOS with soc
Oct 12, 2021
33daedb
Fix: torch version mismatch with cxx11 abi setting.
caic99 Oct 18, 2021
958a130
Add deepks to build test.
caic99 Oct 18, 2021
97dd613
Merge pull request #399 from caic99/newelpa
dyzheng Oct 19, 2021
52d246f
fix a input_conv bug for deepks parameters
maki49 Oct 20, 2021
9df67e2
add write_input of deepks parameters
maki49 Oct 20, 2021
5b365ea
replace 'torch::symeig' by torch::linalg::eigh'
maki49 Oct 20, 2021
ed42bdd
fixed bug of Makefile compiler without __DEEPKS
dyzheng Oct 21, 2021
96e65b2
fixed bug of Makefile compiler without __DEEPKS
dyzheng Oct 21, 2021
dbcf965
fixed some reference results of 301* and 304* examples
dyzheng Oct 21, 2021
98ce116
Merge pull request #402 from dyzheng/ABACUS_2.2.0_beta
dyzheng Oct 21, 2021
4b90c38
deepks parallelization : S overlap matrix
wenfei-li Oct 21, 2021
ecc1c05
deepks parallelization : calculating pdm; update CMakelist
wenfei-li Oct 25, 2021
577be4e
deepks parallelization : gamma point energy
wenfei-li Oct 25, 2021
2da74c8
1. fix bug in ComplexMatrix::print()
PeizeLin Oct 25, 2021
e606e37
Merge branch 'HexxR' into develop
PeizeLin Oct 26, 2021
48cd3fa
1. Add "#ifdef _OPENMP" for all OpenMP codes.
PeizeLin Oct 26, 2021
c0984e8
auther: Qu Xin; fixed bug of DFT+U force and stress calculation.
dyzheng Oct 26, 2021
755ef44
reopen test case of DFT+U
dyzheng Oct 26, 2021
48041b7
Merge pull request #407 from dyzheng/ABACUS_2.2.0_beta
dyzheng Oct 27, 2021
3d80f54
Merge pull request #408 from deepmodeling/ABACUS_2.2.0_beta
dyzheng Oct 27, 2021
89f8479
Merge pull request #72 from deepmodeling/ABACUS_2.2.0_beta
dyzheng Oct 27, 2021
ff4699b
deepks parallelization : gamma point, energy and force
wenfei-li Oct 27, 2021
0112c5d
Merge pull request #70 from 1041176461/develop
dyzheng Oct 27, 2021
396b4d0
Merge pull request #71 from PeizeLin/develop
dyzheng Oct 27, 2021
453b13d
Merge pull request #404 from wenfei-li/deepks
wenfei-li Oct 27, 2021
6a1efad
fixed conflict of LCAO_descriptor.cpp
dyzheng Oct 27, 2021
18eb00c
Merge pull request #409 from dyzheng/ABACUS_2.2.0_beta(deepks->develop)
dyzheng Oct 27, 2021
ae29cf3
Merge pull request #410 from abacusmodeling/develop
dyzheng Oct 27, 2021
3bca604
deleted warning of angular momentum output in warning.log
dyzheng Nov 1, 2021
bc0d431
Merge pull request #421 from dyzheng/ABACUS_2.2.0_beta
dyzheng Nov 1, 2021
7e09462
Merge pull request #411 from deepmodeling/ABACUS_2.2.0_beta
dyzheng Nov 1, 2021
435c4cd
vnl : make it faster for large system
wenfei-li Nov 2, 2021
f1c842a
change test.yml to include beta branch
wenfei-li Nov 2, 2021
1537ff0
Merge pull request #427 from wenfei-li/ABACUS_2.2.0_beta
dyzheng Nov 2, 2021
5519cb7
Merge pull request #73 from deepmodeling/ABACUS_2.2.0_beta
dyzheng Nov 2, 2021
995e47a
1. add class Diag_Scalapack_gvx
PeizeLin Nov 3, 2021
ef813ff
Merge branch 'scalapack-gvx' into develop
PeizeLin Nov 3, 2021
4dd7dca
Merge pull request #428 from deepmodeling/ABACUS_2.2.0_beta
dyzheng Nov 3, 2021
d0ac093
fixed cmake for scalapack_gvx update
dyzheng Nov 3, 2021
6fdb4f7
Merge pull request #75 from dyzheng/ABACUS_2.2.0_beta
dyzheng Nov 3, 2021
ce645a2
OpenMP optimization for local potential and charge density under k-po…
abacus-ustc Nov 4, 2021
148514f
delete one useless line in file src_lcao/gint_k_rho.cpp
abacus-ustc Nov 4, 2021
cb0acb3
change Macro: __OPENMP --> _OPENMP
abacus-ustc Nov 4, 2021
18cdfdf
Merge pull request #76 from LiuXiaohui123321/develop
dyzheng Nov 4, 2021
e34d915
update cmake file for openmp
dyzheng Nov 4, 2021
6e9cec2
Merge pull request #434 from dyzheng/ABACUS_2.2.0_beta
dyzheng Nov 4, 2021
a9cfa3f
Merge branch 'ABACUS_2.2.0_beta' of https://github.com.cnpmjs.org/dee…
dyzheng Nov 5, 2021
15c780b
modified test.yml and hosted_test.yml
dyzheng Nov 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
pull_request_target:
branches:
- develop
- reconstruction
- newelpa

- update_MD
jobs:

start-runner:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if(USE_OPENMP)
find_package(OpenMP REQUIRED)
target_link_libraries(${ABACUS_BIN_NAME} OpenMP::OpenMP_CXX)
add_compile_options(${OpenMP_CXX_FLAGS})
add_compile_definitions(__OPENMP)
#add_compile_definitions(_OPENMP)
endif()

set(CMAKE_CXX_STANDARD 11)
Expand Down Expand Up @@ -135,7 +135,7 @@ if(ENABLE_DEEPKS)
find_package(Torch REQUIRED)
include_directories(${TORCH_INCLUDE_DIRS})
target_link_libraries(${ABACUS_BIN_NAME} ${TORCH_LIBRARIES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
add_compile_options(${TORCH_CXX_FLAGS})

find_path(libnpy_SOURCE_DIR
npy.hpp
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN cd /tmp \
&& cd /tmp && rm -rf fftw-3.3.9 && rm fftw-3.3.9.tar.gz

RUN cd /tmp \
&& wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.9.0%2Bcpu.zip --no-check-certificate --quiet \
&& unzip libtorch-shared-with-deps-1.9.0+cpu.zip \
&& wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.9.1%2Bcpu.zip --no-check-certificate --quiet \
&& unzip libtorch-cxx11-abi-shared-with-deps-1.9.1+cpu.zip \
&& cp -r libtorch/include /usr/local \
&& cp -r libtorch/lib /usr/local \
&& cp -r libtorch/share /usr/local \
Expand Down
6 changes: 3 additions & 3 deletions source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ HONG_SER = -D__FP -D__LCAO ${HONG_FFTW}
HONG_SER_SELINV = -D__FP -D__LCAO ${HONG_FFTW} -D__SELINV
HONG_GDB = -g -D__FP -D__LCAO ${HONG_FFTW}
#(2)mpi
HONG_MPI = -D__FP -D__LCAO ${HONG_FFTW} -D__MPI -D__OPENMP
HONG_MPI = -D__FP -D__LCAO ${HONG_FFTW} -D__MPI
# mohan comment out 2021-02-06, add -DUSE_LIBXC=0 if you want to use LIBXC
#HONG_MPI_SELINV = -D__FP ${HONG_FFTW} ${HONG_LAPACK} -D__MPI -D__SELINV -DMETIS -DEXX_DM=3 -DEXX_H_COMM=2 -DUSE_LIBXC=0 -DTEST_EXX_LCAO=0 -DTEST_EXX_RADIAL=1 -DUSE_CEREAL_SERIALIZATION
HONG_MPI_SELINV = -D__FP ${HONG_FFTW} ${HONG_LAPACK} -D__MPI -D__LCAO -D__OPENMP -D__SELINV -DMETIS -DEXX_DM=3 -DEXX_H_COMM=2 -DTEST_EXX_LCAO=0 -DTEST_EXX_RADIAL=1 -DUSE_CEREAL_SERIALIZATION
HONG_MPI_SELINV_20210523 = -D__FP ${HONG_FFTW} ${HONG_LAPACK} -D__LCAO -D__MPI -D__OPENMP -D__SELINV -DMETIS -DEXX_DM=3 -DEXX_H_COMM=2 -DTEST_EXX_LCAO=0 -DTEST_EXX_RADIAL=1 -DUSE_CEREAL_SERIALIZATION -D__EXX
HONG_MPI_SELINV = -D__FP ${HONG_FFTW} ${HONG_LAPACK} -D__MPI -D__LCAO -D__SELINV -DMETIS -DEXX_DM=3 -DEXX_H_COMM=2 -DTEST_EXX_LCAO=0 -DTEST_EXX_RADIAL=1 -DUSE_CEREAL_SERIALIZATION
HONG_MPI_SELINV_20210523 = -D__FP ${HONG_FFTW} ${HONG_LAPACK} -D__LCAO -D__MPI -D__SELINV -DMETIS -DEXX_DM=3 -DEXX_H_COMM=2 -DTEST_EXX_LCAO=0 -DTEST_EXX_RADIAL=1 -DUSE_CEREAL_SERIALIZATION -D__EXX
HONG_DEEPKS = ${HONG_MPI_SELINV_20210523} -D__DEEPKS #caoyu add 2021-07-15 , use it in DeePKS. Add LIBTORCH_DIR and LIBNPY_DIR, modify ${LIBS} and build with std=c++14 !!
#(3)memory
#(3)memory
Expand Down
4 changes: 4 additions & 0 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ LCAO_nnr.o \
LCAO_diago.o\
LCAO_evolve.o\
LCAO_descriptor.o\
LCAO_descriptor_old.o\
LCAO_descriptor_new.o\
ylm.o\
FORCE_STRESS.o\
FORCE_gamma.o\
Expand All @@ -176,6 +178,7 @@ global_fp.o \
pdiag_double.o \
pdiag_basic.o \
pdiag_common.o \
diag_scalapack_gvx.o \
subgrid_oper.o \
conv_coulomb_pot.o \
conv_coulomb_pot_k.o \
Expand Down Expand Up @@ -225,6 +228,7 @@ parallel_reduce.o\
parallel_pw.o\
ft.o\
parallel_grid.o\
parallel_deepks.o \

OBJS_FIRST_PRINCIPLES=$(OBJS_MAIN)\
$(OBJS_PW)\
Expand Down
5 changes: 3 additions & 2 deletions source/input_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,13 @@ void Input_Conv::Convert(void)
}

ModuleBase::timer::tick("Input_Conv","Convert");
return;

//-----------------------------------------------
//caoyu add for DeePKS
//-----------------------------------------------
#ifdef __DEEPKS
GlobalV::out_descriptor = INPUT.out_descriptor;
GlobalV::deepks_scf = INPUT.deepks_scf;
#endif

return;
}
15 changes: 10 additions & 5 deletions source/module_base/complexmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,20 +414,25 @@ ComplexMatrix conj(const ComplexMatrix &m)
}

// Peize Lin add 2021.09.08
std::ostream & ComplexMatrix::print( std::ostream & os, const double threshold_norm, const double threshold_imag ) const
std::ostream & ComplexMatrix::print( std::ostream & os, const double threshold_abs, const double threshold_imag ) const
{
for( int ir=0; ir!=this->nr; ++ir )
{
for( int ic=0; ic!=this->nc; ++ic )
if(std::norm((*this)(ir,ic))>threshold_norm)
{
const std::complex<double> & data = (*this)(ir,ic);
if(std::abs(data)>threshold_abs)
{
if(std::imag((*this)(ir,ic))>threshold_imag)
os<<(*this)(ir,ic)<<"\t";
if(std::abs(std::imag(data))>threshold_imag)
os<<data<<"\t";
else
os<<std::real((*this)(ir,ic))<<"\t";
os<<std::real(data)<<"\t";
}
else
{
os<<0<<"\t";
}
}
os<<std::endl;
}
return os;
Expand Down
2 changes: 1 addition & 1 deletion source/module_base/complexmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ComplexMatrix
void zero_out(void);
void set_as_identity_matrix(void);

std::ostream & print( std::ostream & os, const double threshold_norm=0.0, const double threshold_imag=0.0 ) const; // Peize Lin add 2021.09.08
std::ostream & print( std::ostream & os, const double threshold_abs=0.0, const double threshold_imag=0.0 ) const; // Peize Lin add 2021.09.08
};

ComplexMatrix operator+(const ComplexMatrix &m1, const ComplexMatrix &m2);
Expand Down
4 changes: 4 additions & 0 deletions source/module_base/mathzone_add1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
typedef fftw_complex FFTW_COMPLEX;

//#include <unistd.h>
#ifdef _OPENMP
#include <omp.h>
#endif

namespace ModuleBase
{
Expand Down Expand Up @@ -980,7 +982,9 @@ void Mathzone_Add1::Cubic_Spline_Interpolation
{
ModuleBase::timer::tick("Mathzone_Add1","Cubic_Spline_Interpolation");

#ifdef _OPENMP
#pragma omp parallel for schedule(static)
#endif
for(int m = 0; m < rsize ; m++)
{
int klo = 0;
Expand Down
11 changes: 7 additions & 4 deletions source/module_orbital/ORB_atomic_lm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#include "../module_base/timer.h"
#include "../module_base/math_integral.h"
#include "../module_base/math_sphbes.h"

#ifdef _OPENMP
#include <omp.h>
#endif

Numerical_Orbital_Lm::Numerical_Orbital_Lm()
{
Expand Down Expand Up @@ -224,7 +227,7 @@ void Numerical_Orbital_Lm::extra_uniform(const double &dr_uniform_in, const bool

// do interpolation here to make grid more dense

#ifdef __OPENMP
#ifdef _OPENMP
#pragma omp parallel for schedule(static)
#endif
for (int ir = 0; ir < this->nr_uniform; ir++)
Expand Down Expand Up @@ -268,8 +271,8 @@ void Numerical_Orbital_Lm::extra_uniform(const double &dr_uniform_in, const bool
default:
//GlobalV::ofs_warning << " The angular momentum larger than 4 (g orbitals) may be error about eggbox. " << std::endl;
//GlobalV::ofs_warning << " Check file " << __FILE__ << " line " << __LINE__ <<std::endl;
std::cout << " The angular momentum larger than 4 (g orbitals) may be error about eggbox. " << std::endl;
std::cout << " Check file " << __FILE__ << " line " << __LINE__ <<std::endl;
//std::cout << " The angular momentum larger than 4 (g orbitals) may be error about eggbox. " << std::endl;
//std::cout << " Check file " << __FILE__ << " line " << __LINE__ <<std::endl;
ModuleBase::Mathzone_Add1::SplineD2 (ModuleBase::GlobalFunc::VECTOR_TO_PTR(r_radial), ModuleBase::GlobalFunc::VECTOR_TO_PTR(psi), nr, 0.0, 0.0, y2); break;
}

Expand Down Expand Up @@ -545,7 +548,7 @@ void Numerical_Orbital_Lm::cal_kradial_sbpool(void)
{
r_tmp[ir] *= (ir&1) ? four_three : two_three;
}
#ifdef __OPENMP
#ifdef _OPENMP
#pragma omp parallel for schedule(static)
#endif
for (int ik = 0; ik < nk; ik++)
Expand Down
Loading