Commit ed38913c authored by Mathieu Faverge's avatar Mathieu Faverge

Merge branch 'issue49' into 'master'

Issue49 - Restore DAG support for Quark

Closes #49

See merge request solverstack/chameleon!146
parents 4ea65e38 d33762a4
......@@ -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,10 +42,13 @@ 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 OpenMP\n");
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with OpenMP\n");
break;
......@@ -61,10 +64,13 @@ 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 OpenMP\n");
break;
case CHAMELEON_PROFILING_MODE:
fprintf(stderr, "Profiling is not available with OpenMP\n");
break;
......
......@@ -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,10 +42,14 @@ 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:
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;
......@@ -61,10 +65,14 @@ void RUNTIME_enable( int lever )
/**
*
*/
void RUNTIME_disable( int lever )
void RUNTIME_disable( void *runtime_ctxt, int lever )
{
switch (lever)
{
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;
......
......@@ -69,10 +69,13 @@ 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, "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;
......@@ -88,10 +91,13 @@ 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, "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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment