Skip to content

Commit 4cb4d78

Browse files
authored
Merge pull request #5381 from ye-luo/fix-spline-dump-read
Spline dump should only be read by rank 0.
2 parents ed6701b + c0bdb4c commit 4cb4d78

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/QMCWaveFunctions/BsplineFactory/HybridRepSetReader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ std::unique_ptr<SPOSet> HybridRepSetReader<SA>::create_spline_set(const std::str
148148
bool foundspline = spline_reader_.createSplineDataSpaceLookforDumpFile(bandgroup, *bspline);
149149
typename SA::HYBRIDBASE& hybrid_center_orbs = *bspline;
150150
hybrid_center_orbs.resizeStorage(bspline->myV.size());
151-
if (foundspline)
151+
if (foundspline && myComm->rank() == 0)
152152
{
153153
Timer now;
154154
hdf_archive h5f(myComm);

src/QMCWaveFunctions/BsplineFactory/SplineSetReader.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::unique_ptr<SPOSet> SplineSetReader<SA>::create_spline_set(const std::string
4242
auto bspline = std::make_unique<SA>(my_name, use_offload);
4343
app_log() << " ClassName = " << bspline->getClassName() << std::endl;
4444
bool foundspline = createSplineDataSpaceLookforDumpFile(bandgroup, *bspline);
45-
if (foundspline)
45+
if (foundspline && myComm->rank() == 0)
4646
{
4747
Timer now;
4848
hdf_archive h5f(myComm);
@@ -80,6 +80,7 @@ std::unique_ptr<SPOSet> SplineSetReader<SA>::create_spline_set(const std::string
8080
}
8181

8282
{
83+
myComm->barrier();
8384
Timer now;
8485
bspline->bcast_tables(myComm);
8586
app_log() << " Time to bcast the table = " << now.elapsed() << std::endl;

0 commit comments

Comments
 (0)