Skip to content

Commit 79fae46

Browse files
committed
fix compile without mpi
1 parent b5264df commit 79fae46

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,9 @@ void ESolver_KS_PW<T, Device>::update_pot(const int istep, const int iter)
441441
}
442442
this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell);
443443
this->pelec->f_en.descf = this->pelec->cal_delta_escf();
444+
#ifdef __MPI
444445
MPI_Bcast(&(this->pelec->f_en.descf), 1, MPI_DOUBLE, 0, PARAPW_WORLD);
446+
#endif
445447
}
446448
else
447449
{

source/module_esolver/esolver_sdft_pw.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ void ESolver_SDFT_PW<Device>::hamilt2density(int istep, int iter, double ethr)
235235
}
236236
#endif
237237
}
238+
#ifdef __MPI
238239
MPI_Bcast(&(this->pelec->f_en.deband), 1, MPI_DOUBLE, 0, PARAPW_WORLD);
240+
#endif
239241
}
240242

241243
template <typename Device>

0 commit comments

Comments
 (0)