Skip to content

Commit

Permalink
Merged in atomWfcBugFix2 (pull request #598)
Browse files Browse the repository at this point in the history
AtomWfcBugFix2

Approved-by: Sambit Das
  • Loading branch information
phanimotamarri committed Jun 14, 2024
2 parents e7930ab + f612e23 commit 3bbb541
Show file tree
Hide file tree
Showing 12 changed files with 460 additions and 437 deletions.
23 changes: 18 additions & 5 deletions src/dft/psiInitialGuess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,24 @@ namespace dftfe
l);
else if (d_dftParamsPtr->isPseudopotential &&
!d_dftParamsPtr->pseudoTestsFlag)
strcpy(psiFile,
(d_dftfeScratchFolderName + "/z" + std::to_string(Z) + "/" +
"psi" + std::to_string(n) + std::to_string(l) + ".inp")
.c_str());
{
strcpy(psiFile,
(d_dftfeScratchFolderName + "/z" + std::to_string(Z) + "/" +
"psi" + std::to_string(n) + std::to_string(l) + ".inp")
.c_str());
std::vector<std::vector<double>> values;
fileReadFlag = dftUtils::readPsiFile(2, values, psiFile);
if (fileReadFlag == 0)
{
sprintf(
psiFile,
"%s/data/electronicStructure/pseudoPotential/z%u/singleAtomData/psi%u%u.inp",
DFTFE_PATH,
Z,
n,
l);
}
}
else
sprintf(
psiFile,
Expand All @@ -81,7 +95,6 @@ namespace dftfe
l);

std::vector<std::vector<double>> values;

fileReadFlag = dftUtils::readPsiFile(2, values, psiFile);

const double truncationTol =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ Absolute value of cell stress (Hartree/Bohr^3)
------------------------------------------------------------------------
0.000872 0.000474 0.000010
0.000475 0.000483 0.000484
0.000008 0.000487 0.002195
0.000008 0.000486 0.002195
------------------------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ echo "Number of Nodes Allocated = $SLURM_JOB_NUM_NODES"
echo "Number of Tasks Allocated = $SLURM_NTASKS"
echo "Number of Cores/Task Allocated = $SLURM_CPUS_PER_TASK"

module load gcc9.2 cmake3.19 cuda11gcc9.2 mkl/2021.2.0 openmpicuda11
. /shared/spack/share/spack/setup-env.sh ###--- For bash Shell
spack load [email protected] [email protected] [email protected] intel-oneapi-mkl@2022 cmake%[email protected] gmake%[email protected] ninja openmpi%[email protected] [email protected]%[email protected] p4est ^openmpi

# export DFTFE_PATH=/home/nikhilk/dftfe/chebFiltSP/build/release/complex/
export DFTFE_PATH=/home/nikhilk/dftfe/energyResidual/build/release/complex
export UCX_LOG_LEVEL=ERROR
export OMP_NUM_THREADS=1
export DFTFE_NUM_THREADS=1
export DEAL_II_NUM_THREADS=1
export ELPA_DEFAULT_omp_threads=1

srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_1.prm > outputMg2x_1
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_2.prm > outputMg2x_2
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_3.prm > outputMg2x_3
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_4.prm > outputMg2x_4
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_5.prm > outputMg2x_5
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_6.prm > outputMg2x_6
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileMg2x_7.prm > outputMg2x_7
srun -n $SLURM_NTASKS --mpi=pmi2 ./dftfe parameterFileBe.prm > outputBe

srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_1.prm > outputMg2x_1
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_2.prm > outputMg2x_2
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_3.prm > outputMg2x_3
srun -n $SLURM_NTASKS --mpi=pmi2 $DFTFE_PATH/dftfe parameterFileMg2x_4.prm > outputMg2x_4
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 parameterFileBe.prm > outputBe
16 changes: 8 additions & 8 deletions testsGPU/pseudopotential/real/accuracyBenchmarks/outputMg2x_14
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,31 @@ Energy computations (Hartree)

Absolute values of ion forces (Hartree/Bohr)
--------------------------------------------------------------------------------------------
AtomId 0: 0.001805,0.001878,0.013126
AtomId 0: 0.001805,0.001878,0.013127
AtomId 1: 0.002319,0.000000,0.003373
AtomId 2: 0.000233,0.001707,0.140373
AtomId 3: 0.000194,0.000000,0.004429
AtomId 4: 0.001175,0.001333,0.013673
AtomId 5: 0.001964,0.000000,0.000305
AtomId 6: 0.000233,0.000011,0.138744
AtomId 6: 0.000233,0.000011,0.138745
AtomId 7: 0.000191,0.000000,0.000954
AtomId 8: 0.001805,0.001877,0.013126
AtomId 9: 0.003732,0.000000,0.001505
AtomId 10: 0.000233,0.001707,0.140373
AtomId 8: 0.001805,0.001877,0.013127
AtomId 9: 0.003733,0.000000,0.001505
AtomId 10: 0.000233,0.001708,0.140373
AtomId 11: 0.000192,0.000000,0.000588
AtomId 12: 0.001175,0.001333,0.013673
AtomId 13: 0.000157,0.000000,0.001220
AtomId 14: 0.000233,0.000011,0.138744
AtomId 14: 0.000233,0.000012,0.138745
AtomId 15: 0.000004,0.000000,0.001199
AtomId 16: 0.001805,0.001878,0.013126
AtomId 16: 0.001805,0.001878,0.013127
AtomId 17: 0.002319,0.000000,0.003373
AtomId 18: 0.000000,0.001220,0.140761
AtomId 19: 0.000096,0.000000,0.000014
AtomId 20: 0.001175,0.001333,0.013673
AtomId 21: 0.001964,0.000000,0.000305
AtomId 22: 0.000000,0.002938,0.140140
AtomId 23: 0.000093,0.000000,0.004499
AtomId 24: 0.001805,0.001877,0.013126
AtomId 24: 0.001805,0.001877,0.013127
AtomId 25: 0.003732,0.000000,0.001505
AtomId 26: 0.000000,0.001220,0.140761
AtomId 27: 0.000000,0.000000,0.000041
Expand Down
18 changes: 9 additions & 9 deletions testsGPU/pseudopotential/real/accuracyBenchmarks/outputMg2x_15
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,31 @@ Energy computations (Hartree)

Absolute values of ion forces (Hartree/Bohr)
--------------------------------------------------------------------------------------------
AtomId 0: 0.001805,0.001878,0.013126
AtomId 0: 0.001805,0.001878,0.013127
AtomId 1: 0.002319,0.000000,0.003373
AtomId 2: 0.000233,0.001707,0.140373
AtomId 3: 0.000194,0.000000,0.004429
AtomId 4: 0.001175,0.001333,0.013673
AtomId 5: 0.001964,0.000000,0.000305
AtomId 6: 0.000233,0.000011,0.138744
AtomId 6: 0.000233,0.000011,0.138745
AtomId 7: 0.000191,0.000000,0.000954
AtomId 8: 0.001805,0.001877,0.013126
AtomId 9: 0.003732,0.000000,0.001505
AtomId 10: 0.000233,0.001707,0.140373
AtomId 8: 0.001805,0.001877,0.013127
AtomId 9: 0.003733,0.000000,0.001505
AtomId 10: 0.000233,0.001708,0.140373
AtomId 11: 0.000192,0.000000,0.000588
AtomId 12: 0.001175,0.001333,0.013673
AtomId 13: 0.000157,0.000000,0.001220
AtomId 14: 0.000233,0.000011,0.138744
AtomId 14: 0.000233,0.000012,0.138745
AtomId 15: 0.000004,0.000000,0.001199
AtomId 16: 0.001805,0.001878,0.013126
AtomId 16: 0.001805,0.001878,0.013127
AtomId 17: 0.002319,0.000000,0.003373
AtomId 18: 0.000000,0.001220,0.140761
AtomId 19: 0.000096,0.000000,0.000014
AtomId 20: 0.001175,0.001333,0.013673
AtomId 21: 0.001964,0.000000,0.000305
AtomId 21: 0.001965,0.000000,0.000305
AtomId 22: 0.000000,0.002938,0.140140
AtomId 23: 0.000093,0.000000,0.004499
AtomId 24: 0.001805,0.001877,0.013126
AtomId 24: 0.001805,0.001877,0.013127
AtomId 25: 0.003732,0.000000,0.001505
AtomId 26: 0.000000,0.001220,0.140761
AtomId 27: 0.000000,0.000000,0.000041
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Reading initial guess for electron-density.....
Pseudopotential initalization....

Starting SCF iterations....
SCF iterations converged to the specified tolerance after: 27 iterations.
SCF iterations converged to the specified tolerance after: 26 iterations.

Energy computations (Hartree)
-------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Reading initial guess for electron-density.....
Pseudopotential initalization....

Starting SCF iterations....
SCF iterations converged to the specified tolerance after: 26 iterations.
SCF iterations converged to the specified tolerance after: 27 iterations.

Energy computations (Hartree)
-------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Reading initial guess for electron-density.....
Pseudopotential initalization....

Starting SCF iterations....
SCF iterations converged to the specified tolerance after: 9 iterations.
SCF iterations converged to the specified tolerance after: 10 iterations.

Energy computations (Hartree)
-------------------
Expand Down
Loading

0 comments on commit 3bbb541

Please sign in to comment.