Skip to content

Commit

Permalink
Refs #10330. Only use openmp optimized sort when openmp is present
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsteve committed Oct 17, 2014
1 parent 18f4fcc commit c389d08
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/DataObjects/src/EventWorkspace.cpp
Expand Up @@ -926,6 +926,7 @@ namespace Mantid
size_t howManyCores = 1;
// And auto-detect how many threads
size_t howManyThreads = 0;
#ifdef _OPENMP
if (m_noVectors < num_threads * 10)
{
// If you have few vectors, sort with 2 cores.
Expand All @@ -940,6 +941,7 @@ namespace Mantid
howManyCores = 4;
howManyThreads = num_threads / 4 + 1;
}
#endif
g_log.debug() << "Performing sort with " << howManyCores << " cores per EventList, in "
<< howManyThreads << " threads, using a chunk size of " << chunk_size << ".\n";

Expand Down

0 comments on commit c389d08

Please sign in to comment.