Commit f8949ce5 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

update test architecture

parent de2ac608
......@@ -67,6 +67,7 @@ OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
OPTION(FABULOUS_BUILD_DOC "Set to ON to build the Doxygen documentation " OFF)
OPTION(FABULOUS_USE_CHAMELEON "Set to ON to enable chameleon extensions" OFF)
OPTION(FABULOUS_BUILD_EXAMPLES "Set to ON to enable build of examples" OFF)
OPTION(FABULOUS_BUILD_TESTS "Set to ON to enable build of tests" OFF)
IF(CMAKE_BUILD_TYPE AND CMAKE_BUILD_TYPE MATCHES "Debug" )
OPTION(FABULOUS_LAPACKE_NANCHECK "Set to ON to use top level LAPACKE interface " ON)
......@@ -76,16 +77,7 @@ ELSE()
OPTION(FABULOUS_DEBUG_MODE "Set to On to compile with debug info" OFF)
ENDIF()
IF(FABULOUS_LAPACKE_NANCHECK)
ADD_DEFINITIONS( -DFABULOUS_LAPACKE_NANCHECK )
ENDIF(FABULOUS_LAPACKE_NANCHECK)
IF(FABULOUS_DEBUG_MODE)
ADD_DEFINITIONS( -DFABULOUS_DEBUG_MODE )
ENDIF()
INCLUDE_DIRECTORIES(include)
INCLUDE_DIRECTORIES(src/api/include)
ADD_SUBDIRECTORY(include)
IF(FABULOUS_BUILD_EXAMPLES)
......
......@@ -91,6 +91,9 @@ private:
FABULOUS_ASSERT( A.size() == X.get_nb_row() );
FABULOUS_ASSERT( A.size() == B.get_nb_row() );
FABULOUS_ASSERT( X.get_nb_col() == B.get_nb_col() );
int problem_dimension = A.size();
FABULOUS_ASSERT( problem_dimension > 0 );
}
public:
......
......@@ -106,6 +106,9 @@ private:
FABULOUS_ASSERT( A.size() == X.get_nb_row() );
FABULOUS_ASSERT( A.size() == B.get_nb_row() );
FABULOUS_ASSERT( X.get_nb_col() == B.get_nb_col() );
int problem_dimension = A.size();
FABULOUS_ASSERT( problem_dimension > 0 );
}
public:
......
......@@ -109,6 +109,9 @@ private:
FABULOUS_ASSERT( A.size() == X.get_nb_row() );
FABULOUS_ASSERT( A.size() == B.get_nb_row() );
FABULOUS_ASSERT( X.get_nb_col() == B.get_nb_col() );
int problem_dimension = A.size();
FABULOUS_ASSERT( problem_dimension > 0 );
}
public:
......
......@@ -50,10 +50,9 @@ public:
/**
* \brief Helper function to create Equation object
*/
template<class Matrix, class S,
class P = typename Arithmetik<S>::primary_type >
template<class Matrix, class S, class P = typename Arithmetik<S>::primary_type>
inline Equation<Matrix, S>
equation(Matrix &A, Block<S> &X, Block<S> &B, std::vector<P> epsilon)
equation( Matrix &A, Block<S> &X, Block<S> &B, std::vector<P> epsilon)
{
return Equation<Matrix,S>{A, X, B, epsilon};
}
......@@ -61,8 +60,7 @@ equation(Matrix &A, Block<S> &X, Block<S> &B, std::vector<P> epsilon)
/**
* \brief Helper function to create Equation object
*/
template<class Matrix, class S,
class P = typename Arithmetik<S>::primary_type >
template<class Matrix, class S, class P = typename Arithmetik<S>::primary_type>
inline Equation<Matrix, S>
equation( Matrix &A, int dim, int nrhs,
S *X, int ldx, S *B, int ldb, P *epsilon, int Nepsilon)
......
......@@ -221,8 +221,8 @@ private:
}
template<class Matrix>
void orthogonalization(Matrix &A, OrthoParam &orthoparm,
Base<S> &V, Base<S> &Z, Block<S> &W)
void do_ortho(Matrix &A, OrthoParam &orthoparm,
Base<S> &V, Base<S> &Z, Block<S> &W)
{
Orthogonalizer ortho{orthoparm};
// Orthogonalization (arnoldi process)
......@@ -349,7 +349,7 @@ public:
apply_right_precond(Zj, A, _RW); // Z_j <- M * W
matrix_vector_product(W, A, Zj); // W <- A * Zj
orthogonalization(A, orthoparm, _V, _Z, W); // arnoldi process (CGS/MGS/CGS2/IMGS2)
do_ortho(A, orthoparm, _V, _Z, W); // arnoldi process (CGS/MGS/CGS2/IMGS2)
_V.increase(_nb_kept_direction);
Block<S> Vj = _V.get_Vj();
......
......@@ -178,7 +178,7 @@ private:
_logger.notify_iteration_begin(_iteration_count, _size_krylov_space);
if (restarter && _base.get_nb_block() > 0) {
MinMaxConv = restarter.run(_hess, epsilon);
// check_arnoldi_formula(A, _base, _hess);
// check_arnoldi_formula(A, _base, _hess, _nbRHS);
} else { //No DR, or first run of arnoldi
_base.reset();
Block<S> R0 = _base.get_W(_nbRHS);
......
......@@ -430,7 +430,8 @@ public:
W_AMV(A, Vj, _WP); // W <- A*M*Vj: perform matrix multiplication
do_ortho(A, orthoparm);
// _WP.check_ortho_WP();// _WP.get_W().check_ortho();
//_F.display_hess_extended_bitmap();
// _F.display_hess_extended_bitmap();
// check_arnoldi_formula_IB(A, _base, _F, _WP);
auto MinMaxConv = _F.check_least_square_residual(epsilon);
bool proj_convergence = std::get<2>(MinMaxConv);
......
......@@ -85,11 +85,12 @@ public:
_ptr{nullptr}
{
const size_t bufsize = ((_m * _n) != 0) ? (_n * _ld) : (0UL);
_sptr.reset(new S[bufsize], std::default_delete<S[]>());
_sptr.reset(new S[bufsize], std::default_delete<S[]>{});
_ptr = _sptr.get();
std::fill(_ptr, _ptr+bufsize, S{0.0});
FABULOUS_ASSERT( _ld >= _m );
FABULOUS_ASSERT( (_m >= 0) && (_n >= 0) );
FABULOUS_ASSERT( _ld > 0 );
}
......@@ -104,6 +105,7 @@ public:
{
FABULOUS_ASSERT( _ptr != nullptr );
FABULOUS_ASSERT( _ld >= _m );
FABULOUS_ASSERT( (_m >= 0) && (_n >= 0) );
FABULOUS_ASSERT( _ld > 0 );
}
......@@ -114,6 +116,7 @@ public:
{
FABULOUS_ASSERT( _ptr != nullptr );
FABULOUS_ASSERT( _ld >= _m );
FABULOUS_ASSERT( (_m >= 0) && (_n >= 0) );
FABULOUS_ASSERT( _ld > 0 );
}
......@@ -135,7 +138,9 @@ public:
*/
Block sub_block(int i, int j, int m, int n)
{
assert( ((i+m) <= _m) && ((j+n) <= _n) );
FABULOUS_ASSERT( (i >= 0) && (j >= 0) );
FABULOUS_ASSERT( (m >= 0) && (n >= 0) );
FABULOUS_ASSERT( ((i+m) <= _m) && ((j+n) <= _n) );
return Block{m, n, _ld, get_ptr(i, j), _sptr};
}
......
......@@ -320,6 +320,11 @@ public:
return this->sub_block(0, 0, _nb_vect+_nbRHS, _nb_vect);
}
Block<S> get_hess_block()
{
return get_F();
}
/**
* \brief \f$H\f$: last block column of the Hessenberg to be filled by
* the orthogonalization process
......
......@@ -264,11 +264,6 @@ public:
void notify_ortho_end() const {/*nop*/}
Block<S> get_hess_block()
{
return this->sub_block(0, 0, _nb_vect+_nbRHS, _nb_vect);
}
/**
* \brief increase the size of the Hessenberg
*
......@@ -396,6 +391,11 @@ public:
return this->sub_block(0, 0, _nb_vect+_nbRHS, _nb_vect);
}
Block<S> get_hess_block()
{
return get_F();
}
/**
* \brief \f$H\f$: last block column of the Hessenberg to be filled by
* the orthogonalization process
......
......@@ -49,6 +49,10 @@ private:
int W_size = W.get_nb_col();
Block<S> Theta{nb_vect, W_size};
if (nb_vect == 0) {
return;
}
_nb_flops += A.DotProduct( // Theta = V^{T} * W
nb_vect, W_size,
V.get_ptr(), V.get_leading_dim(),
......
This diff is collapsed.
......@@ -270,12 +270,12 @@ public:
const int M = X0.get_nb_row();
const int N = X0.get_nb_col();
Block solution{M, N};
Block X{M, N};
Block Y = hess.alloc_least_square_sol();
hess.solve_least_square(Y);
compute_current_solution(A, X0, base, Y, solution);
compute_current_solution(A, X0, base, Y, X);
auto pair = eval_current_solution(A, B, solution);
auto pair = eval_current_solution(A, B, X);
auto min = pair.first;
auto max = pair.second;
FABULOUS_NOTE(
......@@ -293,16 +293,16 @@ public:
if (!_log_real_residual)
return;
auto pair = eval_current_solution(A, B, X0);
auto min = pair.first;
auto max = pair.second;
auto MM = eval_current_solution(A, B, X0);
auto min = MM.first;
auto max = MM.second;
FABULOUS_NOTE(
"REAL RES:\t "
<<Color::red<<"MIN="<<Color::reset<<std::scientific<<min<<"\t"
<<Color::red<<"MAX="<<Color::reset<<std::scientific<<max
);
_iterations.back().minReal = pair.first;
_iterations.back().maxReal = pair.second;
_iterations.back().minReal = min;
_iterations.back().maxReal = max;
}
/**
......
......@@ -36,6 +36,12 @@ struct Algorithm
template<class V> using algo = U<V>;
};
template<template<class> class A, template<class> class B>
constexpr bool operator==(const Algorithm<A> &, const Algorithm<B> &)
{
return std::is_same<A<float>, B<float>>::value;
}
/**
* \brief return Type of parameter
*/
......
......@@ -13,18 +13,46 @@ ELSE()
)
ENDIF()
SET(FABULOUS_BASIC_DEFINITIONS
${LAPACKE_DEFINITIONS}
${CBLAS_DEFINITIONS}
)
IF(BLA_VENDOR MATCHES "Intel*")
ADD_DEFINITIONS( -DFABULOUS_USE_MKL_SPARSE )
LIST(APPEND FABULOUS_BASIC_DEFINITIONS -DFABULOUS_USE_MKL_SPARSE )
ENDIF(BLA_VENDOR MATCHES "Intel*")
ADD_SUBDIRECTORY(api)
IF(FABULOUS_LAPACKE_NANCHECK)
LIST(APPEND FABULOUS_BASIC_DEFINITIONS -DFABULOUS_LAPACKE_NANCHECK )
ENDIF(FABULOUS_LAPACKE_NANCHECK)
IF(FABULOUS_DEBUG_MODE)
LIST(APPEND FABULOUS_BASIC_DEFINITIONS -DFABULOUS_DEBUG_MODE )
ENDIF()
IF(FABULOUS_USE_CHAMELEON)
FIND_PACKAGE(CHAMELEON COMPONENTS STARPU MPI REQUIRED)
SET(FABULOUS_CHAM_LIBRARIES
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${CHAMELEON_LIBRARIES}
)
SET(FABULOUS_CHAM_DEFINITIONS
${FABULOUS_BASIC_DEFINITIONS}
-DMORSE_COMPLEX_CPP
-DFABULOUS_USE_CHAMELEON
${CHAMELEON_DEFINITIONS}
)
INCLUDE_DIRECTORIES( ${CHAMELEON_INCLUDE_DIRS} )
LINK_DIRECTORIES( ${CHAMELEON_LIBRARY_DIRS} ) # <- eventually remove this when fixed upstream
ENDIF(FABULOUS_USE_CHAMELEON)
ADD_SUBDIRECTORY( api )
IF(FABULOUS_BUILD_EXAMPLES)
ADD_SUBDIRECTORY(examples)
ADD_SUBDIRECTORY(test_api)
ADD_SUBDIRECTORY(test_basic)
IF(FABULOUS_USE_CHAMELEON)
ADD_SUBDIRECTORY(test_cham)
ENDIF()
ENDIF(FABULOUS_BUILD_EXAMPLES)
IF(FABULOUS_BUILD_TESTS)
ADD_SUBDIRECTORY(test)
ENDIF(FABULOUS_BUILD_TESTS)
......@@ -6,18 +6,16 @@ SET(FABULOUS_C_SRC
include/fabulous.h
)
ADD_LIBRARY(fabulous ${FABULOUS_C_SRC})
TARGET_LINK_LIBRARIES(
fabulous
${FABULOUS_BASIC_LIBRARIES}
INCLUDE_DIRECTORIES(include)
INSTALL(
FILES include/fabulous.h
DESTINATION include
)
ADD_LIBRARY(fabulous ${FABULOUS_C_SRC})
TARGET_LINK_LIBRARIES( fabulous ${FABULOUS_BASIC_LIBRARIES} )
TARGET_COMPILE_DEFINITIONS( fabulous PRIVATE ${FABULOUS_BASIC_DEFINITIONS} )
INSTALL(
TARGETS fabulous
DESTINATION lib
)
INSTALL(
FILES include/fabulous.h
DESTINATION include
)
......@@ -53,11 +53,8 @@ public:
return dummy;
}
COOMatrix(bool precond=false)
COOMatrix(int=0, bool=false)
{
if (precond) {
FABULOUS_WARNING("precond parameter ignored with COOMatrix");
}
}
void resize(int m, int n, int nnz)
......
......@@ -67,18 +67,14 @@ public:
return dummy;
}
CSCMatrix(bool precond=false):_last_j{0}
CSCMatrix(int=0, bool=false):
_last_j{0}
{
if (precond) {
FABULOUS_WARNING("precond parameter ignored with COOMatrix");
}
}
void resize(int m, int n, int nnz)
{
FABULOUS_DEBUG("resize");
assert(m == n);
FABULOUS_DEBUG("m="<<m<<" n="<< n<<" nnz="<<nnz);
FABULOUS_ASSERT( m == n );
......
......@@ -3,6 +3,7 @@
#include <random>
#include <complex>
#include <iostream>
namespace fabulous {
......@@ -37,8 +38,11 @@ public:
RandomMatrixLoader(): _gen(0) {}
template<class Matrix>
void LoadMatrix(Matrix &A, const std::string& ="")
void LoadMatrix(Matrix &A, std::string name="")
{
if (name == "") { name = "A"; }
std::cerr << "Loading randomly '" << name << "'\n";
using S = typename Matrix::value_type;
using P = typename Matrix::primary_type;
std::normal_distribution<P> dis{};
......@@ -47,7 +51,6 @@ public:
for (int i = 0; i < A.get_nb_row(); ++i)
A.at(i, j) = S{rnd<S>(dis)};
}
}; // end class RandomMatrixLoader
} // end namespace fabulous
......
......@@ -5,12 +5,30 @@ SET(FABULOUS_EXAMPLES_SRC
FOREACH(_test ${FABULOUS_EXAMPLES_SRC})
GET_FILENAME_COMPONENT(_name_exe ${_test} NAME_WE)
ADD_EXECUTABLE(${_name_exe} ${_test})
TARGET_LINK_LIBRARIES(${_name_exe} ${FABULOUS_BASIC_LIBRARIES})
ADD_SANITIZERS(${_name_exe}) # debug
TARGET_COMPILE_DEFINITIONS(${_name_exe} PRIVATE ${FABULOUS_BASIC_DEFINITIONS})
INSTALL(
TARGETS ${_name_exe}
DESTINATION lib/fabulous/examples/core/
)
ENDFOREACH()
SET(FABULOUS_EXAMPLES_API_SRC
example_api.c
example_api2.c
)
# create a target for each test:
FOREACH(_test ${FABULOUS_EXAMPLES_API_SRC})
GET_FILENAME_COMPONENT(_name_exe ${_test} NAME_WE)
ADD_EXECUTABLE(${_name_exe} ${_test})
TARGET_LINK_LIBRARIES(${_name_exe} fabulous) # link with api library
TARGET_COMPILE_DEFINITIONS(${_name_exe} PRIVATE ${FABULOUS_BASIC_DEFINITIONS})
TARGET_INCLUDE_DIRECTORIES(${_name_exe} PRIVATE ../api/include)
INSTALL(
TARGETS ${_name_exe}
DESTINATION lib/fabulous/examples/api/
)
ENDFOREACH()
......@@ -4,8 +4,9 @@
*/
#include <fabulous.hpp>
#include "../test_common/MatrixMarketLoader.hpp"
#include "../test_common/RandomMatrixLoader.hpp"
#include "../common/MatrixMarketLoader.hpp"
#include "../common/RandomMatrixLoader.hpp"
using S = std::complex<double>;
using Block = ::fabulous::Block<S>;
......@@ -104,19 +105,19 @@ int main()
Block X{dim, nrhs};
Block B{dim, nrhs};
namespace fab = fabulous;
fab::RandomMatrixLoader rnl;
namespace fa = fabulous;
fa::RandomMatrixLoader rnl;
rnl.LoadMatrix(B);
auto eq = fab::equation(A, X, B, epsilon);
auto param = fab::parameters(max_mvp, max_krylov_space);
auto eq = fa::equation(A, X, B, epsilon);
auto param = fa::parameters(max_mvp, max_krylov_space);
auto ortho = fab::orthogonalization()
+ fab::OrthoType::BLOCK + fab::OrthoScheme::MGS;
auto ortho = fa::orthogonalization()
+ fa::OrthoType::BLOCK + fa::OrthoScheme::MGS;
auto restart = fab::deflated_restart(nb_eigen_pair, S{0.0});
auto algo = fab::bgmres::ibdr();
auto log = fab::bgmres::solve(eq, algo, param, ortho, restart);
auto restart = fa::deflated_restart(nb_eigen_pair, S{0.0});
auto algo = fa::bgmres::ibdr();
auto log = fa::bgmres::solve(eq, algo, param, ortho, restart);
log.print("young1c"); // this prints TAB-separated columns with information about convergence
......
ADD_SUBDIRECTORY(cmd)
ADD_SUBDIRECTORY(run)
ADD_SUBDIRECTORY(unit)
SET(FABULOUS_CMD_SRC
fabulous_test.cpp
cmdline.c)
ADD_EXECUTABLE(fabulous_test ${FABULOUS_CMD_SRC})
TARGET_LINK_LIBRARIES(fabulous_test ${FABULOUS_BASIC_LIBRARIES})
TARGET_COMPILE_DEFINITIONS(fabulous_test PRIVATE ${FABULOUS_BASIC_DEFINITIONS})
INSTALL(
TARGETS fabulous_test
DESTINATION lib/fabulous/examples/
)
IF(FABULOUS_USE_CHAMELEON)
ADD_EXECUTABLE(fabulous_test_cham ${FABULOUS_CMD_SRC})
TARGET_LINK_LIBRARIES(fabulous_test_cham ${FABULOUS_CHAM_LIBRARIES})
TARGET_COMPILE_DEFINITIONS(fabulous_test_cham PRIVATE ${FABULOUS_CHAM_DEFINITIONS})
INSTALL(
TARGETS fabulous_test
DESTINATION lib/fabulous/examples/
)
ENDIF(FABULOUS_USE_CHAMELEON)
# TODO add all test
# ADD_TEST(NAME "test_${_name_exe}" COMMAND ${_name_exe})
# SET_TESTS_PROPERTIES("test_${_name_exe}" PROPERTIES
# FAIL_REGULAR_EXPRESSION "Intel MKL ERROR"
# )
ADD_TEST(NAME "test_bcg" COMMAND ./fabulous_test -A BCG -n 10 -f ../data/bcsstk14.mtx -a REAL_DOUBLE)
ADD_TEST(NAME "test_gcr_cgs" COMMAND ./fabulous_test -A GCR -s CGS)
ADD_TEST(NAME "test_gcr_mgs" COMMAND ./fabulous_test -A GCR -s MGS)
ADD_TEST(NAME "test_qribdr" COMMAND ./fabulous_test -m 300 -A QRIBDR -n 10 -r DEFLATED -p 5)
ADD_TEST(NAME "test_ib_cgs_block" COMMAND ./fabulous_test -A IB -s CGS -t BLOCK)
ADD_TEST(NAME "test_ib_imgs_block" COMMAND ./fabulous_test -A IB -s IMGS -t BLOCK)
ADD_TEST(NAME "test_ib_csc_young1c" COMMAND ./fabulous_test -A IB -s CGS -t BLOCK -k CSC)
ADD_TEST(
NAME "test_ib_csc_lightINtissue" COMMAND ./fabulous_test -A IB -s CGS
-t BLOCK -k CSC -f ../data/matlab/lightINtissue.mtx -n 10 -m 90)
ADD_TEST(NAME "test_dr" COMMAND ./fabulous_test -A STD -s CGS -t BLOCK -r DEFLATED -p 6 -M 3500 -n 16)
ADD_TEST(
NAME "test_sherman4" COMMAND ./fabulous_test -s MGS -t BLOCK
-f ../data/sherman4.mtx -n 16 -M 3000 -a REAL_DOUBLE -e 1e-9)
IF(FABULOUS_USE_CHAMELEON)
ADD_TEST(NAME "test_chamqr" COMMAND ./fabulous_test_cham -z2 -A CHAMQR -n 10)
ADD_TEST(NAME "test_cham_toplevel" COMMAND ./fabulous_test_cham -s IMGS -t BLOCK -n 10 -A CHAMDR -z 2)
ENDIF(FABULOUS_USE_CHAMELEON)
# orthoscheme 2
FOREACH(_algo STD IB)
FOREACH(_scheme CGS MGS ICGS IMGS)
FOREACH(_type RUHE BLOCK)
FOREACH(_space RANGE 200 600 200)
SET(_name "${_algo}_${_scheme}_${_type}_${_space}")
ADD_TEST(NAME "test_${_name}"
COMMAND ./fabulous_test -A ${_algo} -s ${_scheme} -t ${_type} -m ${_space} -n 20)
UNSET(_name)
ENDFOREACH()
ENDFOREACH()
ENDFOREACH()
ENDFOREACH()
......@@ -37,7 +37,7 @@ extern "C" {
enum enum_type { type__NULL = -1, type_arg_RUHE = 0, type_arg_BLOCK };
enum enum_scheme { scheme__NULL = -1, scheme_arg_CGS = 0, scheme_arg_ICGS, scheme_arg_MGS, scheme_arg_IMGS };
enum enum_arithmetic { arithmetic__NULL = -1, arithmetic_arg_REAL_FLOAT = 0, arithmetic_arg_REAL_DOUBLE, arithmetic_arg_COMPLEX_FLOAT, arithmetic_arg_COMPLEX_DOUBLE };
enum enum_algo { algo__NULL = -1, algo_arg_STDDR = 0, algo_arg_CHAMDR, algo_arg_QR, algo_arg_CHAMQR, algo_arg_QRDR, algo_arg_IB, algo_arg_IBDR, algo_arg_QRIBDR };
enum enum_algo { algo__NULL = -1, algo_arg_STDDR = 0, algo_arg_CHAMDR, algo_arg_QR, algo_arg_CHAMQR, algo_arg_QRDR, algo_arg_IB, algo_arg_IBDR, algo_arg_QRIBDR, algo_arg_BCG, algo_arg_GCR };
enum enum_restart { restart__NULL = -1, restart_arg_CLASSIC = 0, restart_arg_DEFLATED };
enum enum_parser { parser__NULL = -1, parser_arg_MM = 0, parser_arg_IW, parser_arg_RD };
enum enum_storage { storage__NULL = -1, storage_arg_DENSE = 0, storage_arg_CSC, storage_arg_COO };
......@@ -47,7 +47,7 @@ struct gengetopt_args_info
{
const char *help_help; /**< @brief Print help and exit help description. */
const char *version_help; /**< @brief Print version and exit help description. */
enum enum_type type_arg; /**< @brief orthogonalization type (default='RUHE'). */
enum enum_type type_arg; /**< @brief orthogonalization type (default='BLOCK'). */
char * type_orig; /**< @brief orthogonalization type original value given at command line. */
const char *type_help; /**< @brief orthogonalization type help description. */
enum enum_scheme scheme_arg; /**< @brief orthogonalization scheme (default='MGS'). */
......@@ -62,6 +62,9 @@ struct gengetopt_args_info
int nrhs_arg; /**< @brief number of right hand sides (default='100'). */
char * nrhs_orig; /**< @brief number of right hand sides original value given at command line. */
const char *nrhs_help; /**< @brief number of right hand sides help description. */
int matrix_size_arg; /**< @brief size of matrix for random loader (default='1000'). */
char * matrix_size_orig; /**< @brief size of matrix for random loader original value given at command line. */
const char *matrix_size_help; /**< @brief size of matrix for random loader help description. */
int max_space_arg; /**< @brief maximum size for krylov search space; use '-1' to match the dimension of the matrix (default='-1'). */
char * max_space_orig; /**< @brief maximum size for krylov search space; use '-1' to match the dimension of the matrix original value given at command line. */
const char *max_space_help; /**< @brief maximum size for krylov search space; use '-1' to match the dimension of the matrix help description. */
......@@ -96,9 +99,10 @@ struct gengetopt_args_info
const char *output_help; /**< @brief set the output filename, if not set the input filename will be used help description. */
int suffix_flag; /**< @brief append parameters as a suffix to output filename (default=on). */
const char *suffix_help; /**< @brief append parameters as a suffix to output filename help description. */
int cham_sequential_flag; /**< @brief Use chameleon with only one core. (default=off). */
const char *cham_sequential_help; /**< @brief Use chameleon with only one core. help description. */
int nb_starpu_worker_arg; /**< @brief Number of starpu worker. -1 for all available processors. (default='-1'). */
char * nb_starpu_worker_orig; /**< @brief Number of starpu worker. -1 for all available processors. original value given at command line. */
const char *nb_starpu_worker_help; /**< @brief Number of starpu worker. -1 for all available processors. help description. */
unsigned int help_given ; /**< @brief Whether help was given. */
unsigned int version_given ; /**< @brief Whether version was given. */
unsigned int type_given ; /**< @brief Whether type was given. */
......@@ -106,6 +110,7 @@ struct gengetopt_args_info
unsigned int iteration_given ; /**< @brief Whether iteration was given. */
unsigned int file_given ; /**< @brief Whether file was given. */
unsigned int nrhs_given ; /**< @brief Whether nrhs was given. */
unsigned int matrix_size_given ; /**< @brief Whether matrix-size was given. */
unsigned int max_space_given ; /**< @brief Whether max-space was given. */
unsigned int max_mvp_given ; /**< @brief Whether max-mvp was given. */
unsigned int epsilon_given ; /**< @brief Whether epsilon was given. */
......@@ -118,7 +123,7 @@ struct gengetopt_args_info
unsigned int storage_given ; /**< @brief Whether storage was given. */
unsigned int output_given ; /**< @brief Whether output was given. */
unsigned int suffix_given ; /**< @brief Whether suffix was given. */
unsigned int cham_sequential_given ; /**< @brief Whether cham-sequential was given. */
unsigned int nb_starpu_worker_given ; /**< @brief Whether nb-starpu-worker was given. */
} ;
......@@ -207,7 +212,7 @@ void cmdline_parser_print_help(void);
void cmdline_parser_print_version(void);
/**
* Initializes all the fields a cmdline_parser_params structure
* Initializes all the fields a cmdline_parser_params structure
* to their default values
* @param params the structure to initialize
*/
......
......@@ -5,7 +5,7 @@ purpose "solve equation with multiple rhs"
option "type" t "orthogonalization type"
values="RUHE","BLOCK" enum
optional default="RUHE"
optional default="BLOCK"
option "scheme" s "orthogonalization scheme"
values="CGS","ICGS","MGS","IMGS" enum
......@@ -20,6 +20,9 @@ option "file" f "input file"
option "nrhs" n "number of right hand sides"
int optional default="100"
option "matrix-size" q "size of matrix for random loader"
int optional default="1000"
option "max-space" m "maximum size for krylov search space; use '-1' to match the dimension of the matrix "
int optional default="-1"
......@@ -34,7 +37,7 @@ option "arithmetic" a "set the type arithmetic"
optional default="COMPLEX_DOUBLE"
option "algo" A "set the algorithm"
values="STDDR","CHAMDR","QR","CHAMQR","QRDR","IB","IBDR","QRIBDR" enum
values="STDDR","CHAMDR","QR","CHAMQR","QRDR","IB","IBDR","QRIBDR", "BCG", "GCR" enum
optional default="STDDR"
option "restart" r "restarting type"
......@@ -61,5 +64,5 @@ option "output" o "set the output filename, if not set the input filename will b
option "suffix" u "append parameters as a suffix to output filename"
flag on
option "cham-sequential" z "Use chameleon with only one core."
flag off
\ No newline at end of file
option "nb-starpu-worker" z "Number of starpu worker. -1 for all available processors."
int optional default="-1"
\ No newline at end of file
SET(FABULOUS_TEST_RUN_BASIC_SRC
bcg_breakdown.cpp
gcr_breakdown.cpp
std_block.cpp
std_ruhe.cpp
matcone_std.cpp
matcone_qr.cpp
matcone_ib.cpp
matcone_dr.cpp
matcone_norhs_ib.cpp
matcone_norhs_dr.cpp
exact_breakdown.cpp
)
FOREACH(_test ${FABULOUS_TEST_RUN_BASIC_SRC})
GET_FILENAME_COMPONENT(_name_exe ${_test} NAME_WE)
ADD_EXECUTABLE(${_name_exe} ${_test})
TARGET_LINK_LIBRARIES(${_name_exe} ${FABULOUS_BASIC_LIBRARIES})
TARGET_COMPILE_DEFINITIONS(${_name_exe} PRIVATE ${FABULOUS_BASIC_DEFINITIONS})
ADD_TEST(NAME "test_${_name_exe}" COMMAND ${_name_exe})
SET_TESTS_PROPERTIES("test_${_name_exe}" PROPERTIES
FAIL_REGULAR_EXPRESSION "Intel MKL ERROR"
)
INSTALL(
TARGETS ${_name_exe}