Skip to content

Commit

Permalink
relion_convert_to_tiff: improve parallelization with
Browse files Browse the repository at this point in the history
--only_do_unfinished (fix the issue #985)
  • Loading branch information
biochem-fan committed Sep 19, 2023
1 parent 0b03a6f commit dd10f8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tiff_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ void TIFFConverter::initialise(int _rank, int _total_ranks)
fn_first = fn_in;
}

// Shuffle the input list so that (almost) all MPI processes get new movies
if (do_estimate || total_ranks > 1)
MD.randomiseOrder();

if (fn_first.getExtension() != "mrc" && fn_first.getExtension() != "mrcs" && !EERRenderer::isEER(fn_first))
REPORT_ERROR(fn_first + ": the input must be MRC, MRCS or EER files");

Expand Down Expand Up @@ -392,9 +396,6 @@ void TIFFConverter::initialise(int _rank, int _total_ranks)
}
else
{
if (do_estimate)
MD.randomiseOrder();

// Check type and mode of the input
Image<RFLOAT> Ihead;
Ihead.read(fn_first, false, -1, false, true); // select_img -1, mmap false, is_2D true
Expand Down

0 comments on commit dd10f8a

Please sign in to comment.