Commit 787a89f0 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

fix chameleon examples compilation and Update orgfile Links

parent 561fe57c
......@@ -96,11 +96,18 @@ echo ${HOME}/src/chameleon/
:END:
** Install Dependencies
*** FXT (tracing)
file:./LABBOOK.org::58
**** manually
[[file:LABBOOK.org::*installing%20fxt%20manually%20from%20sources][installing fxt manually from sources]]
**** Spack
let it be pulled automatically as a starpu dependency
*** StarPU
**** manually
Be sure that hwloc and mpi (and optionnaly fxt) are installed before starpu
file:./LABBOOK.org::72
[[file:LABBOOK.org::*configuring%20starpu][configuring starpu]]
**** Spack
let it be pulled automatically as a chameleon dependency
*** Chameleon
**** manually
:PROPERTIES:
:header-args:shell: :var WORKDIR=cham_root :session *build* :results silent
:END:
......@@ -147,7 +154,15 @@ cd ${WORDIR}/build
su -c 'make install'
# sudo make install
#+END_SRC
**** Spack
#+BEGIN_SRC shell
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
OR if you do not have mkl installed / if you do not want mkl
#+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:
#+BEGIN_SRC shell
......@@ -187,6 +202,14 @@ make -j4
rm -rf ${WORKDIR}/build/*
#+END_SRC
If you installed them with spack load dependency into environement
#+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:
#+BEGIN_SRC shell
mkdir -p ${WORKDIR}/build
......@@ -195,6 +218,7 @@ CC="${WORKDIR}/scripts/cc_args.py gcc" CXX="${WORKDIR}/scripts/cc_args.py g++" \
cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DFABULOUS_DEBUG_MODE=ON \
-DFABULOUS_LAPACKE_NANCHECK=OFF \
-DFABULOUS_USE_CHAMELEON=ON \
-DFABULOUS_BUILD_EXAMPLES=ON # \
# -DCHAMELEON_DIR=$(spack location -i chameleon)
#+END_SRC
......
......@@ -275,7 +275,7 @@ private:
:END:
[2017-05-14 Sun 04:17]
**** update developer notice about autocompletion
file:~/fabulous/INSTALL.org
[[file:INSTALL.org::*Autocompletion][Autocompletion]]
:LOGBOOK:
CLOCK: [2017-05-14 Sun 04:51]--[2017-05-14 Sun 04:52] => 0:01
:END:
......@@ -298,6 +298,7 @@ private:
file:./RESULTS.org
--> two new entry in RESULTS/Run Examples/qr ib dr timing/plot/
[[file:RESULTS.org::*papi%20(commit%2020c31809be1f04a1b575008f9527abbec07a2f21%20/%20branch%20papi)][papi (commit 20c31809be1f04a1b575008f9527abbec07a2f21 / branch papi)]]
Seem to work rather well with non-optimized reference LAPACK.
(even if both measure doesnt match perfectly).
......@@ -338,3 +339,11 @@ private:
CLOCK: [2017-05-19 Fri 19:23]--[2017-05-19 Fri 19:24] => 0:01
:END:
[2017-05-19 Fri 19:23]
*** 2017-05-22 Monday
**** GCR first implementation and results
[[file:RESULTS.org::*GCR%20first%20results%20nrhs=10%20m=300][GCR first results nrhs=10 m=300]]
[[file:RESULTS.org::*GCR%20first%20results%20nrhs=6%20m=90][GCR first results nrhs=6 m=90]]
:LOGBOOK:
CLOCK: [2017-05-22 Mon 10:11]--[2017-05-22 Mon 10:18] => 0:07
:END:
[2017-05-22 Mon 10:11]
......@@ -21,18 +21,28 @@ echo ${HOME}/fabulous/
source /opt/intel/mkl/bin/mklvars.sh intel64
#+END_SRC
or with spack
#+BEGIN_SRC shell
spack load mkl
spack load chameleon
spack load starpu+fxt
#+END_SRC
Setup the build system:
#+BEGIN_SRC shell
mkdir -p ${WORKDIR}/build
cd ${WORKDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DFABULOUS_DEBUG_MODE=ON \
-DFABULOUS_BUILD_EXAMPLES=ON \
-DFABULOUS_USE_CHAMELEON=ON \
-DFABULOUS_LAPACKE_NANCHECK=OFF # \
# -DCHAMELEON_DIR=$(spack location -i chameleon)
#+END_SRC
Eventually compile fabulous:
#+BEGIN_SRC shell
cd ${WORKDIR}/build
make -j4
#+END_SRC
......@@ -397,3 +407,50 @@ ggplot(df, aes(x=nb_mvp)) +
scale_y_log10() + geom_hline(aes(yintercept=1e-6, color="threshold")) +
ggtitle("young1c (nrhs=6, m=90 k=5)") + ylab(TeX("$\\eta_b$ (min, max)"))
#+END_SRC
*** GCR first results nrhs=10 m=300
**** test case
#+BEGIN_SRC shell
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
./testGCR 10 300
#+END_SRC
file:~/fabulous/build/src/data/res/young1c_IMGS_BLOCK_BGCR.res
**** graphic
The max and min displayed here are the max and min of the not discared direction
This is why the min may be increasing on this graphic: This means a direction was discarded
and its norm is not taken into account anymore.
#+BEGIN_SRC R
library(ggplot2)
df <- read.csv("./build/src/data/res/young1c_IMGS_BLOCK_BGCR.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("GCR nrhs=10 m=300")
#+END_SRC
*** GCR first results nrhs=6 m=90
**** test case
#+BEGIN_SRC shell
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
./testGCR 6 90
#+END_SRC
file:~/fabulous/build/src/data/res/young1c_IMGS_BLOCK_BGCR.res
**** graphic
The max and min displayed here are the max and min of the not discared direction
This is why the min may be increasing on this graphic: This means a direction was discarded
and its norm is not taken into account anymore.
#+BEGIN_SRC R
library(ggplot2)
df <- read.csv("./build/src/data/res/young1c_IMGS_BLOCK_BGCR.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("GCR nrhs=6 m=90")
#+END_SRC
#+results:
[[file:/tmp/babel-62751xo/figure6275YIP.png]]
......@@ -46,44 +46,44 @@ inline auto cham_tl() { return Algorithm<ARNOLDI_CHAM_TL>{}; }
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_STD> &)
{
return (o << "");
return (o << "BGMRES");
}
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_QR> &)
{
return (o << "QR-");
return (o << "QR-BGMRES");
}
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_QRDR> &)
{
return (o << "QR-");
return (o << "QR-BGMRES");
}
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_IB> &)
{
return (o << "IB-");
return (o << "IB-BGMRES");
}
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_IBDR> &)
{
return (o << "IB-");
return (o << "IB-BGMRES");
}
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_QRIBDR> &)
{
return (o << "QR-IB-");
return (o << "QR-IB-BGMRES");
}
#ifdef FABULOUS_USE_CHAMELEON
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_CHAM_QR> &)
{
return (o << "CHAM_QR");
return (o << "CHAM_QR-BGMRES");
}
inline std::ostream& operator<<(std::ostream &o, const Algorithm<ARNOLDI_CHAM_TL> &)
{
return (o << "CHAM_TL");
return (o << "CHAM_TL-BGMRES");
}
#endif // FABULOUS_USE_CHAMELEON
......@@ -96,7 +96,7 @@ inline auto std() { return Algorithm<::fabulous::bgcr::Arnoldi>{}; }
inline std::ostream& operator<<(std::ostream &o, const Algorithm<::fabulous::bgcr::Arnoldi> &)
{
return (o << "");
return (o << "BGCR");
}
}; // end namespace bgcr
......
......@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
MORSE_Disable(MORSE_AUTOTUNING);
MORSE_user_tag_size(31, 16);
using P = double;
using P = double;
using S = std::complex<P>;
using Matrix = ::fabulous::UserInputMatrix<S>;
using Block = ::fabulous::Block<S>;
......@@ -27,13 +27,13 @@ int main(int argc, char *argv[])
mml.LoadMatrix(mat, "../data/young1c.mtx");
int nbRHS = 10;
int max_krylov_space_size = mat.size()+1;
int max_space = mat.size()+1;
int maxMVP = 10000;
if (args.size() > 1)
nbRHS = std::stoi(args[1]);
if (args.size() > 2)
max_krylov_space_size = std::stoi(args[2]);
max_space = std::stoi(args[2]);
int dim = mat.size();
Block XExact{dim, nbRHS};
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
auto r = run_test_BGMRES_filelog(
"young1c_RANDOM_RHS__CHAM_DESC",
mat, RHS, XExact, epsilon,
arnoldi_cham_qr(), maxMVP, max_krylov_space_size,
bgmres::cham_qr(), maxMVP, max_space,
orthogonalization(OrthoScheme::IMGS, OrthoType::BLOCK),
classic_restart()
);
......
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
auto r = run_test_BGMRES_filelog(
"young1c_CHAM_TL",
mat, RHS, XExact, epsilon,
arnoldi_cham_tl(), max_mvp, max_space,
bgmres::cham_tl(), max_mvp, max_space,
orthogonalization(OrthoScheme::IMGS, OrthoType::BLOCK),
classic_restart()
);
......
......@@ -112,7 +112,7 @@ std::string get_formatted_filename(
name << label;
if (append_suffix) {
name <<"_" <<ortho.get_scheme()<<"_"<<ortho.get_type()<<"_"
<< algo <<"BGMRES"<< get_type(restart);
<< algo << get_type(restart);
}
return name.str();
}
......
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