RESULTS.org 14.1 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
* 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:
16 17 18

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

Setup the build system:
#+BEGIN_SRC shell
24 25 26 27 28
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)
29 30 31 32 33 34 35
#+END_SRC

Eventually compile fabulous:
#+BEGIN_SRC shell
make # -j4
#+END_SRC

36 37 38 39 40 41
#+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)
42

43
    [[file:./build/src/data/sherman4.mtx][sherman4.mtx]]
44

45 46 47
    [[file:./build/src/data/young4c.mtx][young4c.mtx]]
    [[file:./build/src/data/bcsstk14.mtx][bcsstk14.mtx]]
    [[file:./build/src/data/sherman5.mtx][sherman5.mtx]]
48

49 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
 #+begin_src sh :session *fabulous_downloads* :results silent
cd $WORKDIR
56 57 58 59 60 61 62
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"
)
63
mkdir -p ./build/src/data/
64 65 66
for i in "${files[@]}"; do
    filename=$(basename "$i")
    filename="${filename%.*}" # strip gz extension
67
    curl $i | zcat > ./build/src/data/$filename
68
done
69 70 71 72 73
 #+end_src
** Run Examples
*** Influence of restart(m) parameter
**** run test case
 #+begin_src shell
74
cd ${WORKDIR}/build/src/test_basic/
75 76 77 78 79
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
80 81 82 83 84 85
 #+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
86
library(ggplot2)
87 88 89 90 91
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"))
92 93 94 95
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)")
96
 #+end_src
97 98 99 100

 #+results:
 [[file:/tmp/babel-1939RTd/figure1939yUv.png]]

101 102 103
*** Influence of incremental QR factorization
**** run test case
 #+begin_src shell
104
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
105
mkdir -p ../data/res
106 107
./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"
108 109 110
 #+end_src
**** plot the graphic
 #+begin_src R
111
library(ggplot2)
112 113
df <- read.csv("./build/src/data/res/Full_GELS.res")
df <- rbind(df, read.csv("./build/src/data/res/GELS_with_Incremental_QR_factorization.res"))
114 115
ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) +
    geom_line() + ggtitle("Least Square duration (young1c)")
116
 #+end_src
117 118 119 120

 #+results:
 [[file:/tmp/babel-1939RTd/figure1939xoE.png]]

121 122 123
*** Influence of the Algorithm
**** run test case
 #+begin_src shell
124
cd ${WORKDIR}/build/src/test_basic/
125 126
mkdir -p ../data/res
./testMatrixIW_DR
127 128 129
 #+end_src
**** plot the graphic
 #+begin_src R
130
library(ggplot2)
131 132 133 134
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"))
135
name <- df$name
136 137
df$name_min <- paste(name, " min")
df$name_max <- paste(name, " max")
138 139 140 141
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")) +
142
    scale_y_log10() + ylab(TeX("$\\eta_b$")) +
143
    ggtitle("coneSphere problem with CGS RUHE (STD, STD+DR and IB algorithm)")
144
 #+end_src
145 146 147 148

 #+results:
 [[file:/tmp/babel-1939RTd/figure1939XNE.png]]

149 150 151
*** young1c (nrhs=6, m=90, k=5)
**** run test case
 #+begin_src shell
152
cd ${WORKDIR}/build/src/test_basic/
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
153
mkdir -p ../data/res
MIJIEUX Thomas's avatar
MIJIEUX Thomas committed
154
./testMatrixMarketChoice -n 6 -t BLOCK -s MGS -m 90 -e 1e-6 -A QR  -u -o "BGMRES"
155
./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
156
./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
157
./testMatrixMarketChoice -n 6 -t RUHE -s MGS -m 90 -e 1e-6 -A IBDR -r DEFLATED -p 5 -u -o "IB-BGMRES-DR"
158 159 160 161 162 163
 #+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.
164

165 166 167 168
     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
169 170
library(ggplot2)
library(latex2exp)
171 172 173 174
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"))
175 176 177 178 179
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)"))
180
 #+end_src
181

182 183
 #+results:
 [[file:/tmp/babel-15182Ttv/figure15182NeX.png]]
184

185 186 187
*** lightInTissue (nrhs=6, m=90, k=5)
**** run test case
 #+begin_src shell
188 189 190 191 192 193 194
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"
195 196 197
 #+end_src
**** plot the graphic
 #+begin_src R
198 199
library(ggplot2)
library(latex2exp)
200 201 202 203
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"))
204 205 206 207 208
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)"))
209 210 211 212
 #+end_src
*** Influence of deflated restart (k) parameter (nrhs=6, m=90)
**** run test case
 #+begin_src shell
213
cd ${WORKDIR}/build/src/test_basic/
214 215 216 217 218 219
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)"
220 221 222
 #+end_src
**** plot the graphic
 #+begin_src R
223 224
library(ggplot2)
library(latex2exp)
225 226 227 228
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"))
229 230 231 232 233
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)"))
234 235 236 237
 #+end_src
*** csc lightInTissue timing
**** run test
     #+begin_src shell
238 239 240
cd ${WORKDIR}/build/src/test_basic/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
241 242 243 244
./testMatrixMarketChoice -f ../data/New/lightINtissue.mtx -k CSC \
                         -t BLOCK -s CGS \
                         -n 6 -m 90 -A IBDR -r DEFLATED -p 5 -e 1e-4 \
                         -u -o "IB-BGMRES-DR"
245 246 247
     #+end_src
**** plot
     #+begin_src R
248 249
library(ggplot2)
library(latex2exp)
250 251
df <- read.csv("./build/src/data/res/IB-BGMRES-DR.res")
ggplot(df, aes(x=global_iteration)) +
252 253
    geom_line(aes(y=time, color="total")) +
    geom_line(aes(y=least_square_time, color="gels")) +
254 255 256 257 258 259
    geom_line(aes(y=mvp_time, color="mvp")) +
    geom_line(aes(y=ortho_time, color="ortho")) +
    geom_line(aes(y=ib_time, color="ib")) +
    geom_line(aes(y=(ib_time+ortho_time+mvp_time+least_square_time), color="SUM")) +
    ylab(TeX("Time (s)")) +
    ggtitle("lightInTissue (nrhs=6, m=90 k=5)")
260
     #+end_src
261

262 263 264
*** qr ib dr
**** run test
     #+begin_src shell
265 266 267 268 269
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"
270 271 272
     #+end_src
**** plot
     #+begin_src R
273 274
library(ggplot2)
library(latex2exp)
275 276
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"))
277 278 279 280 281
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)"))
282 283 284 285
     #+end_src
*** qr ib dr timing
**** run test
     #+begin_src shell
286 287 288 289 290
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"
291 292 293
     #+end_src
**** plot
     #+begin_src R
294 295
library(ggplot2)
library(latex2exp)
296 297
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"))
298
ggplot(df, aes(x=nb_mvp)) +
299 300 301 302 303
    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)") +
    ylab(TeX("$\\eta_b$ (min, max)"))
304
     #+end_src
305 306 307 308

     #+results:
     [[file:/tmp/babel-15182Ttv/figure15182m4Q.png]]

309
*** with chameleon
310 311 312 313 314
**** run test
     #+begin_src shell
cd ${WORKDIR}/build/src/test_cham/
mkdir -p ../data/res
#nbRHS=6; maxSpace=90
315 316 317 318 319 320 321
# 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"
322 323 324
# ./testMatrixMarketChoice_cham -n 100 -e 1e-4 -A CHAMQR -u -o "CHAM-QR"
     #+end_src
**** plot
325 326 327

     The following graph represent relative percentages spent
     in each stage of the algorithm
328 329 330
     #+begin_src R
library(ggplot2)
library(latex2exp)
331
df <- read.csv("./build/src/data/res/CHAM-TL.res")
332 333 334 335 336 337 338
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"))
339
     #+end_src
340 341 342 343 344 345 346 347 348 349 350 351 352 353
*** 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)
354 355
df <- read.csv("./build/src/data/res/QR.res")
df <- rbind(df, read.csv("./build/src/data/res/CHAMQR.res"))
356 357 358 359 360 361
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
362 363 364 365 366 367
** Cleanup results directory
  #+BEGIN_SRC shell
  mkdir -p ${WORKDIR}/build/data/res
  cd ${WORKDIR}/build/data/res
  rm * -rf
  #+END_SRC