diff --git a/include/chameleon/runtime_struct.h b/include/chameleon/runtime_struct.h index ad70f05360406b5d872843a0b93fb22327cd16e1..a5ca6e027043b2d95452cf01c9821be40f31582f 100644 --- a/include/chameleon/runtime_struct.h +++ b/include/chameleon/runtime_struct.h @@ -83,6 +83,7 @@ typedef struct runtime_option_s { int profiling; /**< Enable/Disable the profiling of the submitted tasks */ int parallel; /**< Enable/Disable the parallel version of submitted tasks */ int priority; /**< Define the submitted task priority */ + int workerid; /**< Define the prefered worker id to perform the tasks */ size_t ws_wsize; /**< Define the worker workspace size */ size_t ws_hsize; /**< Define the host workspace size for hybrid CPU/GPU kernel */ void *ws_worker; /**< Pointer to the worker workspace (structure) */ diff --git a/runtime/openmp/control/runtime_options.c b/runtime/openmp/control/runtime_options.c index 04aaca357baaa13977a9f35d29cb07be78fa9d87..ecda9a1b41b28dcb4d23caaafdcc5e9676f9824a 100644 --- a/runtime/openmp/control/runtime_options.c +++ b/runtime/openmp/control/runtime_options.c @@ -21,18 +21,19 @@ */ #include "chameleon_openmp.h" -void RUNTIME_options_init( RUNTIME_option_t *option, CHAM_context_t *chamctxt, +void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, RUNTIME_sequence_t *sequence, RUNTIME_request_t *request ) { - option->sequence = sequence; - option->request = request; - option->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; - option->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; - option->priority = RUNTIME_PRIORITY_MIN; - option->ws_wsize = 0; - option->ws_hsize = 0; - option->ws_worker = NULL; - option->ws_host = NULL; + options->sequence = sequence; + options->request = request; + options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; + options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; + options->priority = RUNTIME_PRIORITY_MIN; + options->workerid = -1; + options->ws_wsize = 0; + options->ws_hsize = 0; + options->ws_worker = NULL; + options->ws_host = NULL; return; } diff --git a/runtime/parsec/control/runtime_options.c b/runtime/parsec/control/runtime_options.c index e851318b20f0427a9741124144d420bd136f117c..0c56ead88c34e50e8c09f00ed702246686e250fa 100644 --- a/runtime/parsec/control/runtime_options.c +++ b/runtime/parsec/control/runtime_options.c @@ -27,6 +27,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; options->priority = RUNTIME_PRIORITY_MIN; + options->workerid = -1; options->ws_wsize = 0; options->ws_hsize = 0; options->ws_worker = NULL; diff --git a/runtime/quark/control/runtime_options.c b/runtime/quark/control/runtime_options.c index bab33ac075fdad9c78894b0044400485cb4a8f50..c0b2bbb2ba0b1afde6d4975a999cc97d581e7ad9 100644 --- a/runtime/quark/control/runtime_options.c +++ b/runtime/quark/control/runtime_options.c @@ -39,6 +39,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; options->priority = RUNTIME_PRIORITY_MIN; + options->workerid = -1; options->ws_wsize = 0; options->ws_hsize = 0; diff --git a/runtime/starpu/control/runtime_options.c b/runtime/starpu/control/runtime_options.c index 6687984b2d56f62bb7a8c1369bab5c3191c10405..d95cbf865413d98ac079fd0ea1e5768739e6b8b4 100644 --- a/runtime/starpu/control/runtime_options.c +++ b/runtime/starpu/control/runtime_options.c @@ -21,18 +21,20 @@ */ #include "chameleon_starpu.h" -void RUNTIME_options_init( RUNTIME_option_t *option, CHAM_context_t *chamctxt, +void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, RUNTIME_sequence_t *sequence, RUNTIME_request_t *request ) { - option->sequence = sequence; - option->request = request; - option->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; - option->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; - option->priority = RUNTIME_PRIORITY_MIN; - option->ws_wsize = 0; - option->ws_hsize = 0; - option->ws_worker = NULL; - option->ws_host = NULL; + starpu_option_request_t* schedopt = (starpu_option_request_t *)(request->schedopt); + options->sequence = sequence; + options->request = request; + options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; + options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; + options->priority = RUNTIME_PRIORITY_MIN; + options->workerid = (schedopt == NULL) ? -1 : schedopt->workerid; + options->ws_wsize = 0; + options->ws_hsize = 0; + options->ws_worker = NULL; + options->ws_host = NULL; return; }