Skip to content

Commit

Permalink
Merged in vselfGPUSolveOption (pull request #574)
Browse files Browse the repository at this point in the history
VSelf GPU parameter

Approved-by: Sambit Das
Approved-by: Phani Motamarri
  • Loading branch information
knikhil1995 committed Mar 16, 2024
2 parents 1b324ea + de22a49 commit aabbd5a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/dftParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace dftfe
maxLinearSolverIterationsHelmholtz;

bool poissonGPU;
bool vselfGPU;
std::string modelXCInputFile;

double radiusAtomBall, mixingParameter;
Expand Down
2 changes: 1 addition & 1 deletion src/dft/dft.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ namespace dftfe
computing_timer.enter_subsection("Nuclear self-potential solve");
computingTimerStandard.enter_subsection("Nuclear self-potential solve");
#ifdef DFTFE_WITH_DEVICE
if (d_dftParamsPtr->useDevice and false)
if (d_dftParamsPtr->useDevice and d_dftParamsPtr->vselfGPU)
d_vselfBinsManager.solveVselfInBinsDevice(
d_basisOperationsPtrElectroHost,
d_baseDofHandlerIndexElectro,
Expand Down
2 changes: 1 addition & 1 deletion src/dft/solveNSCF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace dftfe
computing_timer.enter_subsection("Nuclear self-potential solve");
computingTimerStandard.enter_subsection("Nuclear self-potential solve");
#ifdef DFTFE_WITH_DEVICE
if (d_dftParamsPtr->useDevice and false)
if (d_dftParamsPtr->useDevice and d_dftParamsPtr->vselfGPU)
d_vselfBinsManager.solveVselfInBinsDevice(
d_basisOperationsPtrElectroHost,
d_baseDofHandlerIndexElectro,
Expand Down
6 changes: 6 additions & 0 deletions utils/dftParameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,11 @@ namespace dftfe
"false",
dealii::Patterns::Bool(),
"[Advanced] Toggle GPU MODE in Poisson solve.");

prm.declare_entry("VSELF GPU MODE",
"false",
dealii::Patterns::Bool(),
"[Advanced] Toggle GPU MODE in vself Poisson solve.");
}
prm.leave_subsection();

Expand Down Expand Up @@ -1613,6 +1618,7 @@ namespace dftfe
maxLinearSolverIterations = prm.get_integer("MAXIMUM ITERATIONS");
absLinearSolverTolerance = prm.get_double("TOLERANCE");
poissonGPU = prm.get_bool("GPU MODE");
vselfGPU = prm.get_bool("VSELF GPU MODE");
}
prm.leave_subsection();

Expand Down

0 comments on commit aabbd5a

Please sign in to comment.