Skip to content

Commit

Permalink
Refine3D: don't allow Refine3D on even number of MPI processes.
Browse files Browse the repository at this point in the history
This caused 'loss' of some particles in half1 and resulted in empty groups
due to a bug in "if ((node->size - 1)/nr_halfsets > 1)" logic.
Don't know how to fix the logic yet, so disable such operation.
  • Loading branch information
biochem-fan committed Aug 7, 2019
1 parent 5f12461 commit cc07023
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ml_optimiser_mpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,15 @@ will still yield good performance and possibly a more stable execution. \n" << s
void MlOptimiserMpi::initialiseWorkLoad()
{

if (do_split_random_halves && node->size <= 2)
REPORT_ERROR("MlOptimiserMpi::initialiseWorkLoad: at least 3 MPI processes are required when splitting data into random halves");
else if(node->size <= 1)
REPORT_ERROR("MlOptimiserMpi::initialiseWorkLoad: at least 2 MPI processes are required, otherwise use the sequential program");
if (do_split_random_halves)
{
if (node->size <= 2)
REPORT_ERROR("MlOptimiserMpi::initialiseWorkLoad: at least 3 MPI processes are required when splitting data into random halves");
if (node->size % 2 == 0)
REPORT_ERROR("MlOptimiserMpi::initialiseWorkLoad: the number of MPI processes must be an odd number when gold-standard seperation is applied.");
}
else if (node->size <= 1)
REPORT_ERROR("MlOptimiserMpi::initialiseWorkLoad: at least 2 MPI processes are required, otherwise use the sequential program");

// Get the same random number generator seed for all mpi nodes
if (random_seed == -1)
Expand Down

0 comments on commit cc07023

Please sign in to comment.