Skip to content

Commit

Permalink
Fixed a bug where the program hangs if the heating parameters aren't …
Browse files Browse the repository at this point in the history
…specified while running in parallel
  • Loading branch information
Arun Sethuraman committed Aug 4, 2016
1 parent 42d3592 commit a4b042f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ima_main_mpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,16 @@ no flag is followed by nothing
}
}

//AS: Jared Knoblauch caught a bug here - if the numprocessors > 1, and heating parameters aren't specified
//the program hangs. Fixing this Thu Aug 4 13:40:59 EDT 2016
#ifdef MPI_ENABLED
if (numprocesses > 1) {
if (Hnp == 0)
IM_err (IMERR_COMMANDLINEHEATINGTERMS, "no -hn flag specified despite attempting to run on %d processors", numprocesses);
if (Hnp == 1 && Hfp == 0)
IM_err (IMERR_COMMANDLINEHEATINGTERMS, "no -heating mode specified");
}
#endif
/* Check if command line options are compatible with single population. */
if (infilename==0)
IM_err (IMERR_READFILEOPENFAIL, "pointer to input file not set, check -i on command line");
Expand Down

0 comments on commit a4b042f

Please sign in to comment.