Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 17e32254 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

options: add the workerid and node fields to the options to defibetter map the tasks

parent 04b62ec2
No related branches found
No related tags found
1 merge request!274Add the possibility to change the workerid through options.
...@@ -83,6 +83,7 @@ typedef struct runtime_option_s { ...@@ -83,6 +83,7 @@ typedef struct runtime_option_s {
int profiling; /**< Enable/Disable the profiling of the submitted tasks */ int profiling; /**< Enable/Disable the profiling of the submitted tasks */
int parallel; /**< Enable/Disable the parallel version of submitted tasks */ int parallel; /**< Enable/Disable the parallel version of submitted tasks */
int priority; /**< Define the submitted task priority */ 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_wsize; /**< Define the worker workspace size */
size_t ws_hsize; /**< Define the host workspace size for hybrid CPU/GPU kernel */ size_t ws_hsize; /**< Define the host workspace size for hybrid CPU/GPU kernel */
void *ws_worker; /**< Pointer to the worker workspace (structure) */ void *ws_worker; /**< Pointer to the worker workspace (structure) */
......
...@@ -21,18 +21,19 @@ ...@@ -21,18 +21,19 @@
*/ */
#include "chameleon_openmp.h" #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 ) RUNTIME_sequence_t *sequence, RUNTIME_request_t *request )
{ {
option->sequence = sequence; options->sequence = sequence;
option->request = request; options->request = request;
option->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE;
option->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE;
option->priority = RUNTIME_PRIORITY_MIN; options->priority = RUNTIME_PRIORITY_MIN;
option->ws_wsize = 0; options->workerid = -1;
option->ws_hsize = 0; options->ws_wsize = 0;
option->ws_worker = NULL; options->ws_hsize = 0;
option->ws_host = NULL; options->ws_worker = NULL;
options->ws_host = NULL;
return; return;
} }
......
...@@ -27,6 +27,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, ...@@ -27,6 +27,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt,
options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE;
options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE;
options->priority = RUNTIME_PRIORITY_MIN; options->priority = RUNTIME_PRIORITY_MIN;
options->workerid = -1;
options->ws_wsize = 0; options->ws_wsize = 0;
options->ws_hsize = 0; options->ws_hsize = 0;
options->ws_worker = NULL; options->ws_worker = NULL;
......
...@@ -39,6 +39,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt, ...@@ -39,6 +39,7 @@ void RUNTIME_options_init( RUNTIME_option_t *options, CHAM_context_t *chamctxt,
options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE;
options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE;
options->priority = RUNTIME_PRIORITY_MIN; options->priority = RUNTIME_PRIORITY_MIN;
options->workerid = -1;
options->ws_wsize = 0; options->ws_wsize = 0;
options->ws_hsize = 0; options->ws_hsize = 0;
......
...@@ -21,18 +21,20 @@ ...@@ -21,18 +21,20 @@
*/ */
#include "chameleon_starpu.h" #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 ) RUNTIME_sequence_t *sequence, RUNTIME_request_t *request )
{ {
option->sequence = sequence; starpu_option_request_t* schedopt = (starpu_option_request_t *)(request->schedopt);
option->request = request; options->sequence = sequence;
option->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE; options->request = request;
option->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE; options->profiling = CHAMELEON_PROFILING == CHAMELEON_TRUE;
option->priority = RUNTIME_PRIORITY_MIN; options->parallel = CHAMELEON_PARALLEL == CHAMELEON_TRUE;
option->ws_wsize = 0; options->priority = RUNTIME_PRIORITY_MIN;
option->ws_hsize = 0; options->workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
option->ws_worker = NULL; options->ws_wsize = 0;
option->ws_host = NULL; options->ws_hsize = 0;
options->ws_worker = NULL;
options->ws_host = NULL;
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment