Mentions légales du service

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • solverstack/chameleon
  • lvilleve/chameleon-toto
  • jcletort/chameleon
  • thibault/chameleon
  • tcojean/chameleon
  • sylvand/chameleon
  • viroulea/chameleon
  • x-ltac/chameleon
  • agullo/chameleon
  • glucas/chameleon
  • pswartva/chameleon
  • aguermou1/chameleon
  • eyrauddu/chameleon
  • mverite/chameleon
  • alisito/chameleon
  • furmento/chameleon
  • fpruvost/chameleon
  • ahourcau/chameleon
  • bnicolas/chameleon
  • pesterie/chameleon
  • mmarcos/chameleon
21 results
Show changes
Commits on Source (4)
Showing
with 559 additions and 48 deletions
......@@ -330,6 +330,7 @@ endif()
# Add math library (libm), searched with MORSE module FindM.cmake
# it normally exists on all common systems provided with a C compiler
find_package(M REQUIRED)
morse_export_imported_target(MORSE M m chameleon)
# If simulation we don't enter in kernel functions so that we don't need to link
# with concerned libraries
......@@ -346,10 +347,12 @@ if(NOT CHAMELEON_SIMULATION)
# CHAMELEON depends on CBLAS
#---------------------------
find_package(CBLAS REQUIRED)
morse_export_imported_target(MORSE CBLAS cblas chameleon)
# CHAMELEON depends on LAPACKE
#-----------------------------
find_package(LAPACKE REQUIRED)
morse_export_imported_target(MORSE LAPACKE lapacke chameleon)
# CHAMELEON depends on CUDA/CUBLAS
#----------------------------------
......@@ -396,6 +399,8 @@ if(NOT CHAMELEON_SIMULATION)
"\n CUDA_LIBRARIES to be found. Be sure you have"
"\n libcuda with your distribution of CUDA.")
endif()
morse_export_imported_target(CUDA CUDA cuda chameleon)
morse_export_imported_target(CUDA CUBLAS cublas chameleon)
endif (CUDA_FOUND)
endif(CHAMELEON_USE_CUDA)
......@@ -417,6 +422,8 @@ if(NOT CHAMELEON_SIMULATION)
" - Activate MPI in Chameleon${ColourReset}")
endif (MPI_C_FOUND)
morse_export_imported_target(MPI MPI_C mpi chameleon)
endif (CHAMELEON_USE_MPI)
else (NOT CHAMELEON_SIMULATION)
......@@ -504,6 +511,8 @@ else (NOT CHAMELEON_SIMULATION)
" - Activate MPI in Chameleon${ColourReset}")
endif (MPI_C_FOUND)
morse_export_imported_target(MPI MPI_C mpi chameleon)
endif (CHAMELEON_USE_MPI)
endif(NOT CHAMELEON_SIMULATION)
......@@ -651,10 +660,6 @@ write_basic_package_version_file(CHAMELEONConfigVersion.cmake
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CHAMELEONConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/CHAMELEONConfigVersion.cmake
DESTINATION ${LIB_INSTALL_DIR}/cmake/chameleon)
# need MORSE Find modules: necessary files must be distributed in the install path
set(morse_dependencies "M;BLASEXT;LAPACKEXT;CBLAS;LAPACKE;HWLOC;PARSEC;QUARK;STARPU")
morse_install_finds(morse_dependencies ${LIB_INSTALL_DIR}/cmake/chameleon/find)
###############################################################################
# Config files (pkg_config) #
#############################
......
......@@ -9,51 +9,30 @@ set_and_check(CHAMELEON_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
check_required_components(CHAMELEON)
# need MORSE Find modules: necessary files must be distributed in the install path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/find")
# dependencies of CHAMELEON
include(CMakeFindDependencyMacro)
find_dependency(M)
include("${CMAKE_CURRENT_LIST_DIR}/mTargets.cmake")
if (NOT @CHAMELEON_SIMULATION@)
find_dependency(CBLAS REQUIRED)
find_dependency(LAPACKE REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/cblasTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/lapackeTargets.cmake")
endif()
if (@CHAMELEON_SCHED_OPENMP@)
find_dependency(OpenMP REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/openmpTargets.cmake")
endif()
if (@CHAMELEON_SCHED_PARSEC@)
find_dependency(PARSEC REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/parsecTargets.cmake")
endif()
if (@CHAMELEON_SCHED_QUARK@)
find_dependency(QUARK REQUIRED COMPONENTS HWLOC)
include("${CMAKE_CURRENT_LIST_DIR}/quarkTargets.cmake")
endif()
if (@CHAMELEON_SCHED_STARPU@)
find_package(STARPU @CHAMELEON_STARPU_VERSION@ REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/starpuTargets.cmake")
endif()
if (@CHAMELEON_USE_MPI@)
find_dependency(MPI REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/mpiTargets.cmake")
endif()
if (@CHAMELEON_USE_CUDA@ AND NOT @CHAMELEON_SIMULATION@)
find_dependency(CUDA REQUIRED)
if ( CUDA_FOUND )
if (NOT TARGET CUDA::CUDA)
add_library(CUDA::CUDA INTERFACE IMPORTED)
if (CUDA_INCLUDE_DIRS)
set_target_properties(CUDA::CUDA PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CUDA_INCLUDE_DIRS}")
endif()
if (CUDA_LIBRARIES)
set_target_properties(CUDA::CUDA PROPERTIES INTERFACE_LINK_LIBRARIES "${CUDA_LIBRARIES}")
endif()
if (NOT TARGET CUDA::CUBLAS)
add_library(CUDA::CUBLAS INTERFACE IMPORTED)
if (CUDA_CUBLAS_LIBRARIES)
set_target_properties(CUDA::CUBLAS PROPERTIES INTERFACE_LINK_LIBRARIES "${CUDA_CUBLAS_LIBRARIES}")
endif()
target_link_libraries(CUDA::CUBLAS INTERFACE CUDA::CUDA)
endif()
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/cudaTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cublasTargets.cmake")
endif()
# add the targets file
......
Subproject commit 0540e73689762bfb5a3c9e8231de3cc1d14cf4dd
Subproject commit fdd64e56f4d1b3b1a31cb568dec374f9fde84796
......@@ -864,10 +864,10 @@
* map: apply a user operator on each tile of the matrix
In addition, all *BLAS 3 routines* ~gemm~, ~hemm~, ~her2k~, ~herk~, ~lauum~, ~symm~,
~syr2k~, ~syrk~, ~trmm~, ~trsm~ and *LAPACK* ~lacpy~, ~laset~, ~posv~, ~potrf~, ~potri~,
~potrs~, ~trtri~ can be called using an equivalent of the (C)BLAS/LAPACK(E)
API. The parameters are the same and the user just has to add *CHAMELEON_*
to the standard name of the routine. For example, in C
~syr2k~, ~syrk~, ~trmm~, ~trsm~ and *LAPACK* ~lacpy~, ~lange~, ~lanhe~, ~lansy~,
~lantr~, ~laset~, ~posv~, ~potrf~, ~potri~, ~potrs~, ~trtri~ can be called using an
equivalent of the (C)BLAS/LAPACK(E) API. The parameters are the same and the user
just has to add *CHAMELEON_* to the standard name of the routine. For example, in C
#+begin_src
CHAMELEON_Init(4,0);
CHAMELEON_cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,
......
......@@ -61,6 +61,10 @@ set(ZSRC
src/lapack_zher2k.c
src/lapack_zherk.c
src/lapack_zlacpy.c
src/lapack_zlange.c
src/lapack_zlanhe.c
src/lapack_zlansy.c
src/lapack_zlantr.c
src/lapack_zlaset.c
src/lapack_zlauum.c
src/lapack_zposv.c
......
......@@ -83,6 +83,18 @@ int CHAMELEON_lapacke_zlacpy( int matrix_layout, char uplo, int M, int N,
const CHAMELEON_Complex64_t *A, int lda,
CHAMELEON_Complex64_t *B, int ldb );
double CHAMELEON_lapacke_zlange( int matrix_layout, char norm, int M, int N,
const CHAMELEON_Complex64_t *A, int lda );
double CHAMELEON_lapacke_zlanhe( int matrix_layout, char norm, char uplo, int N,
const CHAMELEON_Complex64_t *A, int lda );
double CHAMELEON_lapacke_zlansy( int matrix_layout, char norm, char uplo, int N,
const CHAMELEON_Complex64_t *A, int lda );
double CHAMELEON_lapacke_zlantr( int matrix_layout, char norm, char uplo, char diag,
int M, int N, const CHAMELEON_Complex64_t *A, int lda );
int CHAMELEON_lapacke_zlaset( int matrix_layout, char uplo, int M, int N,
const CHAMELEON_Complex64_t alpha, const CHAMELEON_Complex64_t beta,
CHAMELEON_Complex64_t *A, int lda );
......
......@@ -34,5 +34,6 @@ int chameleon_blastocblas_trans(const char* trans);
int chameleon_blastocblas_side(const char* side);
int chameleon_blastocblas_uplo(const char* uplo);
int chameleon_blastocblas_diag(const char* diag);
int chameleon_lapacktochameleon_norm(const char* norm);
#endif /* _lapack_api_common_h_ */
......@@ -91,3 +91,25 @@ int chameleon_blastocblas_diag(const char* diag)
return CHAMELEON_ERR_ILLEGAL_VALUE;
}
}
/**
* @brief Convert the input char LAPACK norm parameter to a compatible parameter
* for the Chameleon API.
* @param[in] norm The input char LAPACK norm parameter
* @return The Chameleon equivalent parameter (ChamMaxNorm, ChamOneNorm, etc).
*/
int chameleon_lapacktochameleon_norm(const char* norm)
{
if ( (*norm == 'M') || (*norm == 'm') ) {
return ChamMaxNorm;
} else if ( (*norm == '1') || (*norm == 'O') || (*norm == 'o') ) {
return ChamOneNorm;
} else if ( (*norm == 'I') || (*norm == 'i') ) {
return ChamInfNorm;
} else if ( (*norm == 'F') || (*norm == 'f') || (*norm == 'E') || (*norm == 'e') ) {
return ChamFrobeniusNorm;
} else {
fprintf(stderr, "CHAMELEON ERROR: %s(): %s\n", "chameleon_lapacktochameleon_norm", "illegal value of LAPACK norm parameter");
return CHAMELEON_ERR_ILLEGAL_VALUE;
}
}
\ No newline at end of file
/**
*
* @file lapack_zlange.c
*
* @copyright 2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon lapack and lapacke api for lange
*
* @version 1.2.0
* @author Mathieu Faverge
* @author Florent Pruvost
* @date 2022-12-21
* @precisions normal z -> s d c
*
*/
#include "chameleon_lapack.h"
#include "lapack_api_common.h"
/* Fortran LAPACK interface */
#define CHAMELEON_lapack_zlange CHAMELEON_GLOBAL( chameleon_lapack_zlange, CHAMELEON_LAPACK_ZLANGE )
double CHAMELEON_lapack_zlange ( const char* norm, const int* m, const int* n,
const CHAMELEON_Complex64_t* a, const int* lda,
double* work )
{
(void)work;
return CHAMELEON_lapacke_zlange( CblasColMajor,
*norm, *m, *n, a, *lda );
}
/* C LAPACKE interface */
/**
******************************************************************************
*
* @ingroup CHAMELEON_LAPACK_API
*
* CHAMELEON_lapacke_zlange - returns the value of the 1-norm, or the Frobenius
* norm, or the infinity norm, or the element of largest absolute value of a
* real/complex matrix A.
*
******************************************************************************
*
* @param[in] matrix_layout Specifies whether the matrices are row or column
* major, it must be set to LAPACK_COL_MAJOR or CblasColMajor (102),
* the matrix_layout supported in Chameleon.
*
* @param[in] norm = 'M' or 'm': val = max(abs(Aij)), largest absolute value
* of the matrix A.
* = '1' or 'O' or 'o': val = norm1(A), 1-norm of the matrix A
* (maximum column sum),
* = 'I' or 'i': val = normI(A), infinity norm of the matrix A
* (maximum row sum),
* = 'F', 'f', 'E' or 'e': val = normF(A), Frobenius norm of
* the matrix A (square root of sum of squares).
*
* @param[in] M The number of rows of the matrix A. M >= 0. When M = 0, the
* returned value is set to zero.
*
* @param[in] N The number of columns of the matrix A. N >= 0. When N = 0, the
* returned value is set to zero.
*
* @param[in] A The M-by-N matrix A.
*
* @param[in] LDA The leading dimension of the array A. LDA >= max(1,M).
*
******************************************************************************
*
* @retval the norm described above.
*
******************************************************************************
*
* @sa CHAMELEON_lapacke_zlange
* @sa CHAMELEON_lapacke_clange
* @sa CHAMELEON_lapacke_dlange
* @sa CHAMELEON_lapacke_slange
*
*/
double CHAMELEON_lapacke_zlange( int matrix_layout, char norm, int M, int N,
const CHAMELEON_Complex64_t *A, int lda )
{
if ( matrix_layout != CblasColMajor ){
fprintf( stderr, "CHAMELEON ERROR: %s(): %s\n", "CHAMELEON_lapacke_zlange", "illegal value of matrix_layout" );
return -1;
}
return CHAMELEON_zlange( (cham_normtype_t)chameleon_lapacktochameleon_norm(&norm),
M, N, (CHAMELEON_Complex64_t *)A, lda );
}
/**
*
* @file lapack_zlanhe.c
*
* @copyright 2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon lapack and lapacke api for lanhe
*
* @version 1.2.0
* @author Mathieu Faverge
* @author Florent Pruvost
* @date 2022-12-21
* @precisions normal z -> c
*
*/
#include "chameleon_lapack.h"
#include "lapack_api_common.h"
/* Fortran LAPACK interface */
#define CHAMELEON_lapack_zlanhe CHAMELEON_GLOBAL( chameleon_lapack_zlanhe, CHAMELEON_LAPACK_ZLANHE )
double CHAMELEON_lapack_zlanhe ( const char* norm, const char* uplo, const int* n,
const CHAMELEON_Complex64_t* a, const int* lda,
double* work )
{
(void)work;
return CHAMELEON_lapacke_zlanhe( CblasColMajor,
*norm, *uplo, *n, a, *lda );
}
/* C LAPACKE interface */
/**
******************************************************************************
*
* @ingroup CHAMELEON_LAPACK_API
*
* CHAMELEON_lapacke_zlanhe - returns the value of the one norm, or the
Frobenius norm, or the infinity norm, or the element of largest absolute
value of a complex hermitian matrix A.
*
******************************************************************************
*
* @param[in] matrix_layout Specifies whether the matrices are row or column
* major, it must be set to LAPACK_COL_MAJOR or CblasColMajor (102),
* the matrix_layout supported in Chameleon.
*
* @param[in] norm = max(abs(A(i,j))), NORM = 'M' or 'm'
* = norm1(A), NORM = '1', 'O' or 'o'
* = normI(A), NORM = 'I' or 'i'
* = normF(A), NORM = 'F', 'f', 'E' or 'e'
*
* where norm1 denotes the one norm of a matrix (maximum column sum), normI
* denotes the infinity norm of a matrix (maximum row sum) and normF denotes
* the Frobenius norm of a matrix (square root of sum of squares). Note that
* max(abs(A(i,j))) is not a consistent matrix norm.
*
* @param[in] uplo Specifies whether the upper or lower triangular part of the
* hermitian matrix A is to be referenced.
* = 'U': Upper triangular part of A is referenced
* = 'L': Lower triangular part of A is referenced
*
* @param[in] N The order of the matrix A. N >= 0. When N = 0,
* CHAMELEON_lapacke_zlanhe is set to zero.
*
* @param[in] A The hermitian matrix A, dimension (LDA,N).
* If UPLO = 'U', the leading n by n upper triangular part of A contains the
* upper triangular part of the matrix A, and the strictly lower triangular
* part of A is not referenced. If UPLO = 'L', the leading n by n lower
* triangular part of A contains the lower triangular part of the matrix A, and
* the strictly upper triangular part of A is not referenced. Note that the
* imaginary parts of the diagonal elements need not be set and are assumed to
* be zero.
*
* @param[in] LDA The leading dimension of the array A. LDA >= max(N,1).
*
******************************************************************************
*
* @retval the norm described above.
*
******************************************************************************
*
* @sa CHAMELEON_lapacke_zlanhe
* @sa CHAMELEON_lapacke_clanhe
*
*/
double CHAMELEON_lapacke_zlanhe( int matrix_layout, char norm, char uplo, int N,
const CHAMELEON_Complex64_t *A, int lda )
{
if ( matrix_layout != CblasColMajor ){
fprintf( stderr, "CHAMELEON ERROR: %s(): %s\n", "CHAMELEON_lapacke_zlanhe", "illegal value of matrix_layout" );
return -1;
}
return CHAMELEON_zlanhe( (cham_normtype_t)chameleon_lapacktochameleon_norm(&norm),
(cham_uplo_t)chameleon_blastocblas_uplo(&uplo),
N, (CHAMELEON_Complex64_t *)A, lda );
}
/**
*
* @file lapack_zlansy.c
*
* @copyright 2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon lapack and lapacke api for lansy
*
* @version 1.2.0
* @author Mathieu Faverge
* @author Florent Pruvost
* @date 2022-12-21
* @precisions normal z -> s d c
*
*/
#include "chameleon_lapack.h"
#include "lapack_api_common.h"
/* Fortran LAPACK interface */
#define CHAMELEON_lapack_zlansy CHAMELEON_GLOBAL( chameleon_lapack_zlansy, CHAMELEON_LAPACK_ZLANSY )
double CHAMELEON_lapack_zlansy ( const char* norm, const char* uplo, const int* n,
const CHAMELEON_Complex64_t* a, const int* lda,
double* work )
{
(void)work;
return CHAMELEON_lapacke_zlansy( CblasColMajor,
*norm, *uplo, *n, a, *lda );
}
/* C LAPACKE interface */
/**
******************************************************************************
*
* @ingroup CHAMELEON_LAPACK_API
*
* CHAMELEON_lapacke_zlansy - returns the value of the one norm, or the
Frobenius norm, or the infinity norm, or the element of largest absolute
value of a complex symmetric matrix A.
*
******************************************************************************
*
* @param[in] matrix_layout Specifies whether the matrices are row or column
* major, it must be set to LAPACK_COL_MAJOR or CblasColMajor (102),
* the matrix_layout supported in Chameleon.
*
* @param[in] norm = max(abs(A(i,j))), NORM = 'M' or 'm'
* = norm1(A), NORM = '1', 'O' or 'o'
* = normI(A), NORM = 'I' or 'i'
* = normF(A), NORM = 'F', 'f', 'E' or 'e'
*
* where norm1 denotes the one norm of a matrix (maximum column sum), normI
* denotes the infinity norm of a matrix (maximum row sum) and normF denotes
* the Frobenius norm of a matrix (square root of sum of squares). Note that
* max(abs(A(i,j))) is not a consistent matrix norm.
*
* @param[in] uplo Specifies whether the upper or lower triangular part of the
* hermitian matrix A is to be referenced.
* = 'U': Upper triangular part of A is referenced
* = 'L': Lower triangular part of A is referenced
*
* @param[in] N The order of the matrix A. N >= 0. When N = 0,
* CHAMELEON_lapacke_zlansy is set to zero.
*
* @param[in] A The symmetric matrix A, dimension (LDA,N).
* If UPLO = 'U', the leading n by n upper triangular part of A contains the
* upper triangular part of the matrix A, and the strictly lower triangular
* part of A is not referenced. If UPLO = 'L', the leading n by n lower
* triangular part of A contains the lower triangular part of the matrix A, and
* the strictly upper triangular part of A is not referenced.
*
* @param[in] LDA The leading dimension of the array A. LDA >= max(N,1).
*
******************************************************************************
*
* @retval the norm described above.
*
******************************************************************************
*
* @sa CHAMELEON_lapacke_zlansy
* @sa CHAMELEON_lapacke_clansy
* @sa CHAMELEON_lapacke_dlansy
* @sa CHAMELEON_lapacke_slansy
*
*/
double CHAMELEON_lapacke_zlansy( int matrix_layout, char norm, char uplo, int N,
const CHAMELEON_Complex64_t *A, int lda )
{
if ( matrix_layout != CblasColMajor ){
fprintf( stderr, "CHAMELEON ERROR: %s(): %s\n", "CHAMELEON_lapacke_zlansy", "illegal value of matrix_layout" );
return -1;
}
return CHAMELEON_zlansy( (cham_normtype_t)chameleon_lapacktochameleon_norm(&norm),
(cham_uplo_t)chameleon_blastocblas_uplo(&uplo),
N, (CHAMELEON_Complex64_t *)A, lda );
}
/**
*
* @file lapack_zlantr.c
*
* @copyright 2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon lapack and lapacke api for lantr
*
* @version 1.2.0
* @author Mathieu Faverge
* @author Florent Pruvost
* @date 2022-12-21
* @precisions normal z -> s d c
*
*/
#include "chameleon_lapack.h"
#include "lapack_api_common.h"
/* Fortran LAPACK interface */
#define CHAMELEON_lapack_zlantr CHAMELEON_GLOBAL( chameleon_lapack_zlantr, CHAMELEON_LAPACK_ZLANTR )
double CHAMELEON_lapack_zlantr ( const char* norm, const char* uplo, const char* diag,
const int* m, const int* n,
const CHAMELEON_Complex64_t* a, const int* lda,
double* work )
{
(void)work;
return CHAMELEON_lapacke_zlantr( CblasColMajor,
*norm, *uplo, *diag, *m, *n, a, *lda );
}
/* C LAPACKE interface */
/**
******************************************************************************
*
* @ingroup CHAMELEON_LAPACK_API
*
* CHAMELEON_lapacke_zlantr - returns the value of the one norm, or the
Frobenius norm, or the infinity norm, or the element of largest absolute
value of a trapezoidal or triangular matrix A.
*
******************************************************************************
*
* @param[in] matrix_layout Specifies whether the matrices are row or column
* major, it must be set to LAPACK_COL_MAJOR or CblasColMajor (102),
* the matrix_layout supported in Chameleon.
*
* @param[in] norm = max(abs(A(i,j))), NORM = 'M' or 'm'
* = norm1(A), NORM = '1', 'O' or 'o'
* = normI(A), NORM = 'I' or 'i'
* = normF(A), NORM = 'F', 'f', 'E' or 'e'
*
* where norm1 denotes the one norm of a matrix (maximum column sum), normI
* denotes the infinity norm of a matrix (maximum row sum) and normF denotes
* the Frobenius norm of a matrix (square root of sum of squares). Note that
* max(abs(A(i,j))) is not a consistent matrix norm.
*
* @param[in] uplo Specifies whether the matrix A is upper or lower trapezoidal.
* = 'U': Upper trapezoidal
* = 'L': Lower trapezoidal
* Note that A is triangular instead of trapezoidal if M = N.
*
* @param[in] diag Specifies whether or not the matrix A has unit diagonal.
* = 'N': Non-unit diagonal
* = 'U': Unit diagonal
*
* @param[in] M The number of rows of the matrix A. M >= 0. When M = 0, the
* returned value is set to zero.
*
* @param[in] N The number of columns of the matrix A. N >= 0. When N = 0, the
* returned value is set to zero.
*
* @param[in] A The trapezoidal matrix A (A is triangular if M = N),
* dimension (LDA,N).
* If UPLO = 'U', the leading m by n upper trapezoidal part of
* the array A contains the upper trapezoidal matrix, and the
* strictly lower triangular part of A is not referenced.
* If UPLO = 'L', the leading m by n lower trapezoidal part of
* the array A contains the lower trapezoidal matrix, and the
* strictly upper triangular part of A is not referenced. Note
* that when DIAG = 'U', the diagonal elements of A are not
* referenced and are assumed to be one.
*
* @param[in] LDA The leading dimension of the array A. LDA >= max(M,1).
*
******************************************************************************
*
* @retval the norm described above.
*
******************************************************************************
*
* @sa CHAMELEON_lapacke_zlantr
* @sa CHAMELEON_lapacke_clantr
* @sa CHAMELEON_lapacke_dlantr
* @sa CHAMELEON_lapacke_slantr
*
*/
double CHAMELEON_lapacke_zlantr( int matrix_layout, char norm, char uplo, char diag,
int M, int N, const CHAMELEON_Complex64_t *A, int lda )
{
if ( matrix_layout != CblasColMajor ){
fprintf( stderr, "CHAMELEON ERROR: %s(): %s\n", "CHAMELEON_lapacke_zlantr", "illegal value of matrix_layout" );
return -1;
}
return CHAMELEON_zlantr( (cham_normtype_t)chameleon_lapacktochameleon_norm(&norm),
(cham_uplo_t)chameleon_blastocblas_uplo(&uplo),
(cham_diag_t)chameleon_blastocblas_diag(&diag),
M, N, (CHAMELEON_Complex64_t *)A, lda );
}
......@@ -29,6 +29,7 @@
cmake_minimum_required(VERSION 3.1)
find_package(OpenMP REQUIRED)
morse_export_imported_target(OpenMP OpenMP_C openmp chameleon)
if ( OPENMP_FOUND )
message("-- ${Blue}Add definition CHAMELEON_SCHED_OPENMP"
......
......@@ -29,6 +29,7 @@
cmake_minimum_required(VERSION 3.1)
find_package( PARSEC REQUIRED )
morse_export_imported_target(MORSE PARSEC parsec chameleon)
if(PARSEC_FOUND)
message("-- ${Blue}Add definition CHAMELEON_SCHED_PARSEC"
......
......@@ -29,6 +29,7 @@
cmake_minimum_required(VERSION 3.1)
find_package( QUARK REQUIRED COMPONENTS HWLOC )
morse_export_imported_target(MORSE QUARK quark chameleon)
# Add definition and include_dir if found
if(QUARK_FOUND)
......
......@@ -35,6 +35,7 @@ include(CheckStructHasMember)
set(CHAMELEON_STARPU_VERSION "1.3" CACHE STRING "necessary STARPU API version")
find_package(STARPU ${CHAMELEON_STARPU_VERSION} REQUIRED)
morse_export_imported_target(MORSE STARPU starpu chameleon)
# check available functions
# note: recall STARPU_VERSION provides the version
......
......@@ -23,9 +23,11 @@
#include "testings.h"
#include "testing_zcheck.h"
#include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h>
#include <coreblas.h>
#endif
#endif
static cham_fixdbl_t
......@@ -124,6 +126,7 @@ testing_zlange_std( run_arg_list_t *args, int check )
int hres = 0;
/* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 );
cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm );
int N = run_arg_get_int( args, "N", 1000 );
......@@ -151,7 +154,22 @@ testing_zlange_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zlange( norm_type, M, N ) );
#else
testing_start( &test_data );
norm = CHAMELEON_zlange( norm_type, M, N, A, LDA );
switch ( api ) {
case 1:
norm = CHAMELEON_zlange( norm_type, M, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
norm = CHAMELEON_lapacke_zlange( CblasColMajor, chameleon_lapack_const( norm_type ), M, N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres;
testing_stop( &test_data, flops_zlange( norm_type, M, N ) );
......
......@@ -22,9 +22,11 @@
#include "testings.h"
#include "testing_zcheck.h"
#include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h>
#include <coreblas.h>
#endif
#endif
static cham_fixdbl_t
......@@ -121,6 +123,7 @@ testing_zlanhe_std( run_arg_list_t *args, int check )
int hres = 0;
/* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 );
cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
......@@ -151,7 +154,22 @@ testing_zlanhe_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zlanhe( norm_type, N ) );
#else
testing_start( &test_data );
norm = CHAMELEON_zlanhe( norm_type, uplo, N, A, LDA );
switch ( api ) {
case 1:
norm = CHAMELEON_zlanhe( norm_type, uplo, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
norm = CHAMELEON_lapacke_zlanhe( CblasColMajor, chameleon_lapack_const( norm_type ), chameleon_lapack_const(uplo), N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres;
testing_stop( &test_data, flops_zlanhe( norm_type, N ) );
......
......@@ -22,9 +22,11 @@
#include "testings.h"
#include "testing_zcheck.h"
#include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h>
#include <coreblas.h>
#endif
#endif
static cham_fixdbl_t
......@@ -121,6 +123,7 @@ testing_zlansy_std( run_arg_list_t *args, int check )
int hres = 0;
/* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 );
cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
......@@ -151,7 +154,22 @@ testing_zlansy_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zlansy( norm_type, N ) );
#else
testing_start( &test_data );
norm = CHAMELEON_zlansy( norm_type, uplo, N, A, LDA );
switch ( api ) {
case 1:
norm = CHAMELEON_zlansy( norm_type, uplo, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
norm = CHAMELEON_lapacke_zlansy( CblasColMajor, chameleon_lapack_const( norm_type ), chameleon_lapack_const(uplo), N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres;
testing_stop( &test_data, flops_zlansy( norm_type, N ) );
......
......@@ -22,9 +22,11 @@
#include "testings.h"
#include "testing_zcheck.h"
#include <chameleon/flops.h>
#if !defined(CHAMELEON_SIMULATION)
#include <coreblas.h>
#if defined(CHAMELEON_TESTINGS_VENDOR)
#include <coreblas/lapacke.h>
#include <coreblas.h>
#endif
#endif
static cham_fixdbl_t
......@@ -145,6 +147,7 @@ testing_zlantr_std( run_arg_list_t *args, int check )
int hres = 0;
/* Read arguments */
int api = parameters_getvalue_int( "api" );
int nb = run_arg_get_int( args, "nb", 320 );
cham_normtype_t norm_type = run_arg_get_ntype( args, "norm", ChamMaxNorm );
cham_uplo_t uplo = run_arg_get_uplo( args, "uplo", ChamUpper );
......@@ -174,7 +177,22 @@ testing_zlantr_std( run_arg_list_t *args, int check )
testing_stop( &test_data, flops_zlantr( norm_type, uplo, M, N ) );
#else
testing_start( &test_data );
norm = CHAMELEON_zlantr( norm_type, uplo, diag, M, N, A, LDA );
switch ( api ) {
case 1:
norm = CHAMELEON_zlantr( norm_type, uplo, diag, M, N, A, LDA );
break;
#if !defined(CHAMELEON_SIMULATION)
case 2:
norm = CHAMELEON_lapacke_zlantr( CblasColMajor, chameleon_lapack_const( norm_type ), chameleon_lapack_const(uplo), chameleon_lapack_const(diag), M, N, A, LDA );
break;
#endif
default:
if ( CHAMELEON_Comm_rank() == 0 ) {
fprintf( stderr,
"SKIPPED: This function can only be used with the option --api 1 or --api 2.\n" );
}
return -1;
}
test_data.hres = hres;
testing_stop( &test_data, flops_zlantr( norm_type, uplo, M, N ) );
......