Commit 5639e1b8 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'gs/dev' into 'master'

Gs/dev

Correction to CMakeLists.txt issue #7 + comments + error handling

NB: my first merge request ! -> comments/remarks welcome

See merge request !4
parents 7fb2463a ac8d3ccc
...@@ -995,6 +995,21 @@ message("-- ${Blue}Add definition ADD_" ...@@ -995,6 +995,21 @@ message("-- ${Blue}Add definition ADD_"
add_definitions(-DADD_) add_definitions(-DADD_)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if(CHAMELEON_SCHED_STARPU)
link_directories(${STARPU_LIBRARY_DIRS_DEP})
elseif(CHAMELEON_SCHED_PARSEC)
link_directories(${PARSEC_LIBRARY_DIRS_DEP})
elseif(CHAMELEON_SCHED_QUARK)
link_directories(${QUARK_LIBRARY_DIRS})
endif()
if(NOT CHAMELEON_SIMULATION)
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
if(CHAMELEON_USE_MAGMA)
link_directories(${MAGMA_LIBRARY_DIRS})
endif()
endif()
# Save extra dependencies (all required links) # Save extra dependencies (all required links)
list(APPEND CHAMELEON_DEP ${EXTRA_LIBRARIES}) list(APPEND CHAMELEON_DEP ${EXTRA_LIBRARIES})
list(REMOVE_DUPLICATES CHAMELEON_DEP) # WARNING: is it safe, respect order? list(REMOVE_DUPLICATES CHAMELEON_DEP) # WARNING: is it safe, respect order?
......
...@@ -68,7 +68,7 @@ int morse_desc_mat_free (MORSE_desc_t *desc); ...@@ -68,7 +68,7 @@ int morse_desc_mat_free (MORSE_desc_t *desc);
#define BLKLDD(A, k) A->get_blkldd( A,k ) #define BLKLDD(A, k) A->get_blkldd( A,k )
/******************************************************************************* /*******************************************************************************
* Internal function to return address of block (m,n) * Internal function to return address of block (m,n) with m,n = block indices
**/ **/
inline static void* morse_getaddr_ccrb(const MORSE_desc_t *A, int m, int n) inline static void* morse_getaddr_ccrb(const MORSE_desc_t *A, int m, int n)
{ {
...@@ -100,7 +100,7 @@ inline static void* morse_getaddr_ccrb(const MORSE_desc_t *A, int m, int n) ...@@ -100,7 +100,7 @@ inline static void* morse_getaddr_ccrb(const MORSE_desc_t *A, int m, int n)
} }
/******************************************************************************* /*******************************************************************************
* Internal function to return address of block (m,n) * Internal function to return address of block (m,n) with m,n = block indices
**/ **/
inline static void *morse_getaddr_cm(const MORSE_desc_t *A, int m, int n) inline static void *morse_getaddr_cm(const MORSE_desc_t *A, int m, int n)
{ {
...@@ -120,9 +120,9 @@ inline static void *morse_getaddr_cm(const MORSE_desc_t *A, int m, int n) ...@@ -120,9 +120,9 @@ inline static void *morse_getaddr_cm(const MORSE_desc_t *A, int m, int n)
} }
/******************************************************************************* /*******************************************************************************
* Internal function to return address of element A(m,n) * Internal function to return address of element A(m,n) with m,n = matrix indices
**/ **/
inline static void* morse_geteltaddr(const MORSE_desc_t *A, int m, int n, int eltsize) inline static void* morse_geteltaddr(const MORSE_desc_t *A, int m, int n, int eltsize) // Not used anywhere ?!
{ {
size_t mm = (m + A->i)/A->mb; size_t mm = (m + A->i)/A->mb;
size_t nn = (n + A->j)/A->nb; size_t nn = (n + A->j)/A->nb;
...@@ -150,7 +150,7 @@ inline static void* morse_geteltaddr(const MORSE_desc_t *A, int m, int n, int el ...@@ -150,7 +150,7 @@ inline static void* morse_geteltaddr(const MORSE_desc_t *A, int m, int n, int el
} }
/******************************************************************************* /*******************************************************************************
* Internal function to return the leading dimension of element A(m,*) * Internal function to return the leading dimension of element A(m,*) with m,n = block indices
**/ **/
inline static int morse_getblkldd_ccrb(const MORSE_desc_t *A, int m) inline static int morse_getblkldd_ccrb(const MORSE_desc_t *A, int m)
{ {
...@@ -165,7 +165,7 @@ inline static int morse_getblkldd_cm(const MORSE_desc_t *A, int m) { ...@@ -165,7 +165,7 @@ inline static int morse_getblkldd_cm(const MORSE_desc_t *A, int m) {
/******************************************************************************* /*******************************************************************************
* Internal function to return MPI rank of element A(m,n) * Internal function to return MPI rank of element A(m,n) with m,n = block indices
**/ **/
inline static int morse_getrankof_2d(const MORSE_desc_t *desc, int m, int n) inline static int morse_getrankof_2d(const MORSE_desc_t *desc, int m, int n)
{ {
...@@ -173,7 +173,7 @@ inline static int morse_getrankof_2d(const MORSE_desc_t *desc, int m, int n) ...@@ -173,7 +173,7 @@ inline static int morse_getrankof_2d(const MORSE_desc_t *desc, int m, int n)
} }
/******************************************************************************* /*******************************************************************************
* Internal function to return MPI rank of element DIAG(m,0) * Internal function to return MPI rank of element DIAG(m,0) with m,n = block indices
**/ **/
inline static int morse_getrankof_2d_diag(const MORSE_desc_t *desc, int m, int n) inline static int morse_getrankof_2d_diag(const MORSE_desc_t *desc, int m, int n)
{ {
......
...@@ -61,9 +61,6 @@ void MORSE_TASK_ztpmqrt( const MORSE_option_t *options, ...@@ -61,9 +61,6 @@ void MORSE_TASK_ztpmqrt( const MORSE_option_t *options,
STARPU_SCRATCH, options->ws_worker, STARPU_SCRATCH, options->ws_worker,
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#if defined(CHAMELEON_USE_MPI)
STARPU_EXECUTE_ON_NODE, execution_rank,
#endif
#if defined(CHAMELEON_CODELETS_HAVE_NAME) #if defined(CHAMELEON_CODELETS_HAVE_NAME)
STARPU_NAME, "ztpmqrt", STARPU_NAME, "ztpmqrt",
#endif #endif
......
...@@ -53,9 +53,6 @@ void MORSE_TASK_ztpqrt( const MORSE_option_t *options, ...@@ -53,9 +53,6 @@ void MORSE_TASK_ztpqrt( const MORSE_option_t *options,
STARPU_SCRATCH, options->ws_worker, STARPU_SCRATCH, options->ws_worker,
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#if defined(CHAMELEON_USE_MPI)
STARPU_EXECUTE_ON_NODE, execution_rank,
#endif
#if defined(CHAMELEON_CODELETS_HAVE_NAME) #if defined(CHAMELEON_CODELETS_HAVE_NAME)
STARPU_NAME, "ztpqrt", STARPU_NAME, "ztpqrt",
#endif #endif
......
...@@ -150,13 +150,13 @@ void RUNTIME_desc_create( MORSE_desc_t *desc ) ...@@ -150,13 +150,13 @@ void RUNTIME_desc_create( MORSE_desc_t *desc )
/* Check that we won't create overflow in tags used */ /* Check that we won't create overflow in tags used */
if ( (lnt*lmt) > ((uintptr_t)(1UL<<tag_sep)) ) { if ( (lnt*lmt) > ((uintptr_t)(1UL<<tag_sep)) ) {
morse_error("RUNTIME_desc_create", "Too many tiles in the descriptor for MPI tags"); morse_fatal_error("RUNTIME_desc_create", "Too many tiles in the descriptor for MPI tags");
return; return;
} }
assert(lmt*lmt<=(1<<tag_sep)); assert(lmt*lmt<=(1<<tag_sep));
if (desc->id >= 1UL<<(tag_width-tag_sep)) { if (desc->id >= 1UL<<(tag_width-tag_sep)) {
morse_error("RUNTIME_desc_create", "Number of descriptor available in MPI mode out of stock"); morse_fatal_error("RUNTIME_desc_create", "Number of descriptor available in MPI mode out of stock");
return; return;
} }
assert( desc->id < (1UL<<(tag_width-tag_sep)) ); assert( desc->id < (1UL<<(tag_width-tag_sep)) );
......
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