* If the value is greater than 1, the thread support must be enabled.
*
* \param nb_threads the number of threads to use
*/
XBT_INLINE void SIMIX_context_set_nthreads(int nb_threads) {
* If the value is greater than 1, the thread support must be enabled.
*
* \param nb_threads the number of threads to use
*/
XBT_INLINE void SIMIX_context_set_nthreads(int nb_threads) {
- xbt_assert(nb_threads > 0, "Invalid number of parallel threads: %d", nb_threads);
-
+ if (nb_threads<=0) {
+ nb_threads = xbt_os_get_numcores();
+ XBT_INFO("Auto-setting contexts/nthreads to %d",nb_threads);
+ }
+