Commit ba7cdfec authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'issue42/hqr_install' into 'master'

Fix #42 -  HQR header installation

Closes #42, #28, and #32

See merge request !55
parents 6c900181 a28c9569
......@@ -3,8 +3,8 @@
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2016 Inria. All rights reserved.
# @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
# @copyright (c) 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
###
#
......@@ -57,13 +57,15 @@ else()
"https://gitlab.inria.fr/solverstack/morse_cmake. Please set MORSE_CMAKE_DIR to this source "
"directory.")
endif()
include(MorseInit)
include(GenPkgConfig)
include(FortranCInterface)
# Ensure that the fortran compiler and c compiler specified are compatible
# ------------------------------------------------------------------------
include(FortranCInterface)
FortranCInterface_VERIFY()
FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/include/morse_mangling.h
FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/include/chameleon/morse_mangling.h
MACRO_NAMESPACE "MORSE_")
#############################################
......@@ -610,10 +612,9 @@ endif(NOT CHAMELEON_SIMULATION)
# CHAMELEON depends on a runtime
# -------------------------------
if( CHAMELEON_SCHED_STARPU )
set(CHAMELEON_STARPU_VERSION "1.1" CACHE STRING "oldest STARPU version desired")
set(CHAMELEON_STARPU_VERSION "1.1" CACHE STRING "oldest STARPU version desired")
# create list of components in order to make a single call to find_package(starpu...)
if(NOT CHAMELEON_SIMULATION)
......@@ -1005,53 +1006,46 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
###############################################################################
# Coreblas library (kernels for CPUs) #
#######################################
add_subdirectory(coreblas)
#------------------------------------------------------------------------------
###############################################################################
# Cudablas library (kernels for CUDAs) #
########################################
if(CHAMELEON_USE_CUDA)
if (NOT CHAMELEON_SIMULATION)
###############################################################################
# Coreblas library (kernels for CPUs) #
#######################################
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/coreblas/include)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/coreblas/include)
add_subdirectory(coreblas)
###############################################################################
# Cudablas library (kernels for CUDAs) #
########################################
if(CHAMELEON_USE_CUDA)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/cudablas/include)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/cudablas/include)
add_subdirectory(cudablas)
endif()
endif()
#------------------------------------------------------------------------------
###############################################################################
# Add HQR library #
###################
add_subdirectory(hqr)
include_directories(hqr/include)
#------------------------------------------------------------------------------
###############################################################################
# Main library #
################
add_subdirectory(include)
add_subdirectory(control)
add_subdirectory(compute)
#------------------------------------------------------------------------------
###############################################################################
# Runtime library #
###################
# Runtimes libraries #
######################
add_subdirectory(runtime)
#------------------------------------------------------------------------------
###############################################################################
# Executables and Tests #
#########################
enable_testing()
include(CTest)
......
......@@ -98,7 +98,7 @@ MACRO(GENERATE_PKGCONFIG_FILE)
set(CUDABLAS_PKGCONFIG_LIBS_PRIVATE "")
# A list of packages required by this package
set(CHAMELEON_PKGCONFIG_REQUIRED "")
set(CHAMELEON_PKGCONFIG_REQUIRED "hqr")
set(COREBLAS_PKGCONFIG_REQUIRED "")
set(CUDABLAS_PKGCONFIG_REQUIRED "")
......@@ -148,8 +148,6 @@ MACRO(GENERATE_PKGCONFIG_FILE)
endif(NOT CHAMELEON_SIMULATION)
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED_PRIVATE hwloc)
# Define required package
# -----------------------
CLEAN_LIB_LIST(CHAMELEON)
......
Subproject commit 41120c395d72ac2d7602e3d5722bcfe033be1790
Subproject commit b356d3a5b5a417e49a60aa3b6127221717fe0f1d
......@@ -296,19 +296,17 @@ elseif(CHAMELEON_SCHED_QUARK)
list(INSERT CHAMELEON_DEP 0 -lchameleon_quark)
endif()
if (NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon coreblas)
add_dependencies(chameleon
coreblas_include)
target_link_libraries(chameleon coreblas)
endif()
target_link_libraries(chameleon hqr)
list(INSERT CHAMELEON_DEP 0 -lchameleon)
add_dependencies(chameleon
chameleon_include
coreblas_include
control_include
)
if (NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon coreblas_include)
endif()
set_property(TARGET chameleon PROPERTY LINKER_LANGUAGE Fortran)
set_property(TARGET chameleon PROPERTY Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
......
......@@ -155,4 +155,5 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -23,6 +23,7 @@
*
**/
#include "control/common.h"
#include <stdlib.h>
#include "libhqr.h"
#define A(m,n) A, (m), (n)
......@@ -82,8 +83,7 @@ void morse_pzgelqf_param( const libhqr_tree_t *qrtree, MORSE_desc_t *A,
/* Initialisation of tiles */
tiles = (int*)malloc((qrtree->mt)*sizeof(int));
memset( tiles, 0, (qrtree->mt)*sizeof(int) );
tiles = (int*)calloc(qrtree->mt, sizeof(int));
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......@@ -139,9 +139,9 @@ void morse_pzgelqf_param( const libhqr_tree_t *qrtree, MORSE_desc_t *A,
}
/* Setting the order of the tiles */
libhqr_treewalk(qrtree, k, tiles);
libhqr_walk_stepk( qrtree, k, tiles + (k+1) );
for (i = k; i < A->nt-1; i++) {
for (i = k+1; i < A->nt; i++) {
n = tiles[i];
p = qrtree->currpiv(qrtree, k, n);
......
......@@ -183,4 +183,5 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, int BS,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -149,4 +149,5 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -23,6 +23,7 @@
*
**/
#include "control/common.h"
#include <stdlib.h>
#include "libhqr.h"
#define A(m,n) A, (m), (n)
......@@ -82,8 +83,7 @@ void morse_pzgeqrf_param( const libhqr_tree_t *qrtree, MORSE_desc_t *A,
/* Initialisation of tiles */
tiles = (int*)malloc((qrtree->mt)*sizeof(int));
memset( tiles, 0, (qrtree->mt)*sizeof(int) );
tiles = (int*)calloc(qrtree->mt, sizeof(int));
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......@@ -138,9 +138,9 @@ void morse_pzgeqrf_param( const libhqr_tree_t *qrtree, MORSE_desc_t *A,
}
/* Setting the order of the tiles */
libhqr_treewalk(qrtree, k, tiles);
libhqr_walk_stepk( qrtree, k, tiles + (k+1) );
for (i = k; i < A->mt-1; i++) {
for (i = k+1; i < A->mt; i++) {
m = tiles[i];
p = qrtree->currpiv(qrtree, k, m);
......
......@@ -183,4 +183,5 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *D, int BS,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -31,6 +31,7 @@
//ALLOC_WS : ib*L->nb
//WS_ADD : ib*L->nb
#include "control/common.h"
#include <stdlib.h>
#define A(_m_,_n_) A, _m_, _n_
#if defined(CHAMELEON_COPY_DIAG)
......
......@@ -24,6 +24,7 @@
*
**/
#include "control/common.h"
#include <stdlib.h>
#define A(m, n) A, m, n
#define T(m, n) T, m, n
......@@ -444,4 +445,6 @@ void morse_pzhetrd_he2hb(MORSE_enum uplo,
morse_desc_mat_free(AT);
free(AT);
(void)E;
}
......@@ -165,4 +165,6 @@ void morse_pztpgqrt( int L,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -144,4 +144,5 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T, MORSE_desc
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -23,6 +23,7 @@
*
**/
#include "control/common.h"
#include <stdlib.h>
#define A(m,n) A, (m), (n)
#define Q(m,n) Q, (m), (n)
......@@ -78,8 +79,7 @@ void morse_pzunglq_param(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_des
/* Initialisation of tiles */
tiles = (int*)malloc((qrtree->mt)*sizeof(int));
memset( tiles, 0, (qrtree->mt)*sizeof(int) );
tiles = (int*)calloc( qrtree->mt, sizeof(int));
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......@@ -95,9 +95,9 @@ void morse_pzunglq_param(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_des
ldak = BLKLDD(A, k);
/* Setting the order of the tiles*/
libhqr_treewalk(qrtree, k, tiles);
libhqr_walk_stepk(qrtree, k, tiles + (k+1));
for (i = A->nt-2; i >= k; i--) {
for (i = A->nt-1; i > k; i--) {
n = tiles[i];
p = qrtree->currpiv(qrtree, k, n);
......
......@@ -167,4 +167,5 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -145,4 +145,5 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T, MORSE_desc
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -23,6 +23,7 @@
*
**/
#include "control/common.h"
#include <stdlib.h>
#define A(m,n) A, m, n
#define Q(m,n) Q, m, n
......@@ -84,8 +85,7 @@ void morse_pzungqr_param(const libhqr_tree_t *qrtree,
/* Initialisation of tiles */
tiles = (int*)malloc((qrtree->mt)*sizeof(int));
memset( tiles, 0, (qrtree->mt)*sizeof(int) );
tiles = (int*)calloc(qrtree->mt, sizeof(int));
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......@@ -98,9 +98,9 @@ void morse_pzungqr_param(const libhqr_tree_t *qrtree,
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
/* Setting the order of tiles */
libhqr_treewalk(qrtree, k, tiles);
libhqr_walk_stepk(qrtree, k, tiles + (k+1));
for (i = Q->mt - 2; i >= k; i--) {
for (i = Q->mt-1; i > k; i--) {
m = tiles[i];
p = qrtree->currpiv(qrtree, k, m);
......@@ -179,6 +179,5 @@ void morse_pzungqr_param(const libhqr_tree_t *qrtree,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -172,4 +172,5 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
......@@ -315,4 +315,5 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
RUNTIME_options_ws_free(&options);
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
(void)D;
}
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