Skip to content

Commit

Permalink
another OpenMP tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Jul 29, 2023
1 parent 889b68d commit a2ae555
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/chromosome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void Chromosome::ChooseMutationRunLayout(int p_preferred_count)
}
else
{
// The number of threads does not equal gEidosMaxThreads, so we have p_preferred_count mutruns sections of length 1
// The number of threads does not equal gEidosMaxThreads, so we have p_preferred_count mutruns sections, each containing 1 mutrun
mutrun_count_base_ = p_preferred_count;
mutrun_count_multiplier_ = 1;
}
Expand Down Expand Up @@ -461,9 +461,7 @@ void Chromosome::ChooseMutationRunLayout(int p_preferred_count)
last_position_mutrun_ = mutrun_count_ * mutrun_length_ - 1;

// Consistency check
if (((mutrun_length_ < 1) && species_.HasGenetics()) || (mutrun_count_ * mutrun_length_ <= last_position_))
EIDOS_TERMINATION << "ERROR (Chromosome::ChooseMutationRunLayout): (internal error) math error in mutation run calculations." << EidosTerminate();
if (last_position_mutrun_ < last_position_)
if (((mutrun_length_ < 1) && species_.HasGenetics()) || (mutrun_count_ * mutrun_length_ <= last_position_) || (last_position_mutrun_ < last_position_))
EIDOS_TERMINATION << "ERROR (Chromosome::ChooseMutationRunLayout): (internal error) math error in mutation run calculations." << EidosTerminate();
}

Expand Down

0 comments on commit a2ae555

Please sign in to comment.