diff --git a/include/chameleon/config.h.in b/include/chameleon/config.h.in index a284fd2fd913519e07a92ee25ded2686ce2062f4..2b02d4bf4c9a08d2969bde5bd89bf0d162278112 100644 --- a/include/chameleon/config.h.in +++ b/include/chameleon/config.h.in @@ -37,6 +37,9 @@ /* Debug coreblas execution order if not provided by the runtime */ #cmakedefine CHAMELEON_KERNELS_TRACE +/* Enable multi-threaded BLAS library */ +#cmakedefine CHAMELEON_KERNELS_MT + /* Communication engine */ #cmakedefine CHAMELEON_USE_MPI #cmakedefine CHAMELEON_USE_MIGRATE diff --git a/runtime/starpu/control/runtime_control.c b/runtime/starpu/control/runtime_control.c index 72654d32ff29ba935dbcc69ac282c35ea7816fa3..5a36b8a6f0a2643f148b09b90b900b9a323caa27 100644 --- a/runtime/starpu/control/runtime_control.c +++ b/runtime/starpu/control/runtime_control.c @@ -38,7 +38,6 @@ void chameleon_starpu_parallel_worker_init( starpu_sched_opt_t *sched_opt ) if (env_pw_level != NULL) { struct starpu_parallel_worker_config *pw_config = NULL; - hwloc_obj_type_t pw_level; int pw_level_number = 1; char level[256]; @@ -46,6 +45,10 @@ void chameleon_starpu_parallel_worker_init( starpu_sched_opt_t *sched_opt ) int argc = strchr( env_pw_level, ':') == NULL ? 1 : 2; int match = sscanf( env_pw_level, "%[^:]:%d", level, &pw_level_number ); +#if !defined(CHAMELEON_KERNELS_MT) + chameleon_warning("chameleon_starpu_parallel_worker_init()", "CHAMELEON has been compiled with multi-threaded kernels disabled (-DCHAMELEON_KERNELS_MT=OFF). This won't break the execution, but you may not obtain the performance gain expected. It is recommended to recompile with -DCHAMELEON_KERNELS_MT=ON.\n"); +#endif + if ( (match != argc) || ((match == 2) && (pw_level_number < 0) ) ) {