Commit e801e6f0 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Update RESULTS.org; work with sessions

parent 2567f034
# -*- mode: org -*-
# -*- coding: utf-8 -*-
#+TITLE: FABuLOuS numericals results
#+STARTUP: showeverything
* RESULTS
** Test files
[[file:./data/bcsstk14.mtx][bcsstk14.mtx]]
[[file:./data/sherman4.mtx][sherman4.mtx]]
[[file:./data/sherman5.mtx][sherman5.mtx]]
[[file:./data/young1c.mtx][young1c.mtx]]
[[file:./data/young4c.mtx][young4c.mtx]]
** Get Test files
[[file:./build/src/data/young1c.mtx][young1c.mtx]]
[[file:./build/src/data/matrices_BEM/MatconeSpherePC_MAIN_MAIN_0][MatconeSpherePC_MAIN_MAIN_0]] (binary)
[[file:./build/src/data/matrices_BEM/coneSpherePC_RHS_MAIN.0.res][coneSpherePC_RHS_MAIN.0.res]] (binary)
[[file:./build/src/data/sherman4.mtx][sherman4.mtx]]
[[file:./data/bidiagonalmatrix1.mtx][bidiagonalmatrix1.mtx]]
[[file:./data/bidiagonalmatrix2.mtx][bidiagonalmatrix2.mtx]]
[[file:./data/bidiagonalmatrix3.mtx][bidiagonalmatrix3.mtx]]
[[file:./data/bidiagonalmatrix4.mtx][bidiagonalmatrix3.mtx]]
[[file:./build/src/data/young4c.mtx][young4c.mtx]]
[[file:./build/src/data/bcsstk14.mtx][bcsstk14.mtx]]
[[file:./build/src/data/sherman5.mtx][sherman5.mtx]]
[[file:./build/src/data/bidiagonalmatrix1.mtx][bidiagonalmatrix1.mtx]]
[[file:./build/src/data/bidiagonalmatrix2.mtx][bidiagonalmatrix2.mtx]]
[[file:./build/src/data/bidiagonalmatrix3.mtx][bidiagonalmatrix3.mtx]]
[[file:./build/src/data/bidiagonalmatrix4.mtx][bidiagonalmatrix3.mtx]]
*** Downloads
#+begin_src shell :session *downloads* :results silent
#+begin_src shell :session *DOWNLOADS* :results none
files=(
"ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/bcsstruc2/bcsstk14.mtx.gz"
"ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/sherman/sherman4.mtx.gz"
......@@ -23,69 +30,92 @@ files=(
"ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/acoust/young1c.mtx.gz"
"ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/acoust/young4c.mtx.gz"
)
mkdir -p ./data/
mkdir -p ./build/src/data/
for i in "${files[@]}"; do
filename=$(basename "$i")
filename="${filename%.*}" # strip gz extension
curl $i | zcat > ./data/$filename
curl $i | zcat > ./build/src/data/$filename
done
#+end_src
#+end_src
** Run Examples
#+begin_src bash :session foo :results output :exports both
cd fabulous/build/src/test_core/
mkdir -p ../data/res
./testMatrixMarket 100 500
Set this variable to your work directory (where you downloaded fabulous):
#+begin_src sh :session *TEST* :results none
export WORKDIR=/home/tmijieux/fabulous
#+end_src
# most matrix market with all ortho scheme + variable max_space (Krylov search space) parameter:
./testOrthoSchemes
To be able to run the following test cases, you must have compiled fabulous:
#+begin_src sh :session *TEST* :results output :exports both
cd ${WORKDIR}
mkdir -p build
cd build
cmake .. # -DCHAMELEON_DIR=$(spack location -i chameleon)
make
#+end_src
# bcsstk14 with IB CGS_RUHE:
./test_RUHE_MGS_bcsstk_EXACT_BREAKDOWN
#+end_src
** Plot the results
#+begin_src R :session *R* :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both
#!/usr/bin/env Rscript
args <- commandArgs(TRUE)
if (length(args) < 1) {
stop("need filename as parameter")
}
*** Impact of restart parameter
**** run test case
#+begin_src sh :session *TEST* :results none
cd ${WORKDIR}/build/src/test_core/
mkdir -p ../data/res
sizes=(200 400 600 800 1000)
for siz in "${sizes[@]}"; do
./testMatrixMarketChoice -t RUHE -s IMGS -m $siz -A IB -u -o "r=$siz"
done
#+end_src
**** plot the graphic
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2)
library(reshape2)
library(tools)
df <- read.table(args[1], header=T)
name <- basename(file_path_sans_ext(args[1]))
df$ID <- name
if (length(args) >= 2) {
for (i in 2:length(args)) {
d <- read.table(args[i], header=T)
d$ID <- basename(file_path_sans_ext(args[i]))
df <- rbind(df, d)
}
}
df <- read.table("./build/src/data/res/r=200.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/r=400.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/r=600.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/r=800.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/r=1000.res", header=T))
plot_fabulous <- function(df) {
id = df$ID;
df$ID1 <- paste(id, "minRes")
df$ID2 <- paste(id, "maxRes")
df$ID3 <- paste(id, "minRealRes")
df$ID4 <- paste(id, "maxRealRes")
ggplot(df, aes(x=nb_mvp, y=maxRes, color=name)) +
geom_line() +
geom_hline(aes(yintercept=1e-4, color="threshold")) +
scale_y_log10() + ggtitle("Memory usage influence (young1c IB IMGS-RUHE)")
#+end_src
p <- ggplot(df, aes(nb_mvp)) +
geom_line(aes(y=minRes, color=ID1)) +
geom_line(aes(y=maxRes, color=ID2)) +
geom_line(aes(y=minRealRes, color=ID3)) +
geom_line(aes(y=maxRealRes, color=ID4))
pl = p + scale_y_log10()
return (pl);
}
*** Impact of incremental QR factorization
**** run test case
#+begin_src sh :session *TEST* :results none
cd ${WORKDIR}/build/src/test_core/
./testMatrixMarketChoice -t BLOCK -s CGS -m 900 -A STDDR -u -o "Basic_GELS"
./testMatrixMarketChoice -t BLOCK -s CGS -m 900 -A QR -u -o "QR_factorization"
#+end_src
**** plot the graphic
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2)
df <- read.table("./build/src/data/res/Basic_GELS.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/QR_factorization.res", header=T))
ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) +
geom_line() + ggtitle("Least Square duration (young1c)")
pl <- plot_fabulous(df)
pl
#+end_src
#+end_src
*** Influence of the Algorithm
**** run test case
#+begin_src sh :session *TEST* :results none
cd ${WORKDIR}/build/src/test_core/
mkdir -p ../data/res
./testMatrixIW_DR
#+end_src
**** plot the graphic
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2)
df <- read.table("./build/src/data/res/STD.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/STD+DR.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/IB.res", header=T))
name <- df$name
df$name_min <- paste(name, " minRes")
df$name_max <- paste(name, " maxRes")
ggplot(df, aes(x=nb_mvp)) +
geom_line(aes(y=maxRes, color=name_max)) +
geom_line(aes(y=minRes, color=name_min)) +
geom_hline(aes(yintercept=1e-7, color="threshold")) +
scale_y_log10() +
ggtitle("coneSphere problem with CGS RUHE (STD, STD+DR and IB algorithm)")
#+end_src
......@@ -16,7 +16,7 @@
** TODO Improve Logging
*** DONE Add timer for iterations (global)
*** TODO Improve timer semantics and logs
*** TODO Add timer for orthogonalization, least square and matrix vector product
*** DONE Add timer for orthogonalization, least square and matrix vector product
*** TODO Add global timer
*** TODO Add flops/s counter
** TODO Improve RESULTS.org
......@@ -26,3 +26,4 @@
* TODO Implement IB+DR+QR
* TODO iterated orthogonalization stop criterion
* TODO find out how to link fabulous with parallel mkl with spack
......@@ -36,10 +36,10 @@ struct LogEntry
{
o <<"global_iteration\tlocal_iteration\tkrylov_space_size\tnb_mvp\t"
"current_block_size\tminRes\tmaxRes\tminRealRes\tmaxRealRes\ttime\t"
"least_square_time\tmvp_spent\tortho_spent\tID\n";
"least_square_time\tmvp_spent\tortho_spent\tname\n";
}
void print(std::string ID, std::ostream &o = std::cout)
void print(std::string name, std::ostream &o = std::cout)
{
o << glob_iteration<<"\t"
<< loc_iteration<<"\t"
......@@ -54,7 +54,7 @@ struct LogEntry
<< least_square_spent<<"\t"
<< mvp_spent<<"\t"
<< ortho_spent<<"\t"
<< ID << "\n";
<< name << "\n";
}
};
......@@ -308,12 +308,11 @@ public:
return _array.data();
}
void print(std::string ID, std::ostream& o = std::cout)
void print(std::string name, std::ostream& o = std::cout)
{
LogEntry<P>::print_header(o);
for (auto&&it : _iterations)
it.print(ID, o);
it.print(name, o);
}
};
......
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