You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Witnessed when working with WISH data on both my Mac (2 cores) and PC (12 cores). In the former case it crashes (100% of the time) when MultiThreaded.MaxCores is 3 or greater, in the latter case if it's 14 or more.
MultiThreaded.MaxCores is used in Mantid to call the OpenMP omp_set_num_threads directive. In principle, it should be possible to have more threads than cores, so I don't know why it suddenly crashes when this threshold is breached when we've never (afaik) seen a problem in this part of the code otherwise. One suggestion has been whether it's to do with the stack size, but a quick play with setting the OMP_STACKSIZE environment variable had no apparent effect.
The obvious and easy solution is to prevent the setting of the number of threads to greater than the number of processors.
Linux stack trace:
boost::detail::sp_counted_base::use_count() at sp_counted_base_gcc_x86.hpp:165 0x997c20
boost::detail::shared_count::use_count() at shared_count.hpp:269 0x997c4d
boost::detail::shared_count::unique() at shared_count.hpp:274 0x7ffff7c2d5fa
boost::shared_ptr`<Mantid::Geometry::Detector>`::unique() at shared_ptr.hpp:432 0x7ffff755bbd4
Mantid::Geometry::ComponentPool`<Mantid::Geometry::Detector>`::getIndexInCache() at ParComponentFactory.cpp:78 0x7ffff755b2ac
Mantid::Geometry::ComponentPool`<Mantid::Geometry::Detector>`::create() at ParComponentFactory.cpp:46 0x7ffff755ab96
Mantid::Geometry::ParComponentFactory::createDetector() at ParComponentFactory.cpp:118 0x7ffff755a1de
Mantid::Geometry::Instrument::getDetector() at Instrument.cpp:412 0x7ffff74ef755
Mantid::Geometry::Instrument::getDetectors() at Instrument.cpp:481 0x7ffff74efe7c
Mantid::API::MatrixWorkspace::getDetector() at MatrixWorkspace.cpp:734 0x7ffff6f9ead5
Mantid::Algorithms::ConvertUnits::convertViaTOF() at ConvertUnits.cpp:422 0x7fffdeaa4685
Original Reporter: Russell Taylor
Witnessed when working with WISH data on both my Mac (2 cores) and PC (12 cores). In the former case it crashes (100% of the time) when MultiThreaded.MaxCores is 3 or greater, in the latter case if it's 14 or more.
MultiThreaded.MaxCores is used in Mantid to call the OpenMP omp_set_num_threads directive. In principle, it should be possible to have more threads than cores, so I don't know why it suddenly crashes when this threshold is breached when we've never (afaik) seen a problem in this part of the code otherwise. One suggestion has been whether it's to do with the stack size, but a quick play with setting the OMP_STACKSIZE environment variable had no apparent effect.
The obvious and easy solution is to prevent the setting of the number of threads to greater than the number of processors.
Linux stack trace:
Mac stack trace:
The text was updated successfully, but these errors were encountered: