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

4 5
#+TITLE: FABuLOuS numericals results

6
#+NAME: fabulous_root
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
7 8 9
#+BEGIN_SRC shell
echo ${HOME}/fabulous/
#+END_SRC
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
17
   To be able to run the following test cases, you must have compiled fabulous:
18

19 20
   For this, you may possibly need load mkl into environement:
   #+BEGIN_SRC shell
21
source /opt/intel/mkl/bin/mklvars.sh intel64
22
   #+END_SRC
23

24 25
   Setup the build system:
   #+BEGIN_SRC shell
26 27 28 29
mkdir -p ${WORKDIR}/build
cd ${WORKDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DFABULOUS_DEBUG_MODE=ON \
30 31 32
      -DFABULOUS_LAPACKE_NANCHECK=OFF # \
    # -DCHAMELEON_DIR=$(spack location -i chameleon)
   #+END_SRC
33

34 35 36 37
   Eventually compile fabulous:
   #+BEGIN_SRC shell
make -j4
   #+END_SRC
38

39 40 41 42 43
** 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)
44

45
    [[file:./build/src/data/sherman4.mtx][sherman4.mtx]]
46

47 48 49
    [[file:./build/src/data/young4c.mtx][young4c.mtx]]
    [[file:./build/src/data/bcsstk14.mtx][bcsstk14.mtx]]
    [[file:./build/src/data/sherman5.mtx][sherman5.mtx]]
50

51 52 53 54 55
    [[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
56
    #+BEGIN_SRC sh :session *fabulous_downloads* :results silent
57
cd $WORKDIR
58 59 60 61 62 63 64
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"
)
65
mkdir -p ./build/src/data/
66 67 68
for i in "${files[@]}"; do
    filename=$(basename "$i")
    filename="${filename%.*}" # strip gz extension
69
    curl $i | zcat > ./build/src/data/$filename
70
done
71
    #+END_SRC
72 73 74
** Run Examples
*** Influence of restart(m) parameter
**** run test case
75
     #+BEGIN_SRC shell
76
cd ${WORKDIR}/build/src/test_basic/
77 78 79 80 81
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
82
     #+END_SRC
83
**** plot the graphic
84 85 86 87 88
     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
89
library(ggplot2)
90 91 92 93 94
df <- read.csv("./build/src/data/res/r=200.res")
df <- rbind(df, read.csv("./build/src/data/res/r=400.res"))
df <- rbind(df, read.csv("./build/src/data/res/r=600.res"))
df <- rbind(df, read.csv("./build/src/data/res/r=800.res"))
df <- rbind(df, read.csv("./build/src/data/res/r=1000.res"))
95 96 97 98
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)")
99
     #+END_SRC
100 101
*** Influence of incremental QR factorization
**** run test case
102
     #+BEGIN_SRC shell
103
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
104
mkdir -p ../data/res
105 106 107 108 109
./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"
     #+END_SRC
110
**** plot the graphic
111
     #+BEGIN_SRC R
112
library(ggplot2)
113
df <- read.csv("./build/src/data/res/Full_GELS.res")
114 115
df <- rbind(df, read.csv("./build/src/data/res/" +
                         "GELS_with_Incremental_QR_factorization.res"))
116
ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) +
117 118 119
    geom_line() +
    ggtitle("Least Square duration (young1c)")
     #+END_SRC
120 121
*** Influence of the Algorithm
**** run test case
122
     #+BEGIN_SRC shell
123
cd ${WORKDIR}/build/src/test_basic/
124 125
mkdir -p ../data/res
./testMatrixIW_DR
126
     #+END_SRC
127
**** plot the graphic
128
     #+BEGIN_SRC R
129
library(ggplot2)
130 131 132 133
library(latex2exp)
df <- read.csv("./build/src/data/res/STD.res")
df <- rbind(df, read.csv("./build/src/data/res/STD+DR.res"))
df <- rbind(df, read.csv("./build/src/data/res/IB.res"))
134
name <- df$name
135 136
df$name_min <- paste(name, " min")
df$name_max <- paste(name, " max")
137 138 139 140
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")) +
141
    scale_y_log10() + ylab(TeX("$\\eta_b$")) +
142
    ggtitle("coneSphere problem with CGS RUHE (STD, STD+DR and IB algorithm)")
143
     #+END_SRC
144 145
*** young1c (nrhs=6, m=90, k=5)
**** run test case
146
     #+BEGIN_SRC shell
147
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
148
mkdir -p ../data/res
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
149
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 -A QR  -u -o "BGMRES"
150
./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
151
./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
152
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A IBDR -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
153
     #+END_SRC
154 155
**** plot the graphic
     In this experience, I try to mimic the parameters of section 4.2, example 8.
156 157 158
     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.
159

160
     For IB versions, the algorithms do differ:
161 162 163 164
     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
165 166
library(ggplot2)
library(latex2exp)
167 168 169 170
df <- read.csv("./build/src/data/res/BGMRES.res")
df <- rbind(df, read.csv("./build/src/data/res/IB-BGMRES.res"))
df <- rbind(df, read.csv("./build/src/data/res/BGMRES-DR.res"))
df <- rbind(df, read.csv("./build/src/data/res/IB-BGMRES-DR.res"))
171 172 173 174 175
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)"))
176
     #+END_SRC
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
177

178 179
*** lightInTissue (nrhs=6, m=90, k=5)
**** run test case
180
     #+BEGIN_SRC shell
181 182 183
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
184 185 186 187 188 189 190 191 192 193 194
./testMatrixMarketChoice -f ../data/matlab/lightINtissue.mtx -k CSC \
                         -n 6 -m 90 -A QR -e 1e-6 -u -o "BGMRES"
./testMatrixMarketChoice -f ../data/matlab/lightINtissue.mtx -k CSC \
                         -n 6 -m 90 -A IB -e 1e-6 -u -o "IB-BGMRES"
./testMatrixMarketChoice -f ../data/matlab/lightINtissue.mtx -k CSC \
                         -n 6 -m 90 -A QRDR -r DEFLATED -p 5 -e 1e-6 \
                         -u -o "BGMRES-DR"
./testMatrixMarketChoice -f ../data/matlab/lightINtissue.mtx -k CSC \
                         -n 6 -m 90 -A IBDR -r DEFLATED -p 5 -e 1e-6 \
                         -u -o "IB-BGMRES-DR"
     #+END_SRC
195
**** plot the graphic
196
     #+BEGIN_SRC R
197 198
library(ggplot2)
library(latex2exp)
199 200 201 202
df <- read.csv("./build/src/data/res/BGMRES.res")
df <- rbind(df, read.csv("./build/src/data/res/IB-BGMRES.res"))
df <- rbind(df, read.csv("./build/src/data/res/BGMRES-DR.res"))
df <- rbind(df, read.csv("./build/src/data/res/IB-BGMRES-DR.res"))
203 204 205 206
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")) +
207 208 209
    ggtitle("lightInTissue (nrhs=6, m=90 k=5)") +
    ylab(TeX("$\\eta_b$ (min, max)"))
     #+END_SRC
210 211
*** Influence of deflated restart (k) parameter (nrhs=6, m=90)
**** run test case
212
     #+BEGIN_SRC shell
213
cd ${WORKDIR}/build/src/test_basic/
214 215
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
216 217 218 219 220 221 222 223 224
./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
225
**** plot the graphic
226
     #+BEGIN_SRC R
227 228
library(ggplot2)
library(latex2exp)
229 230 231 232
df <- read.csv("./build/src/data/res/BGMRES-DR(05).res")
df <- rbind(df, read.csv("./build/src/data/res/BGMRES-DR(10).res"))
df <- rbind(df, read.csv("./build/src/data/res/BGMRES-DR(15).res"))
df <- rbind(df, read.csv("./build/src/data/res/BGMRES-DR(20).res"))
233 234 235 236
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")) +
237 238 239
    ggtitle("young1c (nrhs=6, m=90 k=(5,10,15,20))") +
    ylab(TeX("$\\eta_b$ (min, max)"))
     #+END_SRC
240 241
*** csc lightInTissue timing
**** run test
242
     #+BEGIN_SRC shell
243
cd ${WORKDIR}/build/src/test_basic/
244
nmkdir -p ../data/res
245
#nbRHS=6; maxSpace=90
246
./testMatrixMarketChoice -f ../data/matlab/lightINtissue.mtx -k CSC \
247 248 249
                         -t BLOCK -s CGS \
                         -n 6 -m 90 -A IBDR -r DEFLATED -p 5 -e 1e-4 \
                         -u -o "IB-BGMRES-DR"
250
     #+END_SRC
251
**** plot
252
     #+BEGIN_SRC R
253 254
library(ggplot2)
library(latex2exp)
255 256
df <- read.csv("./build/src/data/res/IB-BGMRES-DR.res")
ggplot(df, aes(x=global_iteration)) +
257 258
    geom_line(aes(y=time, color="total")) +
    geom_line(aes(y=least_square_time, color="gels")) +
259 260 261
    geom_line(aes(y=mvp_time, color="mvp")) +
    geom_line(aes(y=ortho_time, color="ortho")) +
    geom_line(aes(y=ib_time, color="ib")) +
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
262
#   geom_line(aes(y=ib_time+ortho_time+mvp_time+least_square_time, color="SUM")) +
263 264
    ylab(TeX("Time (s)")) +
    ggtitle("lightInTissue (nrhs=6, m=90 k=5)")
265
     #+END_SRC
266 267
*** qr ib dr
**** run test
268
     #+BEGIN_SRC shell
269 270 271
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
272 273 274 275 276
./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"
     #+END_SRC
277
**** plot
278
     #+BEGIN_SRC R
279 280
library(ggplot2)
library(latex2exp)
281 282
df <- read.csv("./build/src/data/res/IB-BGMRES-DR.res")
df <- rbind(df, read.csv("./build/src/data/res/QR-IB-BGMRES-DR.res"))
283 284 285 286 287
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)"))
288
     #+END_SRC
289 290
*** qr ib dr timing
**** run test
291
     #+BEGIN_SRC shell
292 293 294
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
295 296 297 298 299
./testMatrixMarketChoice -n 100 -t BLOCK -s MGS -m 700 -e 1e-4 -A IBDR \
                         -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
./testMatrixMarketChoice -n 100 -t BLOCK -s MGS -m 700 -e 1e-4 -A QRIBDR \
                         -r DEFLATED -p 5 -u -o "QR-IB-BGMRES-DR"
     #+END_SRC
300
**** plot
301
     #+BEGIN_SRC R
302
library(ggplot2)
303 304
df <- read.csv("./build/src/data/res/IB-BGMRES-DR.res")
df <- rbind(df, read.csv("./build/src/data/res/QR-IB-BGMRES-DR.res"))
305
ggplot(df, aes(x=nb_mvp)) +
306 307 308 309
    geom_line(aes(y=least_square_time, color=paste(name,"gels"))) +
    geom_line(aes(y=facto_time, color=paste(name, "facto"))) +
    geom_line(aes(y=facto_time+least_square_time, color=paste(name, "sum"))) +
    ggtitle("young1c (nrhs=100, m=500 k=5, max_mvp=10000)") +
310 311
    ylab("time (s)")
     #+END_SRC
312
*** with chameleon
313
**** run test
314
     #+BEGIN_SRC shell
315 316 317
cd ${WORKDIR}/build/src/test_cham/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
318 319 320 321 322 323
# following variable MUST have a trailing slash
export STARPU_FXT_PREFIX=${WORKDIR}/build/
# 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"
324
# ./testMatrixMarketChoice_cham -n 100 -e 1e-4 -A CHAMQR -u -o "CHAM-QR"
325
     #+END_SRC
326
**** plot
327 328
     The following graph represent relative percentages spent
     in each stage of the algorithm
329
     #+BEGIN_SRC R
330 331
library(ggplot2)
library(latex2exp)
332
df <- read.csv("./build/src/data/res/CHAM-TL.res")
333 334 335 336 337
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")) +
338 339 340 341 342
    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"))
     #+END_SRC
343 344
*** young1c chameleon comparison QR (nrhs=6, m=90, k=5)
**** run test case
345
     #+BEGIN_SRC shell
346 347
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
348 349
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 \
                         -A QR -u -o "QR"
350
cd ${WORKDIR}/build/src/test_cham/
351 352 353
./testMatrixMarketChoice_cham -z -n 6 -t RUHE -s MGS -m 90 -e 1e-6 \
                              -A CHAMQR -u -o "CHAMQR"
     #+END_SRC
354
**** plot the graphic
355
     #+BEGIN_SRC R
356 357
library(ggplot2)
library(latex2exp)
358 359
df <- read.csv("./build/src/data/res/QR.res")
df <- rbind(df, read.csv("./build/src/data/res/CHAMQR.res"))
360 361 362 363 364
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)"))
365
     #+END_SRC
366
** Cleanup results directory
367 368 369 370
   #+BEGIN_SRC shell
  mkdir -p ${WORKDIR}/build/src/data/res
  rm ${WORKDIR}/build/src/data/res/* -rf
   #+END_SRC