Skip to content

Commit d43af4f

Browse files
committed
fix compilation error
1 parent 5cbb091 commit d43af4f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/source_hsolver/hsolver_lcao.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ void HSolverLCAO<T, Device>::solve(hamilt::Hamilt<T>* pHamilt,
4949
if (this->method != "pexsi")
5050
{
5151
#ifdef __MPI
52+
#ifdef __CUDA
5253
if (this->method == "cusolver" && GlobalV::NPROC > 1)
5354
{
5455
this->parakSolve_cusolver(pHamilt, psi, pes);
55-
}
56-
else if (PARAM.globalv.kpar_lcao > 1
56+
}else
57+
#endif
58+
if (PARAM.globalv.kpar_lcao > 1
5759
&& (this->method == "genelpa" || this->method == "elpa" || this->method == "scalapack_gvx"))
5860
{
5961
this->parakSolve(pHamilt, psi, pes, PARAM.globalv.kpar_lcao);
@@ -302,7 +304,7 @@ void HSolverLCAO<T, Device>::parakSolve(hamilt::Hamilt<T>* pHamilt,
302304
#endif
303305
}
304306

305-
#ifdef __MPI
307+
#if defined (__MPI) && defined (__CUDA)
306308
template <typename T, typename Device>
307309
void HSolverLCAO<T, Device>::parakSolve_cusolver(hamilt::Hamilt<T>* pHamilt,
308310
psi::Psi<T>& psi,

0 commit comments

Comments
 (0)