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

4 5
#+TITLE: FABuLOuS numericals results

6
#+NAME: fabulous_root
7
|/home/tmijieux/fabulous/|
8

9 10 11 12 13 14 15 16
* RESULTS
  :PROPERTIES:
  :header-args:shell: :var WORKDIR=fabulous_root :session *fabulous* :results silent
  :header-args:R: :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session
  :END:
** Setup workstation
To be able to run the following test cases, you must have compiled fabulous:
#+begin_src shell
17 18 19 20 21 22 23
# optionnally: load mkl into environement:
source /opt/intel/mkl/bin/mklvars.sh intel64
mkdir -p ${WORKDIR}/build
cd ${WORKDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DFABULOUS_DEBUG_MODE=ON \
      -DFABULOUS_LAPACKE_NANCHECK=OFF # -DCHAMELEON_DIR=$(spack location -i chameleon)
24 25 26 27 28 29 30
make
#+end_src
** Get Test files
*** File list
    [[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)
31

32
    [[file:./build/src/data/sherman4.mtx][sherman4.mtx]]
33

34 35 36
    [[file:./build/src/data/young4c.mtx][young4c.mtx]]
    [[file:./build/src/data/bcsstk14.mtx][bcsstk14.mtx]]
    [[file:./build/src/data/sherman5.mtx][sherman5.mtx]]
37

38 39 40 41 42 43 44
    [[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 sh :session *fabulous_downloads* :results silent
cd $WORKDIR
45 46 47 48 49 50 51
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"
)
52
mkdir -p ./build/src/data/
53 54 55
for i in "${files[@]}"; do
    filename=$(basename "$i")
    filename="${filename%.*}" # strip gz extension
56
    curl $i | zcat > ./build/src/data/$filename
57
done
58 59 60 61 62
 #+end_src
** Run Examples
*** Influence of restart(m) parameter
**** run test case
 #+begin_src shell
63
cd ${WORKDIR}/build/src/test_basic/
64 65 66 67 68
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
69 70 71 72 73 74
 #+end_src
**** plot the graphic
     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)
 #+begin_src R
75
library(ggplot2)
76 77 78 79 80 81 82 83 84
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))
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)")
85 86 87 88
 #+end_src
*** Influence of incremental QR factorization
**** run test case
 #+begin_src shell
89
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
90
mkdir -p ../data/res
91 92
./testMatrixMarketChoice -t BLOCK -s CGS -m 700 -A STDDR -u -o "Full_GELS"
./testMatrixMarketChoice -t BLOCK -s CGS -m 700 -A QR -u -o "GELS_with_Incremental_QR_factorization"
93 94 95
 #+end_src
**** plot the graphic
 #+begin_src R
96
library(ggplot2)
97 98
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))
99 100
ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) +
    geom_line() + ggtitle("Least Square duration (young1c)")
101 102 103 104
 #+end_src
*** Influence of the Algorithm
**** run test case
 #+begin_src shell
105
cd ${WORKDIR}/build/src/test_basic/
106 107
mkdir -p ../data/res
./testMatrixIW_DR
108 109 110
 #+end_src
**** plot the graphic
 #+begin_src R
111 112 113 114 115 116 117 118 119 120 121 122 123
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)")
124 125 126 127
 #+end_src
*** young1c (nrhs=6, m=90, k=5)
**** run test case
 #+begin_src shell
128
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
129
mkdir -p ../data/res
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
130
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 -A QR  -u -o "BGMRES"
131
./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
132
./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
133
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A IBDR -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
134 135 136 137 138 139
 #+end_src
**** plot the graphic
     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.
140

141 142 143 144
     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)
 #+begin_src R
145 146 147 148 149
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
150
df <- rbind(df, read.table("./build/src/data/res/IB-BGMRES-DR.res", header=T))
151 152 153 154 155
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)"))
156 157 158 159
 #+end_src
*** lightInTissue (nrhs=6, m=90, k=5)
**** run test case
 #+begin_src shell
160 161 162 163 164 165 166
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"
167 168 169
 #+end_src
**** plot the graphic
 #+begin_src R
170 171 172 173 174 175 176 177 178 179 180
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)"))
181 182 183 184
 #+end_src
*** Influence of deflated restart (k) parameter (nrhs=6, m=90)
**** run test case
 #+begin_src shell
185
cd ${WORKDIR}/build/src/test_basic/
186 187 188 189 190 191
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)"
192 193 194
 #+end_src
**** plot the graphic
 #+begin_src R
195 196 197 198 199 200 201 202 203 204 205
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)"))
206 207 208 209
 #+end_src
*** csc lightInTissue timing
**** run test
     #+begin_src shell
210 211 212 213 214
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 IBDR \
                         -r DEFLATED -p 5 -e 1e-4 -u -o "IB-BGMRES-DR"
215 216 217
     #+end_src
**** plot
     #+begin_src R
218 219 220 221 222 223 224 225 226 227 228 229
library(ggplot2)
library(latex2exp)
df <- read.table("./build/src/data/res/IB-BGMRES-DR.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=time, color="total")) +
    geom_line(aes(y=least_square_time, color="gels")) +
    geom_line(aes(y=mvp_spent, color="mvp")) +
    geom_line(aes(y=ortho_spent, color="ortho")) +
    ggtitle("lightInTissue (nrhs=6, m=90 k=5)") + ylab(TeX("$\\eta_b$ (min, max)"))
230 231 232 233
     #+end_src
*** qr ib dr
**** run test
     #+begin_src shell
234 235 236 237 238
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A IBDR -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A QRIBDR -r DEFLATED -p 5 -u -o "QR-IB-BGMRES-DR"
239 240 241
     #+end_src
**** plot
     #+begin_src R
242 243 244 245 246 247 248 249 250
library(ggplot2)
library(latex2exp)
df <- read.table("./build/src/data/res/IB-BGMRES-DR.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/QR-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("young1c (nrhs=6, m=90 k=5)") + ylab(TeX("$\\eta_b$ (min, max)"))
251 252 253 254
     #+end_src
*** qr ib dr timing
**** run test
     #+begin_src shell
255 256 257 258 259
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
./testMatrixMarketChoice -n 100 -t RUHE -s MGS -m 700 -e 1e-4 -A IBDR -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
./testMatrixMarketChoice -n 100 -t RUHE -s MGS -m 700 -e 1e-4 -A QRIBDR -r DEFLATED -p 5 -u -o "QR-IB-BGMRES-DR"
260 261 262
     #+end_src
**** plot
     #+begin_src R
263 264 265 266 267 268 269 270
library(ggplot2)
library(latex2exp)
df <- read.table("./build/src/data/res/IB-BGMRES-DR.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/QR-IB-BGMRES-DR.res", header=T))
ggplot(df, aes(x=nb_mvp)) +
    geom_line(aes(y=least_square_time, color=name)) +
    geom_line(aes(y=least_square_time, color=name)) +
    ggtitle("young1c (nrhs=100, m=500 k=5, max_mvp=10000)") + ylab(TeX("$\\eta_b$ (min, max)"))
271
     #+end_src
272
*** with chameleon
273 274 275 276 277
**** run test
     #+begin_src shell
cd ${WORKDIR}/build/src/test_cham/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
278 279 280 281 282 283 284
# following variable MUST have a trailing slash
export STARPU_FXT_PREFIX=${WORKDIR}/build/
. /opt/intel/mkl/bin/mklvars.sh intel64
# plafrim:
#spack load mpi; spack load hwloc; spack load starpu; spack load chameleon
#option -z for chameleon with 1 core only
./testMatrixMarketChoice_cham -z -n 50 -e 1e-4 -A CHAMDR -u -o "CHAM-TL"
285 286 287
# ./testMatrixMarketChoice_cham -n 100 -e 1e-4 -A CHAMQR -u -o "CHAM-QR"
     #+end_src
**** plot
288 289 290

     The following graph represent relative percentages spent
     in each stage of the algorithm
291 292 293 294
     #+begin_src R
library(ggplot2)
library(latex2exp)
df <- read.table("./build/src/data/res/CHAM-TL.res", header=T)
295 296 297 298 299 300 301
ggplot(df, aes(x=global_iteration)) +
    geom_line(aes(y=100, color="total")) +
    geom_line(aes(y=(least_square_time/time)*100, color="Gels")) +
    geom_line(aes(y=(ortho_time/time)*100, color="Ortho")) +
    geom_line(aes(y=(mvp_time/time)*100, color="Mvp")) +
    geom_line(aes(y=((mvp_time+ortho_time+least_square_time)/time)*100, color="SUM")) +
    ggtitle("Relative % time spent (young1c CHAM) (nrhs=50)") + ylab(TeX("$\\% time"))
302
     #+end_src
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
*** young1c chameleon comparison QR (nrhs=6, m=90, k=5)
**** run test case
 #+begin_src shell
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 -A QR  -u -o "QR"

cd ${WORKDIR}/build/src/test_cham/
./testMatrixMarketChoice_cham -z -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A CHAMQR -u -o "CHAMQR"
 #+end_src
**** plot the graphic
 #+begin_src R
library(ggplot2)
library(latex2exp)
df <- read.table("./build/src/data/res/QR.res", header=T)
df <- rbind(df, read.table("./build/src/data/res/CHAMQR.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)") + ylab(TeX("$\\eta_b$ (min, max)"))
 #+end_src