runtime_context.c 1.7 KB
Newer Older
Mathieu Faverge's avatar
Mathieu Faverge committed
1
/**
2
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
3
 * @file parsec/runtime_context.c
Mathieu Faverge's avatar
Mathieu Faverge committed
4
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
5
 * @copyright 2012-2017 The University of Tennessee and The University of
Mathieu Faverge's avatar
Mathieu Faverge committed
6
 *                      Tennessee Research Foundation. All rights reserved.
Mathieu Faverge's avatar
Mathieu Faverge committed
7
 * @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
Mathieu Faverge's avatar
Mathieu Faverge committed
8 9
 *                      Univ. Bordeaux. All rights reserved.
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
10 11 12 13
 ***
 *
 * @brief Chameleon PaRSEC context routines
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
14 15 16 17
 * @version 1.0.0
 * @author Reazul Hoque
 * @author Mathieu Faverge
 * @date 2017-01-12
Mathieu Faverge's avatar
Mathieu Faverge committed
18
 *
19
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
20
#include <stdlib.h>
21
#include "chameleon_parsec.h"
Mathieu Faverge's avatar
Mathieu Faverge committed
22

23
/**
Mathieu Faverge's avatar
Mathieu Faverge committed
24
 *  Create new context
25
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
26
void RUNTIME_context_create( CHAM_context_t *chamctxt )
Mathieu Faverge's avatar
Mathieu Faverge committed
27 28
{
    /* In case of PaRSEC, this is done in init */
Mathieu Faverge's avatar
Mathieu Faverge committed
29
    chamctxt->scheduler = RUNTIME_SCHED_PARSEC;
Mathieu Faverge's avatar
Mathieu Faverge committed
30 31 32
    return;
}

33
/**
Mathieu Faverge's avatar
Mathieu Faverge committed
34
 *  Clean the context
35
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
36
void RUNTIME_context_destroy( CHAM_context_t *chamctxt )
Mathieu Faverge's avatar
Mathieu Faverge committed
37
{
Mathieu Faverge's avatar
Mathieu Faverge committed
38
    (void)chamctxt;
Mathieu Faverge's avatar
Mathieu Faverge committed
39 40 41
    return;
}

42
/**
Mathieu Faverge's avatar
Mathieu Faverge committed
43 44
 *
 */
45
void RUNTIME_enable( void *runtime_ctxt, int lever )
Mathieu Faverge's avatar
Mathieu Faverge committed
46 47 48
{
    switch (lever)
    {
49 50 51
    case CHAMELEON_DAG:
        fprintf(stderr, "DAG is not available with PaRSEC\n");
        break;
Mathieu Faverge's avatar
Mathieu Faverge committed
52
    case CHAMELEON_PROFILING_MODE:
53 54 55 56
        parsec_profiling_start();
        break;
    case CHAMELEON_BOUND:
        fprintf(stderr, "Bound computation is not available with Quark\n");
Mathieu Faverge's avatar
Mathieu Faverge committed
57 58 59
        break;
    default:
        return;
Mathieu Faverge's avatar
Mathieu Faverge committed
60 61 62 63
    }
    return;
}

64
/**
Mathieu Faverge's avatar
Mathieu Faverge committed
65
 *
66
 */
67
void RUNTIME_disable( void *runtime_ctxt, int lever )
Mathieu Faverge's avatar
Mathieu Faverge committed
68 69 70
{
    switch (lever)
    {
71 72 73
    case CHAMELEON_DAG:
        fprintf(stderr, "DAG is not available with PaRSEC\n");
        break;
Mathieu Faverge's avatar
Mathieu Faverge committed
74
    case CHAMELEON_PROFILING_MODE:
75 76 77 78
        parsec_profiling_stop();
        break;
    case CHAMELEON_BOUND:
        fprintf(stderr, "Bound computation is not available with PaRSEC\n");
Mathieu Faverge's avatar
Mathieu Faverge committed
79 80 81
        break;
    default:
        return;
Mathieu Faverge's avatar
Mathieu Faverge committed
82 83 84
    }
    return;
}