Skip to content

Commit 1ade02f

Browse files
committed
add write_eig_occ
1 parent ad8320b commit 1ade02f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/source_io/write_eig_occ.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "source_base/global_variable.h"
66
#include "source_base/timer.h"
77
#include "source_base/parallel_comm.h" // use POOL_WORLD
8+
#include "source_base/parallel_reduce.h"
89

910
#ifdef __MPI
1011
#include <mpi.h> // use MPI_Barrier
@@ -190,10 +191,7 @@ void ModuleIO::write_eig_file(const ModuleBase::matrix &ekb,
190191
}
191192
}
192193
}
193-
194-
#ifdef __MPI
195-
MPI_Allreduce(MPI_IN_PLACE, &wrong, 1, MPI_C_BOOL, MPI_LOR, MPI_COMM_WORLD);
196-
#endif
194+
Parallel_Reduce::gather_or_bool_all(wrong);
197195
if (wrong)
198196
{
199197
ModuleBase::WARNING_QUIT("ModuleIO::write_eig_file", "Eigenvalues are too large!");

0 commit comments

Comments
 (0)