Commit 5dc364ef authored by Mathieu Faverge's avatar Mathieu Faverge

Merge branch 'feature-openmp' into 'master'

Add OpenMP support for shared memory systems

See merge request !108
parents 1f74f316 195a1bf8
......@@ -93,6 +93,18 @@ build_parsec:
BUILD_OPTIONS: "-DCHAMELEON_SCHED=PARSEC"
VERSION: parsec
build_openmp:
<<: *build_script
artifacts:
name: build_openmp
expire_in: 48 hours
paths:
- build
- chameleon_openmp.log
variables:
BUILD_OPTIONS: "-DCHAMELEON_SCHED=OPENMP"
VERSION: openmp
test_starpu_branches:
<<: *test_script
variables:
......@@ -239,6 +251,42 @@ test_parsec_master:
only:
- master@solverstack/chameleon
test_openmp_branches:
<<: *test_script
variables:
TESTS_RESTRICTION: "-R \"test_shm_s|test_mpi_s\""
VERSION: openmp
dependencies:
- build_openmp
artifacts:
name: test_openmp
expire_in: 48 hours
paths:
- build
- chameleon_openmp.log
- chameleon_openmp.lcov
only:
- branches
except:
- master
test_openmp_master:
<<: *test_script
variables:
TESTS_RESTRICTION: "-R \"_shm_|_mpi_\""
VERSION: openmp
dependencies:
- build_openmp
artifacts:
name: test_openmp
expire_in: 48 hours
paths:
- build
- chameleon_openmp.log
- chameleon_openmp.lcov
only:
- master@solverstack/chameleon
coverage:
stage: analyse
dependencies:
......@@ -246,11 +294,13 @@ coverage:
- test_starpu_simgrid_branches
- test_quark_branches
- test_parsec_branches
- test_openmp_branches
script:
- lcov -a chameleon_starpu.lcov
-a chameleon_starpu_simgrid.lcov
-a chameleon_quark.lcov
-a chameleon_parsec.lcov
-a chameleon_openmp.lcov
-o chameleon.lcov
- lcov --summary chameleon.lcov
only:
......@@ -289,6 +339,7 @@ sonarqube:
- test_starpu_simgrid_master
- test_quark_master
- test_parsec_master
- test_openmp_master
artifacts:
name: chameleon_analysis
expire_in: 1 week
......
......@@ -108,7 +108,7 @@ option(CHAMELEON_USE_MIGRATE
# -----------------------------
# Create a list of possible runtime
set(CHAMELEON_SCHED_list PARSEC STARPU QUARK
set(CHAMELEON_SCHED_list PARSEC STARPU QUARK OPENMP
CACHE INTERNAL "List of available runtimes" )
set( CHAMELEON_SCHED_PARSEC OFF CACHE INTERNAL
......@@ -120,6 +120,9 @@ set(CHAMELEON_SCHED_STARPU OFF CACHE INTERNAL
set(CHAMELEON_SCHED_QUARK OFF CACHE INTERNAL
"Enable Quark scheduler as the default runtime
(Conflict with other CHAMELEON_SCHED_* options)")
set(CHAMELEON_SCHED_OPENMP OFF CACHE INTERNAL
"Enable OpenMP scheduler as the default runtime
(Conflict with other CHAMELEON_SCHED_* options)")
set( CHAMELEON_SCHED STARPU
CACHE STRING "Choose the chameleon internal runtime from ${CHAMELEON_SCHED_list}")
......@@ -892,6 +895,22 @@ if( CHAMELEON_SCHED_QUARK )
endif()
if( CHAMELEON_SCHED_OPENMP )
find_package(OpenMP REQUIRED)
if ( OPENMP_FOUND )
message("-- ${Blue}Add definition CHAMELEON_SCHED_OPENMP"
" - Activate OpenMP in Chameleon${ColourReset}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}")
# TODO: check for compiler support for "_Pragma"
else ( OPENMP_FOUND )
message(FATAL_ERROR "Something went wrong when finding OpenMP")
endif ( OPENMP_FOUND )
endif( CHAMELEON_SCHED_OPENMP )
# getopt
check_include_files(getopt.h CHAMELEON_HAVE_GETOPT_H)
if (CHAMELEON_HAVE_GETOPT_H)
......@@ -937,6 +956,9 @@ endif()
if (CHAMELEON_SCHED_STARPU)
list(APPEND CHAMELEON_LIBRARIES chameleon_starpu)
endif()
if (CHAMELEON_SCHED_OPENMP)
list(APPEND CHAMELEON_LIBRARIES chameleon_openmp)
endif()
list(APPEND CHAMELEON_LIBRARIES hqr)
set(CHAMELEON_LIBRARIES_DEP ${CHAMELEON_LIBRARIES} ${CHAMELEON_DEP})
......
......@@ -29,7 +29,7 @@ if ( CHAMELEON_USE_CUDA )
set( CHAMELEON_COPY_DIAG ON )
else()
option(CHAMELEON_COPY_DIAG
"This options enables the duplication of the diagonal tiles in some algorithm to avoid anti-dependencies on lower/upper triangular parts (Might be useful to StarPU)" ON)
"This options enables the duplication of the diagonal tiles in some algorithm to avoid anti-dependencies on lower/upper triangular parts (Might be useful to StarPU and OpenMP)" ON)
endif()
if ( CHAMELEON_SCHED_QUARK )
......@@ -296,6 +296,8 @@ elseif(CHAMELEON_SCHED_PARSEC)
target_link_libraries(chameleon chameleon_parsec)
elseif(CHAMELEON_SCHED_QUARK)
target_link_libraries(chameleon chameleon_quark)
elseif(CHAMELEON_SCHED_OPENMP)
target_link_libraries(chameleon chameleon_openmp)
endif()
if (NOT CHAMELEON_SIMULATION)
# Depends on coreblas only for set_coreblas_gemm3m_enabled() (Maybe we should change that)
......
......@@ -30,11 +30,11 @@ extern "C" {
/**
* FORTRAN API - auxiliary function prototypes
*/
void CHAMELEON_INIT(int *CORES, int *NGPUS, int *INFO)
{ *INFO = CHAMELEON_Init(*CORES, *NGPUS); }
void __CHAMELEON_INIT(int *CORES, int *NGPUS, int *INFO)
{ *INFO = __chameleon_init(*CORES, *NGPUS); }
void CHAMELEON_FINALIZE(int *INFO)
{ *INFO = CHAMELEON_Finalize(); }
void __CHAMELEON_FINALIZE(int *INFO)
{ *INFO = __chameleon_finalize(); }
void CHAMELEON_ENABLE(int *lever, int *INFO)
{ *INFO = CHAMELEON_Enable(*lever); }
......
......@@ -30,8 +30,8 @@
#define CHAMELEON_WS_FNAME(lcname, UCNAME) CHAMELEON_GLOBAL(chameleon_alloc_workspace_##lcname, CHAMELEON_ALLOC_WORKSPACE_##UCNAME)
#define CHAMELEON_WST_FNAME(lcname, UCNAME) CHAMELEON_GLOBAL(chameleon_alloc_workspace_##lcname##_tile, CHAMELEON_ALLOC_WORKSPACE_##UCNAME##_TILE)
#define CHAMELEON_INIT CHAMELEON_GLOBAL(chameleon_init, CHAMELEON_INIT)
#define CHAMELEON_FINALIZE CHAMELEON_GLOBAL(chameleon_finalize, CHAMELEON_FINALIZE)
#define __CHAMELEON_INIT CHAMELEON_GLOBAL(__chameleon_init, __CHAMELEON_INIT)
#define __CHAMELEON_FINALIZE CHAMELEON_GLOBAL(__chameleon_finalize, __CHAMELEON_FINALIZE)
#define CHAMELEON_ENABLE CHAMELEON_GLOBAL(chameleon_enable, CHAMELEON_ENABLE)
#define CHAMELEON_DISABLE CHAMELEON_GLOBAL(chameleon_disable, CHAMELEON_DISABLE)
#define CHAMELEON_SET CHAMELEON_GLOBAL(chameleon_set, CHAMELEON_SET)
......@@ -46,4 +46,20 @@
#define CHAMELEON_LAPACK_TO_TILE CHAMELEON_GLOBAL(chameleon_lapack_to_tile, CHAMELEON_LAPACK_TO_TILE)
#define CHAMELEON_TILE_TO_LAPACK CHAMELEON_GLOBAL(chameleon_tile_to_lapack, CHAMELEON_TILE_TO_LAPACK)
#if defined(CHAMELEON_SCHED_OPENMP)
#define CHAMELEON_INIT(nworkers, ncudas)\
CALL __CHAMELEON_INIT(nworkers, ncudas)\
!$omp parallel\
!$omp master
#define CHAMELEON_FINALIZE()\
!$omp end master\
!$omp end parallel\
CALL __CHAMELEON_FINALIZE()
#else
#define CHAMELEON_INIT(nworkers, ncudas)\
CALL __CHAMELEON_INIT(nworkers, ncudas)
#define CHAMELEON_FINALIZE()\
CALL __CHAMELEON_FINALIZE()
#endif
#endif /* _chameleon_f77_h_ */
......@@ -34,7 +34,7 @@
*
* @ingroup Control
*
* CHAMELEON_Init - Initialize CHAMELEON.
* @brief Initialize CHAMELEON.
*
******************************************************************************
*
......@@ -46,20 +46,19 @@
*
******************************************************************************
*
* @return
* \retval CHAMELEON_SUCCESS successful exit
* @retval CHAMELEON_SUCCESS successful exit
*
*/
int CHAMELEON_Init(int cores, int gpus)
int __chameleon_init(int cores, int gpus)
{
return CHAMELEON_InitPar(cores, gpus, -1);
return __chameleon_initpar(cores, gpus, -1);
}
/**
*
* @ingroup Control
*
* CHAMELEON_InitPar - Initialize CHAMELEON.
* @brief Initialize CHAMELEON.
*
******************************************************************************
*
......@@ -74,11 +73,10 @@ int CHAMELEON_Init(int cores, int gpus)
*
******************************************************************************
*
* @return
* \retval CHAMELEON_SUCCESS successful exit
* @retval CHAMELEON_SUCCESS successful exit
*
*/
int CHAMELEON_InitPar(int ncpus, int ncudas, int nthreads_per_worker)
int __chameleon_initpar(int ncpus, int ncudas, int nthreads_per_worker)
{
CHAM_context_t *chamctxt;
......@@ -119,15 +117,14 @@ int CHAMELEON_InitPar(int ncpus, int ncudas, int nthreads_per_worker)
*
* @ingroup Control
*
* CHAMELEON_Finalize - Finalize CHAMELEON.
* @brief Finalize CHAMELEON.
*
******************************************************************************
*
* @return
* \retval CHAMELEON_SUCCESS successful exit
* @retval CHAMELEON_SUCCESS successful exit
*
*/
int CHAMELEON_Finalize(void)
int __chameleon_finalize(void)
{
CHAM_context_t *chamctxt = chameleon_context_self();
if (chamctxt == NULL) {
......
......@@ -79,9 +79,9 @@ int main(int argc, char *argv[]) {
print_header( argv[0], iparam);
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/*
......@@ -170,8 +170,14 @@ int main(int argc, char *argv[]) {
free(B);
free(X);
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
return EXIT_SUCCESS;
return rc;
}
......@@ -74,9 +74,9 @@ int main(int argc, char *argv[]) {
print_header( argv[0], iparam);
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/* Question chameleon to get the block (tile) size (number of columns) */
......@@ -220,8 +220,14 @@ int main(int argc, char *argv[]) {
CHAMELEON_Desc_Destroy( &descX );
CHAMELEON_Desc_Destroy( &descAC );
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
return EXIT_SUCCESS;
return rc;
}
......@@ -75,11 +75,12 @@ int main(int argc, char *argv[]) {
print_header( argv[0], iparam);
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/* Question chameleon to get the block (tile) size (number of columns) */
CHAMELEON_Get( CHAMELEON_TILE_SIZE, &NB );
......@@ -201,8 +202,14 @@ int main(int argc, char *argv[]) {
CHAMELEON_Desc_Destroy( &descX );
CHAMELEON_Desc_Destroy( &descAC );
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
return EXIT_SUCCESS;
return rc;
}
......@@ -53,7 +53,6 @@ int main(int argc, char *argv[]) {
RUNTIME_sequence_t *sequence = NULL;
/* CHAMELEON request uniquely identifies each asynchronous function call */
RUNTIME_request_t request = RUNTIME_REQUEST_INITIALIZER;
int status;
/* initialize some parameters with default values */
int iparam[IPARAM_SIZEOF];
......@@ -83,9 +82,9 @@ int main(int argc, char *argv[]) {
print_header( argv[0], iparam);
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/* Question chameleon to get the block (tile) size (number of columns) */
......@@ -141,10 +140,10 @@ int main(int argc, char *argv[]) {
* have been terminated */
CHAMELEON_Sequence_Wait(sequence);
status = sequence->status;
if ( status != 0 ) {
fprintf(stderr, "Error in computation (%d)\n", status);
return EXIT_FAILURE;
rc = sequence->status;
if ( rc != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error in computation (%d)\n", rc);
goto finalize;
}
CHAMELEON_Sequence_Destroy(sequence);
......@@ -195,8 +194,14 @@ int main(int argc, char *argv[]) {
CHAMELEON_Desc_Destroy( &descX );
CHAMELEON_Desc_Destroy( &descAC );
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
return EXIT_SUCCESS;
return rc;
}
......@@ -53,7 +53,6 @@ int main(int argc, char *argv[]) {
RUNTIME_sequence_t *sequence = NULL;
/* CHAMELEON request uniquely identifies each asynchronous function call */
RUNTIME_request_t request = RUNTIME_REQUEST_INITIALIZER;
int status;
/* initialize some parameters with default values */
int iparam[IPARAM_SIZEOF];
......@@ -86,9 +85,9 @@ int main(int argc, char *argv[]) {
print_header( argv[0], iparam);
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/* set some specific parameters related to CHAMELEON: blocks size and inner-blocking size */
......@@ -145,10 +144,10 @@ int main(int argc, char *argv[]) {
* have been terminated */
CHAMELEON_Sequence_Wait(sequence);
status = sequence->status;
if ( status != 0 ) {
fprintf(stderr, "Error in computation (%d)\n", status);
return EXIT_FAILURE;
rc = sequence->status;
if ( rc != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error in computation (%d)\n", rc);
goto finalize;
}
CHAMELEON_Sequence_Destroy(sequence);
......@@ -199,6 +198,12 @@ int main(int argc, char *argv[]) {
CHAMELEON_Desc_Destroy( &descX );
CHAMELEON_Desc_Destroy( &descAC );
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
......
......@@ -54,7 +54,6 @@ int main(int argc, char *argv[]) {
RUNTIME_sequence_t *sequence = NULL;
/* CHAMELEON request uniquely identifies each asynchronous function call */
RUNTIME_request_t request = RUNTIME_REQUEST_INITIALIZER;
int status;
/* initialize some parameters with default values */
int iparam[IPARAM_SIZEOF];
......@@ -84,9 +83,9 @@ int main(int argc, char *argv[]) {
NGPU = iparam[IPARAM_NCUDAS];
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/* set some specific parameters related to CHAMELEON: blocks size and inner-blocking size */
......@@ -167,10 +166,10 @@ int main(int argc, char *argv[]) {
* have been terminated */
CHAMELEON_Sequence_Wait(sequence);
status = sequence->status;
if ( status != 0 ) {
fprintf(stderr, "Error in computation (%d)\n", status);
return EXIT_FAILURE;
rc = sequence->status;
if ( rc != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error in computation (%d)\n", rc);
goto finalize;
}
CHAMELEON_Sequence_Destroy(sequence);
......@@ -225,6 +224,12 @@ int main(int argc, char *argv[]) {
CHAMELEON_Desc_Destroy( &descX );
CHAMELEON_Desc_Destroy( &descAC );
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
......
......@@ -58,7 +58,6 @@ int main(int argc, char *argv[]) {
RUNTIME_sequence_t *sequence = NULL;
/* CHAMELEON request uniquely identifies each asynchronous function call */
RUNTIME_request_t request = RUNTIME_REQUEST_INITIALIZER;
int status;
/* initialize some parameters with default values */
int iparam[IPARAM_SIZEOF];
......@@ -88,9 +87,9 @@ int main(int argc, char *argv[]) {
NGPU = iparam[IPARAM_NCUDAS];
/* Initialize CHAMELEON with main parameters */
if ( CHAMELEON_Init( NCPU, NGPU ) != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error initializing CHAMELEON library\n");
return EXIT_FAILURE;
int rc = CHAMELEON_Init( NCPU, NGPU );
if (rc != CHAMELEON_SUCCESS) {
goto finalize;
}
/* set some specific parameters related to CHAMELEON: blocks size and inner-blocking size */
......@@ -175,10 +174,10 @@ int main(int argc, char *argv[]) {
* have been terminated */
CHAMELEON_Sequence_Wait(sequence);
status = sequence->status;
if ( status != 0 ) {
fprintf(stderr, "Error in computation (%d)\n", status);
return EXIT_FAILURE;
rc = sequence->status;
if ( rc != CHAMELEON_SUCCESS ) {
fprintf(stderr, "Error in computation (%d)\n", rc);
goto finalize;
}
CHAMELEON_Sequence_Destroy(sequence);
......@@ -233,6 +232,12 @@ int main(int argc, char *argv[]) {
CHAMELEON_Desc_Destroy( &descX );
CHAMELEON_Desc_Destroy( &descAC );
finalize:
/*
* Required semicolon to have at least one inst
* before the end of OpenMP block.
*/
;
/* Finalize CHAMELEON */
CHAMELEON_Finalize();
......
......@@ -80,9 +80,9 @@ BEGIN_C_DECLS
/* Auxiliary */
int CHAMELEON_Version (int *ver_major, int *ver_minor, int *ver_micro);
int CHAMELEON_My_Mpi_Rank (void);
int CHAMELEON_Init (int nworkers, int ncudas);
int CHAMELEON_InitPar (int nworkers, int ncudas, int nthreads_per_worker);
int CHAMELEON_Finalize (void);
int __chameleon_init (int nworkers, int ncudas);
int __chameleon_initpar (int nworkers, int ncudas, int nthreads_per_worker);
int __chameleon_finalize (void);
int CHAMELEON_Pause (void);
int CHAMELEON_Resume (void);
int CHAMELEON_Distributed_start (void);
......@@ -135,6 +135,48 @@ int CHAMELEON_Sequence_Create (RUNTIME_sequence_t **sequence);
int CHAMELEON_Sequence_Destroy (RUNTIME_sequence_t *sequence);
int CHAMELEON_Sequence_Wait (RUNTIME_sequence_t *sequence);
/**
*
* @ingroup Control
*
* @brief Initialize CHAMELEON.
*
******************************************************************************
*
* @param[in] cores
* Number of cores to use.
*
* @param[in] gpus
* Number of cuda devices to use.
*
******************************************************************************
*
* @retval CHAMELEON_SUCCESS successful exit
*
*/
#if defined(CHAMELEON_SCHED_OPENMP)
#define CHAMELEON_Init(nworkers, ncudas)\
__chameleon_init(nworkers, ncudas);\
_Pragma("omp parallel")\
_Pragma("omp master")\
{
#define CHAMELEON_InitPar(nworkers, ncudas, nthreads_per_worker)\
__chameleon_initpar(nworkers, ncudas, nthreads_per_worker);\
_Pragma("omp parallel")\
_Pragma("omp master")\
{
#define CHAMELEON_Finalize()\
}\
__chameleon_finalize();
#else
#define CHAMELEON_Init(nworkers, ncudas)\
__chameleon_init(nworkers, ncudas);
#define CHAMELEON_InitPar(nworkers, ncudas, nthreads_per_worker)\
__chameleon_initpar(nworkers, ncudas, nthreads_per_worker);
#define CHAMELEON_Finalize()\
__chameleon_finalize();
#endif
END_C_DECLS
#endif /* _chameleon_h_ */
......@@ -27,6 +27,7 @@
#cmakedefine CHAMELEON_SCHED_QUARK
#cmakedefine CHAMELEON_SCHED_PARSEC
#cmakedefine CHAMELEON_SCHED_STARPU
#cmakedefine CHAMELEON_SCHED_OPENMP
/* Communication engine */
#cmakedefine CHAMELEON_USE_MPI
......
......@@ -30,6 +30,7 @@ typedef enum runtime_id_e {
RUNTIME_SCHED_QUARK, /**< Quark runtime */
RUNTIME_SCHED_PARSEC, /**< PaRSEC runtime */
RUNTIME_SCHED_STARPU, /**< StarPU runtime */
RUNTIME_SCHED_OPENMP, /**< OpenMP runtime */
} RUNTIME_id_t;
/**
......
......@@ -109,6 +109,8 @@ elseif( CHAMELEON_SCHED_PARSEC )
add_subdirectory(parsec)
elseif( CHAMELEON_SCHED_STARPU )
add_subdirectory(starpu)
elseif( CHAMELEON_SCHED_OPENMP )
add_subdirectory(openmp)
endif()
###
......
###
#
# @file openmp/CMakeLists.txt
#
# @copyright 2009-2015 The University of Tennessee and The University of
# Tennessee Research Foundation. All rights reserved.
# @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
###
#
# @project CHAMELEON
# CHAMELEON is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.0.0
# @author Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @author Florent Pruvost
# @date 2012-07-13
#
###
cmake_minimum_required(VERSION 2.8)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/include )
# Define the list of headers
# --------------------------
set(RUNTIME_HDRS
include/chameleon_openmp.h
)
# Force generation of headers
# ---------------------------
add_custom_target(
runtime_openmp_include
ALL SOURCES ${RUNTIME_HDRS})
# Installation
# ------------
install(
FILES ${RUNTIME_HDRS}
DESTINATION include/runtime/openmp )
# Generate the Chameleon common for all possible precisions
# ---------------------------------------------------------
set(RUNTIME_COMMON
control/runtime_async.c
control/runtime_context.c
control/runtime_control.c
control/runtime_descriptor.c
control/runtime_options.c
control/runtime_profiling.c
${RUNTIME_COMMON_GENERATED}
)
# Generate the Chameleon sources for all possible precisions
# ----------------------------------------------------------
set(RUNTIME_SRCS_GENERATED "")
set(ZSRC
${CODELETS_ZSRC}
)
precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"