Mentions légales du service

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

Merge branch 'issue49' into 'master'

Issue49 - Restore DAG support for Quark

Closes #49

See merge request solverstack/chameleon!146
parents 4ea65e38 d33762a4
No related branches found
No related tags found
1 merge request!146Issue49 - Restore DAG support for Quark
......@@ -51,10 +51,12 @@ void chameleon_warning(const char *func_name, const char *msg_text)
CHAM_context_t *chamctxt;
chamctxt = chameleon_context_self();
if (chamctxt == NULL)
if (chamctxt == NULL) {
chameleon_fatal_error("chameleon_warning", "CHAMELEON not initialized");
if (chamctxt->warnings_enabled)
}
if (chamctxt->warnings_enabled) {
fprintf(stderr, "CHAMELEON WARNING: %s(): %s\n", func_name, msg_text);
}
}
/**
......
......@@ -168,7 +168,7 @@ int CHAMELEON_Enable(int option)
}
/* Enable at the lower level if required */
RUNTIME_enable( option );
RUNTIME_enable( chamctxt->schedopt, option );
return CHAMELEON_SUCCESS;
}
......@@ -231,7 +231,7 @@ int CHAMELEON_Disable(int option)
}
/* Disable at the lower level if required */
RUNTIME_disable( option );
RUNTIME_disable( chamctxt->schedopt, option );
return CHAMELEON_SUCCESS;
}
......
......@@ -58,21 +58,27 @@ RUNTIME_context_destroy( CHAM_context_t *ctxt );
* @brief Enable a global option of the runtime.
* @warning Should be called only by CHAMELEON_Enable()
*
* @param[in] runtime_ctxt
* Pointer to the runtime data structure
*
* @param[in] option
* @arg CHAMELEON_PROFILING_MODE: start the profiling mode of the runtime.
*/
void
RUNTIME_enable( int option );
RUNTIME_enable( void *runtime_ctxt, int option );
/**
* @brief Disable a global option of the runtime.
* @warning Should be called only by CHAMELEON_Disable()
*
* @param[in] runtime_ctxt
* Pointer to the runtime data structure
*
* @param[in] option
* @arg CHAMELEON_PROFILING_MODE: stop the profiling mode of the runtime.
*/
void
RUNTIME_disable( int option );
RUNTIME_disable( void *runtime_ctxt, int option );
/**
* @}
......
......@@ -42,18 +42,21 @@ void RUNTIME_context_destroy( CHAM_context_t *chamctxt )
/**
*
*/
void RUNTIME_enable( int lever )
void RUNTIME_enable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with OpenMP\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with OpenMP\n");
break;
default:
return;
case CHAMELEON_DAG:
fprintf(stderr, "DAG is not available with OpenMP\n");
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with OpenMP\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with OpenMP\n");
break;
default:
return;
}
return;
}
......@@ -61,18 +64,21 @@ void RUNTIME_enable( int lever )
/**
*
*/
void RUNTIME_disable( int lever )
void RUNTIME_disable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with OpenMP\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with OpenMP\n");
break;
default:
return;
case CHAMELEON_DAG:
fprintf(stderr, "DAG is not available with OpenMP\n");
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with OpenMP\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with OpenMP\n");
break;
default:
return;
}
return;
}
......@@ -42,11 +42,19 @@ void RUNTIME_context_destroy( CHAM_context_t *chamctxt )
/**
*
*/
void RUNTIME_enable(int lever)
void RUNTIME_enable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_DAG:
fprintf(stderr, "DAG is not available with PaRSEC\n");
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with PaRSEC\n");
//parsec_profiling_start();
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with Quark\n");
break;
default:
return;
......@@ -57,11 +65,19 @@ void RUNTIME_enable(int lever)
/**
*
*/
void RUNTIME_disable(int lever)
void RUNTIME_disable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_DAG:
fprintf(stderr, "DAG is not available with PaRSEC\n");
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with PaRSEC\n");
//parsec_profiling_stop();
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with PaRSEC\n");
break;
default:
return;
......
......@@ -42,18 +42,22 @@ void RUNTIME_context_destroy( CHAM_context_t *chamctxt )
/**
*
*/
void RUNTIME_enable( int lever )
void RUNTIME_enable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with Quark\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with Quark\n");
break;
default:
return;
case CHAMELEON_DAG:
QUARK_Barrier( runtime_ctxt );
QUARK_DOT_DAG_Enable( runtime_ctxt, 1 );
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with Quark\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with Quark\n");
break;
default:
return;
}
return;
}
......@@ -61,18 +65,22 @@ void RUNTIME_enable( int lever )
/**
*
*/
void RUNTIME_disable( int lever )
void RUNTIME_disable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with Quark\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with Quark\n");
break;
default:
return;
case CHAMELEON_DAG:
QUARK_Barrier( runtime_ctxt );
QUARK_DOT_DAG_Enable( runtime_ctxt, 0 );
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with Quark\n");
break;
case CHAMELEON_BOUND:
fprintf(stderr, "Bound computation is not available with Quark\n");
break;
default:
return;
}
return;
}
......@@ -69,18 +69,21 @@ void RUNTIME_context_destroy( CHAM_context_t *chamctxt )
/**
*
*/
void RUNTIME_enable( int lever )
void RUNTIME_enable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_PROFILING_MODE:
starpu_profiling_status_set(STARPU_PROFILING_ENABLE);
break;
case CHAMELEON_BOUND:
starpu_bound_start(0, 0);
break;
default:
return;
case CHAMELEON_DAG:
fprintf(stderr, "StarPU is providing DAG generation through tracing support (CHAMELEON_PROFILING_MODE)\n");
break;
case CHAMELEON_PROFILING_MODE:
starpu_profiling_status_set(STARPU_PROFILING_ENABLE);
break;
case CHAMELEON_BOUND:
starpu_bound_start(0, 0);
break;
default:
return;
}
return;
}
......@@ -88,18 +91,21 @@ void RUNTIME_enable( int lever )
/**
*
*/
void RUNTIME_disable( int lever )
void RUNTIME_disable( void *runtime_ctxt, int lever )
{
switch (lever)
{
case CHAMELEON_PROFILING_MODE:
starpu_profiling_status_set(STARPU_PROFILING_DISABLE);
break;
case CHAMELEON_BOUND:
starpu_bound_stop();
break;
default:
return;
case CHAMELEON_DAG:
fprintf(stderr, "StarPU is providing DAG generation through tracing support (CHAMELEON_PROFILING_MODE)\n");
break;
case CHAMELEON_PROFILING_MODE:
starpu_profiling_status_set(STARPU_PROFILING_DISABLE);
break;
case CHAMELEON_BOUND:
starpu_bound_stop();
break;
default:
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