Skip to content

Commit

Permalink
ctest, bugfix, indentation standard
Browse files Browse the repository at this point in the history
  • Loading branch information
knikhil1995 committed Jun 15, 2024
1 parent 6a37944 commit d711596
Show file tree
Hide file tree
Showing 9 changed files with 253 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/dft/dft.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2310,11 +2310,7 @@ namespace dftfe
pcout << std::endl;
if (d_dftParamsPtr->verbosity == 0)
pcout << "Starting SCF iterations...." << std::endl;
while (((norm > d_dftParamsPtr->selfConsistentSolverTolerance) ||
(d_dftParamsPtr->useEnergyResidualTolerance &&
energyResidual >
d_dftParamsPtr->selfConsistentSolverEnergyTolerance)) &&
(scfIter < d_dftParamsPtr->numSCFIterations))
while (!scfConverged && (scfIter < d_dftParamsPtr->numSCFIterations))
{
dealii::Timer local_timer(d_mpiCommParent, true);
if (d_dftParamsPtr->verbosity >= 1)
Expand Down Expand Up @@ -3444,6 +3440,9 @@ namespace dftfe
d_dftParamsPtr->smearedNuclearCharges);
if (d_dftParamsPtr->verbosity >= 1)
pcout << "Energy residual : " << energyResidual << std::endl;
if (d_dftParamsPtr->reproducible_output)
pcout << "Energy residual : " << std::setprecision(4)
<< energyResidual << std::endl;
computing_timer.leave_subsection("Energy residual computation");
}
if (d_dftParamsPtr->computeEnergyEverySCF &&
Expand Down
2 changes: 1 addition & 1 deletion src/dft/psiInitialGuess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace dftfe
DFTFE_PATH,
Z,
n,
l);
l);
}
}
else
Expand Down
154 changes: 154 additions & 0 deletions testsGPU/pseudopotential/complex/accuracyBenchmarks/outputMg2x_8
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
number of atoms: 31
number of atoms types: 1
Z:12
=============================================================================================================================
number of electrons: 310
number of eigen values: 180
=============================================================================================================================
Total number of k-points 2
-----------Simulation Domain bounding vectors (lattice vectors in fully periodic case)-------------
v1 : 1.176399999999999935e+01 0.000000000000000000e+00 0.000000000000000000e+00
v2 : 0.000000000000000000e+00 1.917200000000000060e+01 0.000000000000000000e+00
v3 : 0.000000000000000000e+00 0.000000000000000000e+00 2.037584570023999930e+01
-----------------------------------------------------------------------------------------
-----Fractional coordinates of atoms------
AtomId 0: 2.500000000000000000e-01 2.500000000000000000e-01 4.166666666669999741e-01
AtomId 1: 2.500000000000000000e-01 0.000000000000000000e+00 2.500000000000000000e-01
AtomId 2: 0.000000000000000000e+00 2.500000000000000000e-01 1.666666666670000019e-01
AtomId 3: 0.000000000000000000e+00 0.000000000000000000e+00 5.000000000000000000e-01
AtomId 4: 2.500000000000000000e-01 2.500000000000000000e-01 9.166666666670000296e-01
AtomId 5: 2.500000000000000000e-01 0.000000000000000000e+00 7.500000000000000000e-01
AtomId 6: 0.000000000000000000e+00 2.500000000000000000e-01 6.666666666670000296e-01
AtomId 7: 0.000000000000000000e+00 5.000000000000000000e-01 0.000000000000000000e+00
AtomId 8: 2.500000000000000000e-01 7.500000000000000000e-01 4.166666666669999741e-01
AtomId 9: 2.500000000000000000e-01 5.000000000000000000e-01 2.500000000000000000e-01
AtomId 10: 0.000000000000000000e+00 7.500000000000000000e-01 1.666666666670000019e-01
AtomId 11: 0.000000000000000000e+00 5.000000000000000000e-01 5.000000000000000000e-01
AtomId 12: 2.500000000000000000e-01 7.500000000000000000e-01 9.166666666670000296e-01
AtomId 13: 2.500000000000000000e-01 5.000000000000000000e-01 7.500000000000000000e-01
AtomId 14: 0.000000000000000000e+00 7.500000000000000000e-01 6.666666666670000296e-01
AtomId 15: 5.000000000000000000e-01 0.000000000000000000e+00 0.000000000000000000e+00
AtomId 16: 7.500000000000000000e-01 2.500000000000000000e-01 4.166666666669999741e-01
AtomId 17: 7.500000000000000000e-01 0.000000000000000000e+00 2.500000000000000000e-01
AtomId 18: 5.000000000000000000e-01 2.500000000000000000e-01 1.666666666670000019e-01
AtomId 19: 5.000000000000000000e-01 0.000000000000000000e+00 5.000000000000000000e-01
AtomId 20: 7.500000000000000000e-01 2.500000000000000000e-01 9.166666666670000296e-01
AtomId 21: 7.500000000000000000e-01 0.000000000000000000e+00 7.500000000000000000e-01
AtomId 22: 5.000000000000000000e-01 2.500000000000000000e-01 6.666666666670000296e-01
AtomId 23: 5.000000000000000000e-01 5.000000000000000000e-01 0.000000000000000000e+00
AtomId 24: 7.500000000000000000e-01 7.500000000000000000e-01 4.166666666669999741e-01
AtomId 25: 7.500000000000000000e-01 5.000000000000000000e-01 2.500000000000000000e-01
AtomId 26: 5.000000000000000000e-01 7.500000000000000000e-01 1.666666666670000019e-01
AtomId 27: 5.000000000000000000e-01 5.000000000000000000e-01 5.000000000000000000e-01
AtomId 28: 7.500000000000000000e-01 7.500000000000000000e-01 9.166666666670000296e-01
AtomId 29: 7.500000000000000000e-01 5.000000000000000000e-01 7.500000000000000000e-01
AtomId 30: 5.000000000000000000e-01 7.500000000000000000e-01 6.666666666670000296e-01
-----------------------------------------------------------------------------------------
Number Image Charges 2094

Finite element mesh information
-------------------------------------------------
FE interpolating polynomial order for Kohn-Sham eigenvalue problem: 3
FE interpolating polynomial order for electrostatics solve: 3
FE interpolating polynomial order for nodal electron density computation: 5
number of elements: 1440
number of degrees of freedom for the Kohn-Sham eigenvalue problem : 52791
-------------------------------------------------

Setting initial guess for wavefunctions....

Reading initial guess for electron-density.....

Pseudopotential initalization....

Starting SCF iterations....
Energy residual : 2.8460e+01
Energy residual : 2.2528e+01
Energy residual : 2.1117e+00
Energy residual : 9.6181e-01
Energy residual : 2.5866e-01
Energy residual : 1.4833e-01
Energy residual : 5.0433e-02
Energy residual : 7.0491e-02
Energy residual : 6.3258e-02
Energy residual : 4.8374e-02
Energy residual : 3.6016e-02
Energy residual : 3.6163e-02
Energy residual : 3.1624e-02
Energy residual : 2.6834e-02
Energy residual : 1.6281e-02
Energy residual : 1.3537e-02
Energy residual : 6.1284e-03
Energy residual : 3.8847e-03
Energy residual : 9.1916e-04
Energy residual : 4.9047e-04
Energy residual : 2.3086e-04
Energy residual : 4.0514e-04
Energy residual : 3.5866e-04
Energy residual : 3.0853e-04
Energy residual : 1.3754e-04
Energy residual : 2.2222e-04
Energy residual : 1.5146e-04
Energy residual : 1.1316e-04
Energy residual : 1.0185e-04
Energy residual : 7.0003e-05
Energy residual : 4.6342e-05
Energy residual : 2.7636e-05
Energy residual : 1.5984e-05
Energy residual : 3.3789e-06
Energy residual : 1.0235e-05
Energy residual : 5.1345e-06
Energy residual : 6.5343e-06
Energy residual : 4.0463e-06
Energy residual : 1.8893e-06
Energy residual : 4.4723e-07
Energy residual : 3.5242e-07
Energy residual : 7.1301e-07
Energy residual : 6.6343e-07
Energy residual : 5.2183e-07
Energy residual : 2.3832e-07
Energy residual : 2.5120e-07
Energy residual : 1.5266e-07
Energy residual : 1.1084e-07
Energy residual : 7.5416e-08
Energy residual : 4.2787e-08
SCF iterations converged to the specified tolerance after: 50 iterations.

Energy computations (Hartree)
-------------------
Total energy: -1673.56610057

Absolute values of ion forces (Hartree/Bohr)
--------------------------------------------------------------------------------------------
AtomId 0: 0.000820,0.001892,0.012176
AtomId 1: 0.001957,0.000000,0.000544
AtomId 2: 0.000000,0.001558,0.141588
AtomId 3: 0.000050,0.000000,0.001169
AtomId 4: 0.000591,0.001197,0.010672
AtomId 5: 0.002144,0.000000,0.000842
AtomId 6: 0.000000,0.000888,0.144485
AtomId 7: 0.000007,0.000000,0.001078
AtomId 8: 0.000820,0.001892,0.012176
AtomId 9: 0.000298,0.000000,0.001855
AtomId 10: 0.000000,0.001558,0.141588
AtomId 11: 0.000007,0.000000,0.000027
AtomId 12: 0.000591,0.001197,0.010672
AtomId 13: 0.000615,0.000000,0.002027
AtomId 14: 0.000000,0.000889,0.144485
AtomId 15: 0.000048,0.000000,0.001309
AtomId 16: 0.000820,0.001892,0.012176
AtomId 17: 0.001957,0.000000,0.000544
AtomId 18: 0.000059,0.001056,0.143329
AtomId 19: 0.000039,0.000000,0.000261
AtomId 20: 0.000591,0.001197,0.010672
AtomId 21: 0.002144,0.000000,0.000842
AtomId 22: 0.000059,0.001258,0.144065
AtomId 23: 0.000007,0.000000,0.000710
AtomId 24: 0.000820,0.001892,0.012176
AtomId 25: 0.000298,0.000000,0.001855
AtomId 26: 0.000059,0.001056,0.143329
AtomId 27: 0.000007,0.000000,0.000171
AtomId 28: 0.000591,0.001197,0.010672
AtomId 29: 0.000615,0.000000,0.002027
AtomId 30: 0.000059,0.001258,0.144065
--------------------------------------------------------------------------------------------
2 changes: 2 additions & 0 deletions testsGPU/pseudopotential/complex/jobscripts/crusher.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ srun -n 6 -c 1 ./dftfe parameterFileMg2x_6.prm > outputMg2x_6

srun -n 6 -c 1 ./dftfe parameterFileMg2x_7.prm > outputMg2x_7

srun -n 6 -c 1 ./dftfe parameterFileMg2x_8.prm > outputMg2x_8

srun -n 6 -c 1 ./dftfe parameterFileBe.prm > outputBe

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ srun -n 6 -c 7 --gpu-bind closest $BASE/dftfe parameterFileMg2x_4.prm > outputMg
srun -n 6 -c 7 --gpu-bind closest $BASE/dftfe parameterFileMg2x_5.prm > outputMg2x_5
srun -n 6 -c 7 --gpu-bind closest $BASE/dftfe parameterFileMg2x_6.prm > outputMg2x_6
srun -n 6 -c 7 --gpu-bind closest $BASE/dftfe parameterFileMg2x_7.prm > outputMg2x_7
srun -n 6 -c 7 --gpu-bind closest $BASE/dftfe parameterFileMg2x_8.prm > outputMg2x_8
srun -n 6 -c 7 --gpu-bind closest $BASE/dftfe parameterFileBe.prm > outputBe
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_4.prm > out
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_5.prm > outputMg2x_5
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_6.prm > outputMg2x_6
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_7.prm > outputMg2x_7
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_8.prm > outputMg2x_8
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileBe.prm > outputBe
2 changes: 2 additions & 0 deletions testsGPU/pseudopotential/complex/jobscripts/perlmutter.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ srun ./dftfe parameterFileMg2x_6.prm > outputMg2x_6

srun ./dftfe parameterFileMg2x_7.prm > outputMg2x_7

srun ./dftfe parameterFileMg2x_8.prm > outputMg2x_8

srun -n 6 -c 1 ./dftfe parameterFileBe.prm > outputBe

2 changes: 2 additions & 0 deletions testsGPU/pseudopotential/complex/jobscripts/summit.lsf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ jsrun --smpiargs "-gpu" -n 6 -a 1 -c 7 -g 1 -r 6 -d packed -b packed:7 ./dftfe p

jsrun --smpiargs "-gpu" -n 6 -a 1 -c 7 -g 1 -r 6 -d packed -b packed:7 ./dftfe parameterFileMg2x_7.prm > outputMg2x_7

jsrun --smpiargs "-gpu" -n 6 -a 1 -c 7 -g 1 -r 6 -d packed -b packed:7 ./dftfe parameterFileMg2x_8.prm > outputMg2x_8

jsrun --smpiargs "-gpu" -n 6 -a 1 -c 7 -g 1 -r 6 -d packed -b packed:7 ./dftfe parameterFileBe.prm > outputBe
86 changes: 86 additions & 0 deletions testsGPU/pseudopotential/complex/parameterFileMg2x_8.prm
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
set VERBOSITY = 0
set REPRODUCIBLE OUTPUT=true
set USE GPU=true
subsection GPU
set AUTO GPU BLOCK SIZES=false
set USE GPUDIRECT MPI ALL REDUCE = true
set USE ELPA GPU KERNEL=false
end

subsection Boundary conditions
set SMEARED NUCLEAR CHARGES=true
set FLOATING NUCLEAR CHARGES=true
set CONSTRAINTS FROM SERIAL DOFHANDLER = false
set CONSTRAINTS PARALLEL CHECK = false
set PERIODIC1 = true
set PERIODIC2 = true
set PERIODIC3 = true
set SELF POTENTIAL RADIUS = 3.0
set POINT WISE DIRICHLET CONSTRAINT =false
end


subsection DFT functional parameters
set EXCHANGE CORRELATION TYPE = 4
set PSEUDOPOTENTIAL CALCULATION = true
set PSEUDOPOTENTIAL FILE NAMES LIST = pseudoMg.inp
set SPIN POLARIZATION=1
set START MAGNETIZATION=0.1
end


subsection Finite element mesh parameters
set POLYNOMIAL ORDER = 3
subsection Auto mesh generation parameters
set AUTO ADAPT BASE MESH SIZE=false
set ATOM BALL RADIUS = 2.0
set BASE MESH SIZE = 4.0
set MESH SIZE AROUND ATOM = 1.0
set MESH SIZE AT ATOM = 1.0
end
end

subsection Geometry
set NATOMS=31
set NATOM TYPES=1
set ATOMIC COORDINATES FILE = coordinatesMg2x.inp
set DOMAIN VECTORS FILE = domainVectorsMg2x.inp
subsection Optimization
set ION FORCE = true
end
end

subsection Brillouin zone k point sampling options
set USE TIME REVERSAL SYMMETRY = false
subsection Monkhorst-Pack (MP) grid generation
set SAMPLING POINTS 1 = 2
set SAMPLING POINTS 2 = 1
set SAMPLING POINTS 3 = 1
set SAMPLING SHIFT 1 = 1
set SAMPLING SHIFT 2 = 0
set SAMPLING SHIFT 3 = 0
end
end


subsection Parallelization
set NPBAND=1
set NPKPT=2
end

subsection SCF parameters
set COMPUTE ENERGY EACH ITER = false
set MAXIMUM ITERATIONS = 100
set TEMPERATURE = 500
set TOLERANCE = 1e-6
set STARTING WFC=ATOMIC
set USE ENERGY RESIDUAL METRIC = true
subsection Eigen-solver parameters
set CHEBYSHEV POLYNOMIAL DEGREE = 20
set NUMBER OF KOHN-SHAM WAVEFUNCTIONS = 180
set CHEBY WFC BLOCK SIZE=90
set WFC BLOCK SIZE=90
set CHEBYSHEV FILTER TOLERANCE=1e-5
set SCALAPACKPROCS=2
end
end

0 comments on commit d711596

Please sign in to comment.