Skip to content

Commit 218315a

Browse files
author
wenfei-li
committed
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into develop
2 parents 742ee12 + 7154031 commit 218315a

File tree

271 files changed

+11278
-7161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+11278
-7161
lines changed

Dockerfile.gnu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM debian:bullseye-slim
22

3-
RUN apt-get update && apt-get install -y --no-install-recommends git g++ gfortran libssl-dev make cmake vim wget bc unzip \
3+
RUN apt-get update && apt-get install -y --no-install-recommends git g++ gfortran libssl-dev make cmake vim wget bc unzip python3-numpy\
44
&& apt-get install -y --no-install-recommends mpich libmpich-dev
55

6-
ENV GIT_SSL_NO_VERIFY 1
6+
ENV GIT_SSL_NO_VERIFY=1 TERM=xterm-256color
77

88
RUN cd /tmp \
99
&& git clone https://github.com/USCiLab/cereal.git \
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
etotref
2-
etotperatomref
3-
totalforceref 0.0
4-
totalstressref 0.0
5-
totaltimeref
1+
etotref -57838.0048262096606777
2+
etotperatomref -112.9648531762
3+
totalforceref 27.819520
4+
totalstressref 5537.133126
5+
totaltimeref +2495.54754

examples/performance/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ run_abacus() {
8080
lastword=$(tail -1 result.log | awk '{print $1}')
8181
fi
8282
if [[ $lastword != "SEE" ]]; then
83-
/usr/bin/time -v mpirun -n $1 -env OMP_NUM_THREADS=$2 $abacus 2>time.log tee result.log
83+
OMP_NUM_THREADS=$2 /usr/bin/time -v mpirun -n $1 $abacus 2>time.log | tee result.log
8484
else
8585
printf "**result.log is normal end, skip this job** "
8686
fi

examples/performance/sumdat.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ fi
1313
test -f $outf && rm $outf
1414

1515
#title
16-
printf "%20s %7s %8s %8s %6s %6s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s\n" \
17-
"example" "Natoms" "EneCut" "k-points" "NProc" "Niter" "TotTime" "1stSCF" "SCF/iter" \
18-
"Run%" "c_bands%" "s_bands%" "h_psi%" "vloc%" "vnl%" "FFT%" "stress%" "force%" "MaxResSize" > $outf
16+
printf "%20s %15s %7s %8s %8s %6s %6s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s\n" \
17+
"example" "ks_solver" "Natoms" "EneCut" "k-points" "NProc" "Niter" "TotTime" "1stSCF" "SCF/iter" \
18+
"Run%" "h_psi%" "vloc%" "vnl%" "stress%" "force%" "MaxResSize" > $outf
1919

2020
for i in `cat $allcase`;do
2121
if [[ ! -f $i/result.log ]];then
@@ -25,6 +25,7 @@ for i in `cat $allcase`;do
2525
fi
2626

2727
basis=`awk '$1=="basis_type"{print $2}' ${i}/INPUT | tr [A-Z] [a-z]`
28+
solver=`grep ks_solver ${i}/OUT.*/INPUT | awk '{print $2}'`
2829
#echo $basis
2930
if [[ "$basis" == "pw" ]];then
3031
natoms=`sed -n '/ELEMENT NATOM/,/----/'p ${i}/result.log| sed '1d;$d' | awk 'BEGIN{a=0}{a+=$2}END{print a}'`
@@ -36,13 +37,13 @@ for i in `cat $allcase`;do
3637
scf1=`grep -A 1 "ITER ETOT(eV)" ${i}/result.log | awk 'END{printf"%.2f", $NF}'`
3738
totalscf=`awk '$2=="Run"{print $3}' ${i}/result.log`
3839
scfpiter=`awk -v a=$totalscf -v b=$scf1 -v c=$niter 'BEGIN{printf"%.2f",(a-b)/(c-1)}'`
39-
fft=`awk '$2=="FFT3D"{printf"%.1f",$6}' ${i}/result.log`
40+
#fft=`awk '$2=="FFT3D"{printf"%.1f",$6}' ${i}/result.log`
4041
hpsi=`awk '$2=="h_psi"{printf"%.1f",$6}' ${i}/result.log`
4142
vloc=`awk '$2=="vloc"{printf"%.1f",$6}' ${i}/result.log`
4243
vnl=`awk '$2=="vnl"{printf"%.1f",$6}' ${i}/result.log`
4344
sc=`awk '$2=="Run"{printf"%.1f",$6}' ${i}/result.log`
44-
cbands=`awk '$2=="c_bands"{printf"%.1f",$6}' ${i}/result.log`
45-
sbands=`awk '$2=="sum_band"{printf"%.1f",$6}' ${i}/result.log`
45+
#cbands=`awk '$2=="c_bands"{printf"%.1f",$6}' ${i}/result.log`
46+
#sbands=`awk '$2=="sum_band"{printf"%.1f",$6}' ${i}/result.log`
4647
stress=`awk '$2=="cal_stress"{printf"%.1f",$6}' ${i}/result.log`
4748
force=`awk '$2=="cal_force_nl"{printf"%.1f",$6}' ${i}/result.log`
4849
elif [[ "$basis" == "lcao" ]];then
@@ -55,13 +56,13 @@ for i in `cat $allcase`;do
5556
scf1=`grep -A 1 "ITER ETOT(eV)" ${i}/result.log | awk 'END{printf"%.2f", $NF}'`
5657
totalscf=`awk '$1=="Run"{print $3}' ${i}/result.log`
5758
scfpiter=`awk -v a=$totalscf -v b=$scf1 -v c=$niter 'BEGIN{printf"%.2f",(a-b)/(c-1)}'`
58-
fft="-"
59+
#fft="-"
5960
hpsi="-"
6061
vloc=`awk '$2=="vlocal"{printf"%.1f",$6}' ${i}/result.log`
6162
vnl="-"
6263
sc=`awk '$2=="Run"{printf"%.1f",$6}' ${i}/result.log`
63-
cbands=`awk '$2=="cal_bands"{printf"%.1f",$6}' ${i}/result.log`
64-
sbands=`awk '$2=="sum_bands"{printf"%.1f",$6}' ${i}/result.log`
64+
#cbands=`awk '$2=="cal_bands"{printf"%.1f",$6}' ${i}/result.log`
65+
#sbands=`awk '$2=="sum_bands"{printf"%.1f",$6}' ${i}/result.log`
6566
stress=`awk '$2=="evaluate_vl_stress"{printf"%.1f",$6}' ${i}/result.log`
6667
force=`awk '$2=="evaluate_vl_force"{printf"%.1f",$6}' ${i}/result.log`
6768
else
@@ -70,8 +71,8 @@ for i in `cat $allcase`;do
7071
fi
7172
maxres=`grep "Maximum resident set size" ${i}/time.log | awk '{print $NF}'`
7273

73-
printf "%20s %7s %8s %8s %6s %6s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %s\n" \
74-
$i $natoms $encut $kpt $nproc $niter $tottime $scf1 $scfpiter $sc $cbands $sbands $hpsi $vloc $vnl $fft \
74+
printf "%20s %15s %7s %8s %8s %6s %6s %8s %8s %8s %8s %8s %8s %8s %8s %8s %s\n" \
75+
$i $solver $natoms $encut $kpt $nproc $niter $tottime $scf1 $scfpiter $sc $hpsi $vloc $vnl \
7576
$stress $force $maxres >> $outf
7677

7778
done

source/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ VPATH=./src_global\
2323
:./module_elecstate\
2424
:./module_psi\
2525
:./module_hamilt\
26+
:./module_gint\
2627
:./src_pw\
2728
:./src_lcao\
2829
:./src_ions\

source/Makefile.Objects

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ pw_distributeg_method1.o\
267267
pw_distributeg_method2.o\
268268
pw_distributer.o\
269269
pw_init.o\
270-
pw_operation.o\
271270
pw_transform.o\
272271
pw_transform_k.o
273272

@@ -357,8 +356,7 @@ dmft.o \
357356

358357
OBJS_COMMON=atom_spec.o \
359358
unitcell.o \
360-
pw_basis_old.o\
361-
bspline_sf.o\
359+
structure_factor.o\
362360
hamilt.o \
363361
pw_complement.o\
364362
wf_local.o \

source/Makefile.vars

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ CPLUSPLUS_MPI = mpiicpc
44

55
LAPACK_DIR = $(MKLROOT)
66

7-
FFTW_DIR = /public/software/fftw_3.3.8
7+
FFTW_DIR = /home/qianrui/intelcompile/fftw_3.3.8
88

9-
ELPA_DIR = /public/software/elpa_21.05.002
9+
ELPA_DIR = /home/qianrui/intelcompile/elpa_21.05.002
1010
ELPA_INCLUDE_DIR = ${ELPA_DIR}/include/elpa-2021.05.002
1111

12-
CEREAL_DIR = /public/software/cereal
12+
CEREAL_DIR = /home/qianrui/headfile/cereal
1313

1414
# LIBXC_DIR = /public/software/libxc-5.0.0
1515

source/input_conv.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,7 @@ void Input_Conv::Convert(void)
109109
//----------------------------------------------------------
110110
// planewave (8/8)
111111
//----------------------------------------------------------
112-
GlobalC::pw.set(INPUT.gamma_only,
113-
INPUT.ecutwfc,
114-
INPUT.ecutrho,
115-
INPUT.nx,
116-
INPUT.ny,
117-
INPUT.nz,
118-
INPUT.ncx,
119-
INPUT.ncy,
120-
INPUT.ncz,
121-
INPUT.bx,
122-
INPUT.by,
123-
INPUT.bz,
124-
INPUT.pw_seed,
125-
INPUT.nbspline);
112+
GlobalC::sf.set(INPUT.nbspline);
126113
GlobalV::GAMMA_ONLY_LOCAL = INPUT.gamma_only_local;
127114

128115
//----------------------------------------------------------

source/module_base/math_bspline.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ namespace ModuleBase
66
{
77
Bspline::Bspline()
88
{
9-
bezier = NULL;
9+
bezier = nullptr;
1010
norder = 0;
1111
xi = 0;
1212
Dx = 1.0;
1313
}
1414
Bspline::~Bspline()
1515
{
16-
if(bezier!=NULL) delete[] bezier;
16+
if(bezier!=nullptr) delete[] bezier;
1717
}
1818

1919
void Bspline::init(int norderin, double Dxin, double xiin)

source/module_cell/read_atoms.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ bool UnitCell_pseudo::read_atom_positions(std::ifstream &ifpos, std::ofstream &o
723723
if(Coordinate=="Direct")
724724
{
725725
// change v from direct to cartesian,
726-
// the unit is GlobalC::pw.lat0
726+
// the unit is GlobalC::sf.lat0
727727
atoms[it].taud[ia] = v;
728728
atoms[it].tau[ia] = v * latvec;
729729
}
@@ -802,7 +802,7 @@ bool UnitCell_pseudo::read_atom_positions(std::ifstream &ifpos, std::ofstream &o
802802
}// end scan_begin
803803

804804
//check if any atom can move in MD
805-
if(!this->if_atoms_can_move() && GlobalV::CALCULATION=="md")
805+
if(!this->if_atoms_can_move() && (GlobalV::CALCULATION=="md" || GlobalV::CALCULATION=="sto-md"))
806806
{
807807
ModuleBase::WARNING("read_atoms", "no atom can move in MD!");
808808
return 0;

0 commit comments

Comments
 (0)