Commit 95705390 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

update installation instruction

parent 2bf9417f
......@@ -4,7 +4,7 @@
int main()
{
// ...
auto dr = fabulous::deflated_restart(k, 0.0);
auto dr = fabulous::deflated_restart(/*nb_eigen_value=*/k, /*target=*/0.0);
auto eq = fabulous::equation(N, X, ldx, B, ldb);
auto arn = fabulous::arnoldi_IB();
auto ortho = fabulous::orthogonalization(/*iteration_count=*/3)
......
* INSTALLATION on PLAFRIM2 with chameleon
** With SPACK
*** Install SPACK
If you dont have spack, download it:
#+begin_src sh
cd ${HOME}
git clone https://github.com/solverstack/spack.git
#+end_src
Load spack to into your terminal environment:
#+begin_src sh :tangle load_spack.sh
WORKDIR=${HOME}
export SPACK_ROOT=${WORKDIR}/spack # <- this is important; some scripts may rely on this variable
source ${SPACK_ROOT}/share/spack/setup-env.sh
export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH
#+end_src
*** Install Fabulous
On plafrim, you need to load the needed modules:
#+begin_src sh :tangle plafrim_module.sh
module purge
module load compiler/gcc/6.1.0
module load build/cmake/3.2.1
module load intel/mkl/64/11.2/2016.0.0
#+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
WORKDIR=${HOME}
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
#+begin_src sh :tangle install_with_chameleon.sh
export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1
export CHAMELEON_DIR=${WORKDIR}/chameleon
#+end_src
Check the specification with:
#+begin_src sh :tangle install_with_chameleon.sh
SPEC="fabulous%gcc@6.1.0 ^chameleon@src ^mkl@exist ^cmake@exist"
spack spec ${SPEC}
#+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 the internet. If you encounter this issue, you can create a spack
mirror on your machine and sent it to plafrim:
#+begin_src sh
#local machine:
spack mirror create -d chameleon_mirror -D -o chameleon
# mirror store dependencies as compressed archives already
# so it is not very useful to add anymore compression at this stage:
tar cf chameleon_mirror.tar chameleon_mirror/
sftp chameleon_mirror.tar plafrim:~
#on plafrim (for instance, in your $HOME directory):
tar xf chameleon_mirror.tar
spack mirror add local_chameleon_mirror file://${HOME}/chameleon_mirror
#+end_src
If everything looks good, you can proceed the installation with:
#+begin_src sh :tangle install_with_chameleon.sh
spack install -v ${SPEC}
#+end_src
To perform all this with an automated script you can do
#+begin_src emacs-lisp
(org-babel-tangle)
#+end_src
or with the emacs command:
#+begin_src emacs
M-x org-babel-tangle
#+end_src
then:
#+begin_src sh
chmod +x ./install_with_chameleon.sh
./install_with_chameleon.sh
#+end_src
......@@ -3,7 +3,6 @@
#+AUTHOR: Cyrille Piacibello
#+AUTHOR: Luc Giraud
* Purpose
Block Krylov iterative solver API.
......@@ -43,37 +42,5 @@
and/or reductions.
* Installing
** Dependencies
*** LAPACKE (LAPACK, CBLAS and BLAS)
Any implementation of C interface for LAPACK and BLAS (intel mkl, netlib, openblas, eigen, ...)
*** chameleon (optional)
As fabulous is a C++ library, it requires that chameleon supports redefining
complex type to C++ complex types in its 'client' headers. for C++ application.
This is currently supported in a fork of the main chameleon development branch,
(hopefully merge any time soon)
#+BEGIN_SRC sh
cd ..
git clone https://gitlab.inria.fr/tmijieux/chameleon.git
#+END_SRC
** fabulous
A basic installation can be performed with the following commands:
#+BEGIN_SRC sh
prefix="/usr/"
mkdir -p build/
rm -rf build/*
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${prefix}
make
make install
#+END_SRC
see [[file:INSTALL.org][INSTALL]]
Some options can be passed to the compilation stage:
#+BEGIN_SRC sh
cmake .. -DCMAKE_INSTALL_PREFIX=${prefix} -DFABULOUS_BUILD_SHARED_LIBS=ON \
-DFABULOUS_BUILD_SHARED_LIBS=ON -DFABULOUS_BUILD_DOC=ON \
-DFABULOUS_DEBUG_MODE=OFF -DFABULOUS_LAPACKE_NANCHECK=OFF
#+END_SRC
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