Commit e595a587 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Update INSTALL.org to match upstream chameleon merge(C++ header type)

parent 2c557ffa
# -*- mode: org -*-
# -*- coding: utf-8 -*-
#+TITLE: Fabulous installation procedure (Plafrim2)
* INSTALLATION on PLAFRIM2 with chameleon * INSTALLATION on PLAFRIM2 with chameleon
** With SPACK ** With SPACK
*** Install SPACK *** Install SPACK
If you dont have spack, download it: If you dont have spack, download it:
#+begin_src sh #+begin_src bash
cd ${HOME} cd ${HOME}
git clone https://github.com/solverstack/spack.git git clone https://github.com/solverstack/spack.git
#+end_src #+end_src
Set SPACK_ROOT variable to the directory where spack is installed:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
#!/bin/bash
export SPACK_ROOT=/home/tmijieux/spack
#+end_src
Load spack to into your terminal environment: Load spack to into your terminal environment:
#+begin_src sh :tangle load_spack.sh #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
PWD=$(pwd)
WORKDIR=${WORKDIR:-${PWD}}
export SPACK_ROOT=${SPACK_ROOT:-${WORKDIR}}
source ${SPACK_ROOT}/share/spack/setup-env.sh source ${SPACK_ROOT}/share/spack/setup-env.sh
export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH
spack compiler find spack compiler find
...@@ -20,68 +28,30 @@ ...@@ -20,68 +28,30 @@
*** Install Fabulous *** Install Fabulous
On plafrim, you need to load the required modules: On plafrim, you need to load the required modules:
#+begin_src sh :tangle plafrim_module.sh #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
module purge module purge
module load compiler/gcc/6.1.0 module load compiler/gcc/6.1.0
module load build/cmake/3.2.1 module load build/cmake/3.2.1
module load intel/mkl/64/11.2/2016.0.0 module load intel/mkl/64/11.2/2016.0.0
#+end_src #+end_src
Fabulous is a c++ application that use Chameleon kernel whose API are written in C.
More specifically Chameleon API use C literal complex types that does not exist in C++.
The good point is that C complex type 'float _Complex' and 'double _Complex'
are 'binary compatible' (they have the same memory layout and constraints) with
c++ std::complex<float> and std::complex<double>.
Hence it is possible to replace C complex type with C++ complex types in Chameleon header
depending on the langage of the targeted application.
(For instance, this is done in LAPACKE header, see 'lapacke_config.h')
This is (currently) not handled in the main branch of Chameleon, so we need to clone
a fork of the main chameleon release which can do that.
(you can expect that it will be included in the main release in the future)
#+begin_src sh :tangle install_with_chameleon.sh
#!/bin/bash
PWD=$(pwd)
WORKDIR=${WORKDIR:-${PWD}}
cd ${WORKDIR}
source plafrim_module.sh
source load_spack.sh
git clone https://gitlab.inria.fr/tmijieux/chameleon.git --branch complex_type_header
cd chameleon
git submodule init && git submodule update
cd ..
#+end_src
Set shell variables for spack to find the dependencies Set shell variables for spack to find the dependencies
#+begin_src sh :tangle install_with_chameleon.sh #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1 export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1
export CHAMELEON_DIR=${WORKDIR}/chameleon
#+end_src #+end_src
Check the specification with: Check the specification with:
#+begin_src sh :tangle install_with_chameleon.sh #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
SPEC="fabulous@develop+chameleon%gcc@6.1.0 ^chameleon@src ^mkl@exist ^cmake@exist" SPEC="fabulous@develop+chameleon%gcc@6.1.0 ^chameleon@master ^mkl@exist ^cmake@exist"
spack spec ${SPEC} spack spec ${SPEC}
#+end_src #+end_src
If you use the tangled script, this prompt you so you can check the spec
safely before installing:
#+begin_src sh :tangle install_with_chameleon.sh
echo CMAKE_DIR=${CMAKE_DIR}
echo CHAMELEON_DIR=${CHAMELEON_DIR}
read -p "Is this ok? [Y/n] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
#+end_src
On plafrim, spack may have troubles fetching the required dependencies On plafrim, spack may have troubles fetching the required dependencies
on the internet. If you encounter this issue, you can create a spack on the internet. If you encounter this issue, you can create a spack
mirror on your machine and sent it to plafrim: mirror on your machine and sent it to plafrim:
#+begin_src sh #+begin_src bash
#local machine: #local machine:
spack mirror create -d chameleon_mirror -D -o fabulous spack mirror create -d fabulous_mirror -D -o fabulous@develop+chameleon^chameleon@master
# mirror store dependencies as compressed archives already # mirror store dependencies as compressed archives already
# so it is not very useful to add anymore compression at this stage: # so it is not very useful to add anymore compression at this stage:
tar cf fabulous_mirror.tar fabulous_mirror/ tar cf fabulous_mirror.tar fabulous_mirror/
...@@ -92,21 +62,20 @@ ...@@ -92,21 +62,20 @@
#+end_src #+end_src
If everything looks good, you can proceed the installation with: If everything looks good, you can proceed the installation with:
#+begin_src sh :tangle install_with_chameleon.sh #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
spack install -v ${SPEC} spack install -v ${SPEC}
#+end_src #+end_src
To perform all this with an automated script you can do You can perform these actions either manually, by evaluating the code blocks
#+begin_src emacs-lisp directly inside emacs if your org-mode support it, or by tangling this org
document to produce [[./install-fabulous.sh][install-fabulous.sh]] and execute it:
#+begin_src emacs-lisp :results silent
(org-babel-tangle) (org-babel-tangle)
#+end_src #+end_src
or with the emacs command:
#+begin_src emacs
M-x org-babel-tangle
#+end_src
then: then:
#+begin_src sh #+begin_src bash
chmod +x ./install_with_chameleon.sh chmod +x ./install-fabulous.sh
./install_with_chameleon.sh ./install-fabulous.sh
#+end_src #+end_src
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
#+TITLE: FABuLOuS numericals results #+TITLE: FABuLOuS numericals results
#+STARTUP: showeverything
* RESULTS * Get Test files
** Get Test files
[[file:./build/src/data/young1c.mtx][young1c.mtx]] [[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/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/matrices_BEM/coneSpherePC_RHS_MAIN.0.res][coneSpherePC_RHS_MAIN.0.res]] (binary)
...@@ -21,8 +19,8 @@ ...@@ -21,8 +19,8 @@
[[file:./build/src/data/bidiagonalmatrix3.mtx][bidiagonalmatrix3.mtx]] [[file:./build/src/data/bidiagonalmatrix3.mtx][bidiagonalmatrix3.mtx]]
[[file:./build/src/data/bidiagonalmatrix4.mtx][bidiagonalmatrix3.mtx]] [[file:./build/src/data/bidiagonalmatrix4.mtx][bidiagonalmatrix3.mtx]]
*** Downloads ** Downloads
#+begin_src shell :session *DOWNLOADS* :results none #+begin_src shell :session *DOWNLOADS* :results silent
files=( files=(
"ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/bcsstruc2/bcsstk14.mtx.gz" "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/sherman4.mtx.gz"
...@@ -38,10 +36,10 @@ for i in "${files[@]}"; do ...@@ -38,10 +36,10 @@ for i in "${files[@]}"; do
done done
#+end_src #+end_src
** Run Examples * Run Examples
Set this variable to your work directory (where you downloaded fabulous): Set this variable to your work directory (where you downloaded fabulous):
#+begin_src sh :session *TEST* :results none #+begin_src sh :session *TEST* :results silent
export WORKDIR=/home/tmijieux/fabulous export WORKDIR=/home/tmijieux/fabulous # for example
#+end_src #+end_src
To be able to run the following test cases, you must have compiled fabulous: To be able to run the following test cases, you must have compiled fabulous:
...@@ -53,9 +51,9 @@ cmake .. # -DCHAMELEON_DIR=$(spack location -i chameleon) ...@@ -53,9 +51,9 @@ cmake .. # -DCHAMELEON_DIR=$(spack location -i chameleon)
make make
#+end_src #+end_src
*** Impact of restart parameter ** Impact of restart parameter
**** run test case *** run test case
#+begin_src sh :session *TEST* :results none #+begin_src sh :session *TEST* :results silent
cd ${WORKDIR}/build/src/test_core/ cd ${WORKDIR}/build/src/test_core/
mkdir -p ../data/res mkdir -p ../data/res
sizes=(200 400 600 800 1000) sizes=(200 400 600 800 1000)
...@@ -64,7 +62,7 @@ for siz in "${sizes[@]}"; do ...@@ -64,7 +62,7 @@ for siz in "${sizes[@]}"; do
done done
#+end_src #+end_src
**** plot the graphic *** plot the graphic
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R* #+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2) library(ggplot2)
df <- read.table("./build/src/data/res/r=200.res", header=T) df <- read.table("./build/src/data/res/r=200.res", header=T)
...@@ -78,10 +76,9 @@ ggplot(df, aes(x=nb_mvp, y=maxRes, color=name)) + ...@@ -78,10 +76,9 @@ ggplot(df, aes(x=nb_mvp, y=maxRes, color=name)) +
geom_hline(aes(yintercept=1e-4, color="threshold")) + geom_hline(aes(yintercept=1e-4, color="threshold")) +
scale_y_log10() + ggtitle("Memory usage influence (young1c IB IMGS-RUHE)") scale_y_log10() + ggtitle("Memory usage influence (young1c IB IMGS-RUHE)")
#+end_src #+end_src
** Impact of incremental QR factorization
*** Impact of incremental QR factorization *** run test case
**** run test case #+begin_src sh :session *TEST* :results silent
#+begin_src sh :session *TEST* :results none
cd ${WORKDIR}/build/src/test_core/ 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 STDDR -u -o "Basic_GELS"
./testMatrixMarketChoice -t BLOCK -s CGS -m 900 -A QR -u -o "QR_factorization" ./testMatrixMarketChoice -t BLOCK -s CGS -m 900 -A QR -u -o "QR_factorization"
...@@ -96,14 +93,14 @@ ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) + ...@@ -96,14 +93,14 @@ ggplot(df, aes(x=global_iteration, y=least_square_time, color=name)) +
#+end_src #+end_src
*** Influence of the Algorithm ** Influence of the Algorithm
**** run test case *** run test case
#+begin_src sh :session *TEST* :results none #+begin_src sh :session *TEST* :results silent
cd ${WORKDIR}/build/src/test_core/ cd ${WORKDIR}/build/src/test_core/
mkdir -p ../data/res mkdir -p ../data/res
./testMatrixIW_DR ./testMatrixIW_DR
#+end_src #+end_src
**** plot the graphic *** plot the graphic
#+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R* #+begin_src R :results output graphics :file (org-babel-temp-file "figure" ".png") :exports both :width 600 :height 400 :session *R*
library(ggplot2) library(ggplot2)
df <- read.table("./build/src/data/res/STD.res", header=T) df <- read.table("./build/src/data/res/STD.res", header=T)
......
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