Commit 5858961a authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Separate precond step from mvp step in logger

parent f5514729
......@@ -17,6 +17,8 @@ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
################
# Fix a problem on Mac OS X when building shared libraries
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
......
......@@ -2,42 +2,60 @@
# -*- coding: utf-8 -*-
#+TITLE: Fabulous installation procedure (Plafrim2)
#+AUTHOR: Thomas Mijieux
#+EMAIL: thomas.mijieux@inria.fr
#+PROPERTY: header-args:sh :exports none :eval never-export
#+PROPERTY: header-args:emacs-lisp :exports code :eval never-export
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+NAME: fabulous_root
#+BEGIN_SRC shell
#+BEGIN_SRC sh
echo ${HOME}/fabulous/
#+END_SRC
#+NAME: cham_root
#+BEGIN_SRC shell
#+BEGIN_SRC sh
echo ${HOME}/src/chameleon/
#+END_SRC
* INSTALLATION on PLAFRIM2 with chameleon
:PROPERTIES:
:header-args:shell: :session *fabulous-install* :results silent :exports code :eval never-export
:END:
** With SPACK
*** Install SPACK
If you do not have spack, download it:
#+begin_src bash
#+begin_src sh
cd ${HOME}
git clone https://github.com/solverstack/spack.git
#+end_src
Set SPACK_ROOT variable to the directory where spack is installed:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent :shebang "#!/bin/bash"
Set =SPACK_ROOT= variable to the directory where spack is installed:
#+begin_src shell :tangle install-fabulous.sh :shebang "#!/bin/bash"
export SPACK_ROOT=/home/tmijieux/spack
#+end_src
Load spack to into your terminal environment:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
#+begin_src shell :tangle install-fabulous.sh
source ${SPACK_ROOT}/share/spack/setup-env.sh
export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH
#+end_src
These last two lines can be added safely in [[file:~/.bashrc][~/.bashrc]].
The =MODULEPATH= variable is to make spack work the environment module
system (Install it from your distribution package manager or from its
[[https://sourceforge.net/projects/modules/][official project page]].)
Using the environment module system is highly recommended even when not on
plafrim because it allow you to have different versions of chameleon and starpu
installed (for instance with or without debugging symbols, with or without
tracing enabled) and to load them on demand in the environment with
'spack load' (spack wrapper for module load)
*** Install Fabulous
On plafrim, you need to load the required modules:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
#+begin_src shell :tangle install-fabulous.sh
module purge
module load compiler/gcc/6.1.0
module load build/cmake/3.2.1
......@@ -46,52 +64,55 @@ spack compiler find
#+end_src
Set shell variables for spack to find the dependencies
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
#+begin_src shell :tangle install-fabulous.sh
export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1
#+end_src
Check the specification with:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
SPEC="fabulous@develop+chameleon%gcc@6.1.0 ^chameleon@master ^mkl@exist ^cmake@exist"
#+begin_src shell :tangle install-fabulous.sh
SPEC="fabulous@develop+chameleon+examples%gcc@6.1.0 ^chameleon@master ^mkl@exist ^cmake@exist"
spack spec ${SPEC}
#+end_src
On plafrim, spack may have troubles fetching the required dependencies
on the internet. If you encounter this issue, you can create a spack
mirror on your machine and sent it to plafrim:
Local machine:
#+begin_src bash
#local machine:
spack mirror create -d fabulous_mirror -D -o fabulous@develop+chameleon^chameleon@master
# mirror store dependencies as compressed archives already
# so it is not very useful to add anymore compression at this stage:
spack mirror create -d fabulous_mirror -D -o fabulous@develop+chameleon+examples^chameleon@master
tar cf fabulous_mirror.tar fabulous_mirror/
sftp fabulous_mirror.tar plafrim:~
#on plafrim (for instance, in your $HOME directory):
#+end_src
Spack mirrors store dependencies as compressed archives already,
so it is not very useful to add anymore compression at this stage.
On plafrim (for instance, in your =$HOME= directory):
#+begin_src bash
tar xf fabulous_mirror.tar
spack mirror add local_mirror file://${HOME}/fabulous_mirror
#+end_src
If everything looks good, you can proceed the installation with:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
#+begin_src shell :tangle install-fabulous.sh
spack install -v ${SPEC}
#+end_src
You can perform these actions either manually, by evaluating the code blocks
directly inside emacs if your org-mode support it, or by tangling this org
document to produce file:./install-fabulous.sh execute it:
document to produce the script [[file:./install-fabulous.sh][install-fabulous.sh]]
#+begin_src emacs-lisp :results silent
(org-babel-tangle)
#+end_src
then:
#+begin_src bash :results silent
chmod +x ./install-fabulous.sh
And eventually run the script:
#+begin_src shell :results silent
./install-fabulous.sh
#+end_src
* DEVELOPER NOTICE
:PROPERTIES:
:header-args:shell: :var WORKDIR=fabulous_root :session *build* :results silent
:header-args:shell: :var WORKDIR=fabulous_root :session *build* :results silent :exports code :eval never-export
:END:
The code blocks in this org file work best when you work with the fabulous directory
installed in your home directory file:~/fabulous
......@@ -110,11 +131,11 @@ chmod +x ./install-fabulous.sh
*** Chameleon
**** manually
:PROPERTIES:
:header-args:shell: :var WORKDIR=cham_root :session *build* :results silent
:header-args:shell: :var WORKDIR=cham_root :session *build* :results silent :exports code :eval never-export
:END:
Clone chameleon.
#+BEGIN_SRC shell :dir ~/src/
git clone git@gitlab.inria.fr:solverstack/chameleon.git
git clone git@gitlab.inria.fr:solverstack/chameleon.git
#+END_SRC
If you encounter problem, you can try with the latest commit this
......@@ -124,9 +145,18 @@ cd ${WORKDIR}
git checkout 6cd463e666f1e4798e0a65ed07bc3a3561e15f63
#+END_SRC
In order to link with mkl kernels: file:INSTALL.org::152
You may want to load mkl into environment:
#+BEGIN_SRC shell
source /opt/intel/mkl/bin/mklvars.sh intel64
#+END_SRC
configuration is as follow:
or, If you installed dependencies with spack, load them into environment
#+BEGIN_SRC shell
spack load mkl
spack load starpu+fxt
#+END_SRC
Configuration is make like this:
#+BEGIN_SRC shell
cd ${WORKDIR}
git clean -fdx
......@@ -143,9 +173,9 @@ cmake .. \
-DCHAMELEON_ENABLE_TRACING=ON
#+END_SRC
build:
Build:
#+BEGIN_SRC shell
cd ${WORDIR}/build
cd ${WORKDIR}/build
make -j4
#+END_SRC
......@@ -162,17 +192,19 @@ su -c 'make install'
source /opt/intel/mkl/bin/mklvars.sh intel64
spack install -v chameleon@master~cuda+debug~examples+fxt~magma+mpi~quark+shared~simu+starpu ^mkl
#+END_SRC
Otherwise, if you do not have mkl installed or if you do not want to use mkl
Otherwise, if you do not have mkl installed or if you do not want to use mkl,
check that your module environment state is what you expect it to be, and eventually, run
#+BEGIN_SRC shell
spack install -v chameleon@master~cuda+debug~examples+fxt~magma+mpi~quark+shared~simu+starpu
#+END_SRC
** Compilation
You may want to load mkl into environement:
You may want to load mkl into environment:
#+BEGIN_SRC shell
source /opt/intel/mkl/bin/mklvars.sh intel64
#+END_SRC
or, If you installed dependencies with spack, load them into environement
or, If you installed dependencies with spack, load them into environment
#+BEGIN_SRC shell
spack load mkl
spack load chameleon
......@@ -206,22 +238,21 @@ make -j4
To have autocompletion work correctly in emacs (company with clang extension),
you can use the scripts from https://github.com/Rip-Rip/clang_complete :
See [[file:scripts/cc_args.py][cc_args.py]] .
See [[file:scripts/cc_args.py][=cc_args.py=]]
You may want to reset the build system (in order to flush cmake cache)
#+BEGIN_SRC shell
rm -rf ${WORKDIR}/build/*
#+END_SRC
If you installed dependencies with spack, load them into environement
If you installed dependencies with spack, load them into environment
#+BEGIN_SRC shell
spack load mkl
spack load chameleon
spack load starpu+fxt
#+END_SRC
Setup the build system with cc_args as a compiler:
Setup the build system with =cc_args= as a compiler:
#+BEGIN_SRC shell
mkdir -p ${WORKDIR}/build
cd ${WORKDIR}/build
......@@ -239,7 +270,7 @@ CC="${WORKDIR}/scripts/cc_args.py gcc" CXX="${WORKDIR}/scripts/cc_args.py g++" \
make -j4
#+END_SRC
cc_args have generated many .clang_complete files.
cc_args have generated many =.clang_complete= files.
We gather them into one file. Notice that the line with -std=c99 is removed
because fabulous source have both c++11 and c99 files but passing both option to clang
would be an error so we prefer c++11 which is the dominant language of the the project.
......@@ -249,4 +280,4 @@ find ${WORKDIR}/build -name '.clang_complete' | xargs cat | sort | uniq \
#+END_SRC
Eventually you can check the content of the file:
file:~/fabulous/.clang_complete
[[file:./.clang_complete][=.clang_complete=]]
......@@ -537,7 +537,6 @@ ctest
(setq org-babel-default-header-args
(cons '(:eval . "never-export")
(assq-delete-all :eval org-babel-default-header-args)))
#+end_src
:LOGBOOK:
CLOCK: [2017-06-02 Fri 18:08]--[2017-06-02 Fri 18:09] => 0:01
......
#+TITLE: Fabulous notes and ideas scratch pad
#+AUTHOR: Thomas Mijieux
#+EMAIL: thomas.mijieux@inria.fr
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
* MEETING 2017-May-14
https://pad.inria.fr/p/6HK1U7JNaeTcBToB_fabulous
......
......@@ -13,7 +13,9 @@
#+EXPORT_EXCLUDE_TAGS: noexport
#+NAME: fabulous_root
: /home/tmijieux/fabulous
#+BEGIN_SRC sh
echo ${HOME}/fabulous/
#+END_SRC
* RESULTS
** Setup workstation
......@@ -125,8 +127,8 @@ cd ${WORKDIR}/build/src/test/cmd/
./fabulous_test -t BLOCK -s CGS -m 700 -A QR -u -o "incremental_gels"
#+end_src
file:~/fabulous/build/src/test/cmd/incremental_gels.res
file:~/fabulous/build/src/test/cmd/full_gels.res
file:~/fabulous/build/src/test/cmd/incremental_gels.res
file:~/fabulous/build/src/test/cmd/full_gels.res
**** plot the graphic
The curve for "full_gels facto" is zero because there is no factorization
part in the "full_gels". But even if it may be unexpected,
......@@ -393,11 +395,11 @@ ggplot(df, aes(x=nb_mvp)) +
#+end_src
*** GCR first results nrhs=10 m=300
**** test case
#+begin_src shell
#+begin_src shell
cd ${WORKDIR}/build/src/test/cmd/
./fabulous_test -A GCR -n 10 -m 300 -s IMGS -t BLOCK
#+end_src
file:~/fabulous/build/src/test/cmd/young1c.mtx_IMGS_BLOCK_BGCR.res
#+end_src
file:~/fabulous/build/src/test/cmd/young1c.mtx_IMGS_BLOCK_BGCR.res
**** graphic
The max and min displayed here are the max and min of the "not yet discarded" direction
This is why the min may be increasing on this graphic: This means a direction was discarded
......@@ -414,11 +416,11 @@ ggplot(df, aes(x=nb_mvp)) +
#+end_src
*** GCR first results nrhs=6 m=90
**** test case
#+begin_src shell
#+begin_src shell
cd ${WORKDIR}/build/src/test/cmd/
./fabulous_test -A GCR -n 6 -m 90 -s IMGS -t BLOCK
#+end_src
file:~/fabulous/build/src/test/cmd/young1c.mtx_IMGS_BLOCK_BGCR.res
#+end_src
file:~/fabulous/build/src/test/cmd/young1c.mtx_IMGS_BLOCK_BGCR.res
**** graphic
The max and min displayed here are the max and min of the "not yet discarded" direction
This is why the min may be increasing on this graphic: This means a direction was discarded
......@@ -435,22 +437,21 @@ ggplot(df, aes(x=nb_mvp)) +
#+end_src
*** BCG results
**** test case
#+begin_src shell
#+begin_src shell
cd ${WORKDIR}/build/src/test/cmd/
./fabulous_test -A BCG -n 6 -m 90 -s IMGS -t BLOCK -f ../data/bcsstk14.mtx -a REAL_DOUBLE
#+end_src
file:~/fabulous/build/src/test/cmd/bcsstk14.mtx_MGS_RUHE_BFBCG.res
./fabulous_test -A BCG -n 6 -m 90 -f ../data/bcsstk14.mtx -a REAL_DOUBLE -u -o bcg_bcsstk14
#+end_src
file:~/fabulous/build/src/test/cmd/bcg_bcsstk14.res
**** graphic
#+begin_src R
library(ggplot2)
df <- read.csv("./build/src/test/cmd/bcsstk14.mtx_MGS_RUHE_BFBCG.res")
library(latex2exp)
df <- read.csv("./build/src/test/cmd/bcg_bcsstk14.res")
ggplot(df, aes(x=nb_mvp)) +
geom_line(aes(y=maxRes, color="max")) +
geom_line(aes(y=minRes, color="min")) +
geom_hline(aes(yintercept=1e-4, color="threshold")) +
scale_y_log10() +
ggtitle("BCG nrhs=6 m=90")
ylab(TeX("$\\eta_b$")) +
ggtitle("BCG dim=1806 nrhs=6 m=90")
#+end_src
#+results:
[[file:/tmp/babel-3072220Y/figure30722x1N.png]]
......@@ -236,14 +236,14 @@ private:
template<class Matrix>
void apply_right_precond(Block<S> &Zj, Matrix &A, Block<S> &W)
{
_logger.notify_mvp_begin();
_logger.notify_precond_begin();
int64_t flops = 0;
if (A.useRightPrecond()) {
flops = A.PrecondBlockVect(W, Zj);
} else {
Zj.copy(W);
}
_logger.notify_mvp_end(flops);
_logger.notify_precond_end(flops);
}
template<class Matrix>
......
......@@ -197,14 +197,14 @@ private:
template<class Matrix>
void apply_right_precond(Block<S> &Zj, Matrix &A, Block<S> &R)
{
_logger.notify_mvp_begin();
_logger.notify_precond_begin();
int64_t flops = 0;
if (A.useRightPrecond()) {
flops = A.PrecondBlockVect(R, Zj);
} else {
Zj.copy(R);
}
_logger.notify_mvp_end(flops);
_logger.notify_precond_end(flops);
}
template<class Matrix>
......
......@@ -110,19 +110,26 @@ private:
_nb_mvp += X.get_nb_col();
}
template< class Matrix, class Block >
template<class Matrix, class Block>
void W_AMV(Matrix &A, Block &V, Block &W) // W = A*M*V
{
int64_t flops;
_logger.notify_mvp_begin();
if (A.useRightPrecond()) {
int64_t flops;
_logger.notify_precond_begin();
Block MV{W.get_nb_row(), V.get_nb_col()};
flops = A.PrecondBlockVect(V, MV); // MV = M * V
flops += A.MatBlockVect(MV, W); // W = A*MV
_logger.notify_precond_end(flops);
_logger.notify_mvp_begin();
flops = A.MatBlockVect(MV, W); // W = A*MV
_logger.notify_mvp_end(flops);
} else {
int64_t flops;
_logger.notify_mvp_begin();
flops = A.MatBlockVect(V, W); // W = A * V
_logger.notify_mvp_end(flops);
}
_logger.notify_mvp_end(flops);
_nb_mvp += V.get_nb_col();
}
......
......@@ -120,20 +120,27 @@ private:
_nb_mvp += X.get_nb_col();
}
template< class Matrix, class Block, class BlockWP >
template<class Matrix, class Block, class BlockWP>
void W_AMV(Matrix &A, Block &V, BlockWP &WP) // W = A*M*V
{
Block W = WP.get_W();
int64_t flops;
_logger.notify_mvp_begin();
if (A.useRightPrecond()) {
int64_t flops;
_logger.notify_precond_begin();
Block MV{W.get_nb_row(), V.get_nb_col()};
flops = A.PrecondBlockVect(V, MV); // MV = M * V
flops += A.MatBlockVect(MV, W); // B = A*MV
_logger.notify_precond_end(flops);
_logger.notify_mvp_begin();
flops = A.MatBlockVect(MV, W); // B = A*MV
_logger.notify_mvp_end(flops);
} else {
int64_t flops;
_logger.notify_mvp_begin();
flops = A.MatBlockVect(V, W); // W = A * V
_logger.notify_mvp_end(flops);
}
_logger.notify_mvp_end(flops);
_nb_mvp += V.get_nb_col();
}
......
......@@ -110,17 +110,24 @@ private:
void W_AMV(Matrix &A, Block &V, BlockWP &WP) // W = A*M*V
{
Block W = WP.get_W();
_logger.notify_mvp_begin();
int64_t flops;
if (A.useRightPrecond()) {
int64_t flops;
_logger.notify_precond_begin();
Block MV{W.get_nb_row(), V.get_nb_col()};
flops = A.PrecondBlockVect(V, MV); // MV = M * V
flops += A.MatBlockVect(MV, W); // B = A*MV
_logger.notify_precond_end(flops);
_logger.notify_mvp_begin();
flops = A.MatBlockVect(MV, W); // B = A*MV
_logger.notify_mvp_end(flops);
} else {
int64_t flops;
_logger.notify_mvp_begin();
flops = A.MatBlockVect(V, W); // W = A * V
_logger.notify_mvp_end(flops);
}
_logger.notify_mvp_end(flops);
_nb_mvp += V.get_nb_col();
}
......
......@@ -122,21 +122,26 @@ public:
* \brief perform \f$ P_{j} = [P_{j-1},\widetilde{W}] * \mathbb{W}_2 \f$
* \param[in] W2 \f$ \mathbb{W}_2 \f$
*/
void update_P(const Block<S> &W2)
int64_t update_P(const Block<S> &W2)
{
int nb_discarded_direction = W2.get_nb_col();
Block<S> tmp{get_nb_row(), nb_discarded_direction};
int M = this->get_nb_row();
int N = W2.get_nb_col(); /* nb_discarded_direction */
int K = this->get_nb_col();
Block<S> tmp{M, N};
lapacke::gemm( // P_{j} := [P_{j-1},~W] * \W_1
get_nb_row(), nb_discarded_direction, get_nb_col(),
get_ptr(), get_leading_dim(),
M, N, K,
this->get_ptr(), this->get_leading_dim(),
W2.get_ptr(), W2.get_leading_dim(),
tmp.get_ptr(), tmp.get_leading_dim(),
S{1.0}, S{0.0}
);
_cursor = nb_discarded_direction;
Block<S> P = get_P();
_cursor = N;
Block<S> P = this->get_P();
P.copy(tmp);
return lapacke::flops::gemm<S>(M, N, K);
}
/**
......
......@@ -200,11 +200,6 @@ private:
FABULOUS_THROW(Kernel, "ormqr 'RHS' err="<<err);
}
_last_column_factorized = true;
FABULOUS_DEBUG( "flops estimated 1 (individual kernel estimation)="<<flops);
int64_t flops2 = (fps::geqrf<S>(_nb_vect, _nb_vect)
- fps::geqrf<S>(_nb_vect, _nb_vect-_nbRHS));
FABULOUS_DEBUG( "flops estimated 2 (global estimation)="<<flops2);
_logger.notify_facto_end(flops);
}
......
#ifndef FABULOUS_LOGGER_HPP
#define FABULOUS_LOGGER_HPP
#include <functional>
#include <iostream>
#include <cstdio>
......@@ -74,16 +73,19 @@ public:
double total_time; /*!< total time for this iteration */
LogIterationStep mvp;
LogIterationStep precond;
LogIterationStep ortho;
LogIterationStep facto;
LogIterationStep least_square;
LogIterationStep ib;
static constexpr const char *log_header =
"global_iteration,local_iteration,krylov_space_size,nb_mvp,"
"current_block_size,minRes,maxRes,minRealRes,maxRealRes,time,"
"least_square_time,least_square_flops,facto_time,facto_flops,"
"mvp_time,mvp_flops,ortho_time,ortho_flops,ib_time,ib_flops,"
"global_iteration,local_iteration,"
"krylov_space_size,nb_mvp,current_block_size,"
"minRes,maxRes,minRealRes,maxRealRes,time,"
"mvp_time,mvp_flops,precond_time,precond_flops,"
"ortho_time,ortho_flops,facto_time,facto_flops,"
"least_square_time,least_square_flops,ib_time,ib_flops,"
"name";
static void print_header(std::ostream &o = std::cout)
......@@ -98,26 +100,20 @@ public:
void print(std::string name, std::ostream &o = std::cout) const
{
o << global_iteration<<","
<< local_iteration<<","
<< krylov_space_size<<","
<< nb_mvp<<","
<< current_block_size<<","
<< min<<","
<< max<<","
<< min_real<<","
<< max_real<<","
o << global_iteration<<","<< local_iteration<<","
<< krylov_space_size<<","<< nb_mvp<<","<< current_block_size<<","
<< min<<","<< max<<","<< min_real<<","<< max_real<<","
<< total_time<<","
<< least_square.time<<","
<< least_square.flops<<","
<< facto.time<<","
<< facto.flops<<","
<< mvp.time<<","
<< mvp.flops<<","
<< ortho.time<<","
<< ortho.flops <<","
<< ib.time << ","
<< ib.flops <<","
<< mvp.time << "," << mvp.flops<<","
<< precond.time<< "," << precond.flops<<","
<< ortho.time << "," << ortho.flops <<","
<< facto.time << "," << facto.flops<<","
<< least_square.time << "," << least_square.flops<<","
<< ib.time << "," << ib.flops <<","
<< name << "\n";
}
......@@ -165,6 +161,7 @@ private:
Timer _iterations_timer;
LogIterationStep _mvp;
LogIterationStep _precond;
LogIterationStep _ortho;
LogIterationStep _facto;
LogIterationStep _least_square;
......@@ -243,6 +240,7 @@ public:
}
void notify_mvp_begin() { _mvp.begin(); }
void notify_precond_begin() { _precond.begin(); }
void notify_ortho_begin() { _ortho.begin(); }
void notify_facto_begin() { _facto.begin(); }
void notify_least_square_begin() { _least_square.begin(); }
......@@ -251,6 +249,7 @@ public:
/* -------------------- notify END --------------------------------------*/
void notify_mvp_end(int64_t flops) { _mvp.end(flops); }
void notify_precond_end(int64_t flops) { _precond.end(flops); }
void notify_ortho_end(int64_t flops) { _ortho.end(flops); }
void notify_facto_end(int64_t flops) { _facto.end(flops); }
void notify_least_square_end(int64_t flops) { _least_square.end(flops); }
......@@ -274,7 +273,7 @@ public:
_iterations.push_back(
Entry{ _global_iteration, iter_id, size_krylov_space,
_total_mvp, mvp_diff, min, max, 0, 0, elapsed,
_mvp, _ortho, _facto, _least_square, _ib }
_mvp, _precond, _ortho, _facto, _least_square, _ib }
);
FABULOUS_NOTE(
"\t\t "<<Color::red<<"MIN="<<Color::reset<<std::scientific<<min
......@@ -287,9 +286,9 @@ public:
<< size_krylov_space<<Color::reset<<"]\n\n";
}
template<class Matrix, class Block, class Base, class Hess >
template<class Matrix, class Block, class Base, class Hess>
void log_real_residual( Matrix &A, const Block &B, const Block &X0,
Base &base, Hess &hess)
Base &base, Hess &hess )
{
if (!_log_real_residual)
return;
......@@ -331,54 +330,6 @@ public:
_iterations.back().max_real = max;
}
/**
* \brief iterator over the iterations with everything.
*/
void for_each_iteration(std::function<void(int,int,int,P,P,P,P,double)> func) const
{
for (auto &it : _iterations) {
func(it.global_iteration,
it.nb_mvp,
it.current_block_size,
it.min, it.max,
it.minReal, it.maxReal,
it.total_time);
}
}
/**
* \brief iterator over the iterations with everything.
*/
void for_each_iteration(
std::function<void(int,int,int,P,P,P,P,double,int,int)> func) const
{
for (auto &it : _iterations) {
func(it.glob_iteration,
it.nb_mvp,
it.current_block_size,
it.min, it.max,
it.minReal, it.maxReal,
it.total_time,
it.loc_iteration,
it.krylov_space_size);
}
}
/**
* \brief iterator over the iterations with only Arnoldi residual.
*/
void for_each_iteration(std::function<void(int,int,int,P,P,double)> func) const
{
for (auto &it : _iterations) {
func(it.global_iteration,
it.nb_mvp,
it.current_block_size,
it.min,
it.max,
it.total_time);
}
}
/**
* \brief Write down the datas logged as an array of double
*/
......
......@@ -30,14 +30,13 @@ ENDIF(FABULOUS_USE_CHAMELEON)
# 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_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_qribdr" COMMAND ./fabulous_test -m 300 -A QRIBDR -n 10 -r DEFLATED -p 5)
ADD_TEST(NAME "test_qribdr2" COMMAND ./fabulous_test -m 700 -A QRIBDR -n 100 -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_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
......@@ -53,9 +52,13 @@ IF(FABULOUS_USE_CHAMELEON)
ENDIF(FABULOUS_USE_CHAMELEON)
# orthoscheme 2
FOREACH(_algo STD IB)
FOREACH(_scheme CGS MGS ICGS IMGS)
FOREACH(_type RUHE BLOCK)
set(FABULOUS_ALGO_LIST STD IB)
set(FABULOUS_SCHEMA_LIST MGS IMGS CGS ICGS)
set(FABULOUS_TYPE_LIST RUHE BLOCK)
FOREACH(_algo IN LISTS FABULOUS_ALGO_LIST)
FOREACH(_scheme IN LISTS FABULOUS_SCHEMA_LIST)
FOREACH(_type IN LISTS FABULOUS_TYPE_LIST)
FOREACH(_space RANGE 200 600 200)
SET(_name "${_algo}_${_scheme}_${_type}_${_space}")
ADD_TEST(NAME "test_${_name}"
......