RESULTS.org 9.59 KB
Newer Older
1 2 3
# -*- mode: org -*-
# -*- coding: utf-8 -*-

4 5
#+TITLE: FABuLOuS numericals results

6
* Get Test files
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
7
** File list
8 9 10 11 12
   [[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]]
13

14 15 16 17 18 19 20 21
   [[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]]
22

23 24
** Downloads
#+begin_src shell :session *DOWNLOADS* :results silent
25 26 27 28 29 30 31
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"
    "ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/sherman/sherman5.mtx.gz"
    "ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/acoust/young1c.mtx.gz"
    "ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/acoust/young4c.mtx.gz"
)
32
mkdir -p ./build/src/data/
33 34 35
for i in "${files[@]}"; do
    filename=$(basename "$i")
    filename="${filename%.*}" # strip gz extension
36
    curl $i | zcat > ./build/src/data/$filename
37
done
38
#+end_src
39

MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
40 41
* Setup workstation
  Set this variable to your work directory (where you downloaded fabulous):
42 43
#+begin_src sh :session *TEST* :results silent
export WORKDIR=/home/tmijieux/fabulous # for example
44
#+end_src
45

46 47 48 49 50 51 52 53
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
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
54
* Run Examples
55
** Influence of restart(m) parameter
56 57
*** run test case
#+begin_src sh :session *TEST* :results silent
58
cd ${WORKDIR}/build/src/test_basic/
59 60 61 62 63 64
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
65

66
*** plot the graphic
67 68 69
    This graphic seems to indicate than a larger restart parameter help to speed up the convergence
    (but this is not necessarily true, a collection of references in IB-BGMRES-DR,
    Section 4.5, show that the contrary is possible)
70
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
71
library(ggplot2)
72 73 74 75 76
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))
77

78 79 80 81 82
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
83
** Influence of incremental QR factorization
84 85
*** run test case
#+begin_src sh :session *TEST* :results silent
86
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
87
mkdir -p ../data/res
88 89
./testMatrixMarketChoice -t BLOCK -s CGS -m 900 -A STDDR -u -o "Full_GELS"
./testMatrixMarketChoice -t BLOCK -s CGS -m 900 -A QR -u -o "GELS_with_Incremental_QR_factorization"
90
#+end_src
91
*** plot the graphic
92 93
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2)
94 95
df <- read.table("./build/src/data/res/Full_GELS.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/GELS_with_Incremental_QR_factorization.res", header=T))
96 97 98
ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) +
    geom_line() + ggtitle("Least Square duration (young1c)")
#+end_src
99 100 101
** Influence of the Algorithm
*** run test case
#+begin_src sh :session *TEST* :results silent
102
cd ${WORKDIR}/build/src/test_basic/
103 104 105
mkdir -p ../data/res
./testMatrixIW_DR
#+end_src
106
*** plot the graphic
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
#+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
122 123 124
** young1c (nrhs=6, m=90, k=5)
*** run test case
#+begin_src sh :session *TEST* :results silent
125
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
126
mkdir -p ../data/res
127
#nbRHS=6; maxSpace=90
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
128
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 -A QR  -u -o "BGMRES"
129
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 -A IB -u -o "IB-BGMRES"
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
130
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A QRDR -r DEFLATED -p 5 -u -o "BGMRES-DR"
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
131
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A IBDR -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
132 133
#+end_src
*** plot the graphic
134 135 136 137 138 139 140 141
    In this experience, I try to mimic the parameters of section 4.2, example 8.
    The experience results are different because the right hand side are generated randomly
    with different random number generator, the kernels used may be different and some
    algorithms may differ a little.

    For IB versions, the algorithms do differ:
    the experience presented here implement an extension computing 'Inexact breakdown on R0',
    while the result presented in the article do not (Figure 2, Example 8, left side)
142 143 144 145 146 147
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2)
library(latex2exp)
df <- read.table("./build/src/data/res/BGMRES.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/IB-BGMRES.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/BGMRES-DR.res", header=T))
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
148
df <- rbind(df, read.table("./build/src/data/res/IB-BGMRES-DR.res", header=T))
149 150 151 152 153 154
ggplot(df, aes(x=nb_mvp)) +
    geom_line(aes(y=maxRes, color=name)) +
    geom_line(aes(y=minRes, color=name)) +
    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
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
** lightInTissue (nrhs=6, m=90, k=5)
*** run test case
#+begin_src sh :session *TEST* :results silent
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
./testMatrixMarketChoice -f ../data/New/lightINtissue.mtx -k CSC -n 6 -m 90 -A QR -e 1e-6 -u -o "BGMRES"
./testMatrixMarketChoice -f ../data/New/lightINtissue.mtx -k CSC -n 6 -m 90 -A IB -e 1e-6 -u -o "IB-BGMRES"
./testMatrixMarketChoice -f ../data/New/lightINtissue.mtx -k CSC -n 6 -m 90 -A QRDR -r DEFLATED -p 5 -e 1e-6 -u -o "BGMRES-DR"
./testMatrixMarketChoice -f ../data/New/lightINtissue.mtx -k CSC -n 6 -m 90 -A IBDR -r DEFLATED -p 5 -e 1e-6 -u -o "IB-BGMRES-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)
library(latex2exp)
df <- read.table("./build/src/data/res/BGMRES.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/IB-BGMRES.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/BGMRES-DR.res", header=T))
df <- rbind(df, read.table("./build/src/data/res/IB-BGMRES-DR.res", header=T))
ggplot(df, aes(x=nb_mvp)) +
    geom_line(aes(y=maxRes, color=name)) +
    geom_line(aes(y=minRes, color=name)) +
    scale_y_log10() + geom_hline(aes(yintercept=1e-6, color="threshold")) +
    ggtitle("lightInTissue (nrhs=6, m=90 k=5)") + ylab(TeX("$\\eta_b$ (min, max)"))
#+end_src
180
** Influence of deflated restart (k) parameter (nrhs=6, m=90)
181 182
*** run test case
#+begin_src sh :session *TEST* :results silent
183
cd ${WORKDIR}/build/src/test_basic/
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A QRDR -r DEFLATED -p 5 -u -o "BGMRES-DR(05)"
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A QRDR -r DEFLATED -p 10 -u -o "BGMRES-DR(10)"
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A QRDR -r DEFLATED -p 15 -u -o "BGMRES-DR(15)"
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A QRDR -r DEFLATED -p 20 -u -o "BGMRES-DR(20)"
#+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(latex2exp)
df <- read.table("./build/src/data/res/BGMRES-DR(05).res", header=T)
df <- rbind(df, read.table("./build/src/data/res/BGMRES-DR(10).res", header=T))
df <- rbind(df, read.table("./build/src/data/res/BGMRES-DR(15).res", header=T))
df <- rbind(df, read.table("./build/src/data/res/BGMRES-DR(20).res", header=T))
ggplot(df, aes(x=nb_mvp)) +
    geom_line(aes(y=maxRes, color=name)) +
    geom_line(aes(y=minRes, color=name)) +
    scale_y_log10() + geom_hline(aes(yintercept=1e-6, color="threshold")) +
    ggtitle("young1c (nrhs=6, m=90 k=(5,10,15,20))") + ylab(TeX("$\\eta_b$ (min, max)"))
#+end_src