Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a8083920 authored by PRUVOST Florent's avatar PRUVOST Florent Committed by Mathieu Faverge
Browse files

Separate the chameleon context struct declaration (CHAM_context_t) from others...

Separate the chameleon context struct declaration (CHAM_context_t) from others to avoid adding an unnecessary dependency to MPI in libs coreblas, gpucublas, gpuhipblas.
parent 65e87970
No related branches found
No related tags found
No related merge requests found
......@@ -164,9 +164,6 @@ endif()
target_link_libraries(coreblas PRIVATE MORSE::LAPACKE)
target_link_libraries(coreblas PRIVATE MORSE::CBLAS)
target_link_libraries(coreblas PUBLIC MORSE::M)
if (CHAMELEON_USE_MPI)
target_link_libraries(coreblas PUBLIC MPI::MPI_C)
endif()
# export target coreblas
install(EXPORT coreblasTargets
......
......@@ -54,6 +54,7 @@ set(CHAMELEON_HDRS
chameleon/runtime_struct.h
chameleon/simulate.h
chameleon/struct.h
chameleon/struct_context.h
chameleon/tasks.h
chameleon/timer.h
chameleon/types.h
......
......@@ -33,6 +33,7 @@
#include "chameleon/constants.h"
#include "chameleon/types.h"
#include "chameleon/struct.h"
#include "chameleon/struct_context.h"
#include "chameleon/descriptor_helpers.h"
#if defined(CHAMELEON_USE_MPI)
......
......@@ -25,21 +25,7 @@
#ifndef _chameleon_struct_h_
#define _chameleon_struct_h_
#include "chameleon/config.h"
#include "chameleon/types.h"
#include "chameleon/constants.h"
#include "chameleon/runtime_struct.h"
#if defined(CHAMELEON_USE_MPI)
#include <mpi.h>
#else
#ifndef MPI_Comm
typedef uintptr_t MPI_Comm;
#endif
#ifndef MPI_COMM_WORLD
#define MPI_COMM_WORLD 0
#endif
#endif
BEGIN_C_DECLS
......@@ -174,37 +160,6 @@ typedef struct chameleon_piv_s {
int n; /**> The number of column considered (must be updated for each panel) */
} CHAM_ipiv_t;
/**
* CHAMELEON request uniquely identifies each asynchronous function call.
*/
typedef struct chameleon_context_s {
RUNTIME_id_t scheduler;
int nworkers;
int ncudas;
int nthreads_per_worker;
/* Boolean flags */
cham_bool_t warnings_enabled;
cham_bool_t autotuning_enabled;
cham_bool_t parallel_enabled;
cham_bool_t statistics_enabled;
cham_bool_t progress_enabled;
cham_bool_t generic_enabled;
cham_bool_t autominmax_enabled;
cham_bool_t runtime_paused;
cham_householder_t householder; // "domino" (flat) or tree-based (reduction) Householder
cham_translation_t translation; // In place or Out of place layout conversion
int nb;
int ib;
int rhblock; // block size for tree-based (reduction) Householder
int lookahead; // depth of the look ahead in algorithms
void *schedopt; // structure for runtimes
int mpi_outer_init; // MPI has been initialized outside our functions
MPI_Comm comm; // MPI communicator
} CHAM_context_t;
static inline void *
CHAM_tile_get_ptr( const CHAM_tile_t *tile )
{
......
/**
*
* @file struct_context.h
*
* @copyright 2009-2014 The University of Tennessee and The University of
* Tennessee Research Foundation. All rights reserved.
* @copyright 2012-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon structures
*
* @version 1.3.0
* @author Mathieu Faverge
* @author Florent Pruvost
* @date 2024-02-12
*
*/
#ifndef _struct_context_h_
#define _struct_context_h_
#include "chameleon/types.h"
#include "chameleon/constants.h"
#include "chameleon/runtime_struct.h"
#if defined(CHAMELEON_USE_MPI)
#include <mpi.h>
#else
#ifndef MPI_Comm
typedef uintptr_t MPI_Comm;
#endif
#ifndef MPI_COMM_WORLD
#define MPI_COMM_WORLD 0
#endif
#endif
BEGIN_C_DECLS
/**
* CHAMELEON request uniquely identifies each asynchronous function call.
*/
typedef struct chameleon_context_s {
RUNTIME_id_t scheduler;
int nworkers;
int ncudas;
int nthreads_per_worker;
/* Boolean flags */
cham_bool_t warnings_enabled;
cham_bool_t autotuning_enabled;
cham_bool_t parallel_enabled;
cham_bool_t statistics_enabled;
cham_bool_t progress_enabled;
cham_bool_t generic_enabled;
cham_bool_t autominmax_enabled;
cham_bool_t runtime_paused;
cham_householder_t householder; // "domino" (flat) or tree-based (reduction) Householder
cham_translation_t translation; // In place or Out of place layout conversion
int nb;
int ib;
int rhblock; // block size for tree-based (reduction) Householder
int lookahead; // depth of the look ahead in algorithms
void *schedopt; // structure for runtimes
int mpi_outer_init; // MPI has been initialized outside our functions
MPI_Comm comm; // MPI communicator
} CHAM_context_t;
END_C_DECLS
#endif /* _struct_context_h_ */
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