Commit 99549565 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Merge branch 'develop' of...

Merge branch 'develop' of git+ssh://scm.gforge.inria.fr/gitroot/ib-bgmres-dr/ib-bgmres-dr into develop
parents 95705390 b8af102d
......@@ -2,110 +2,106 @@
** 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
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
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
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
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)
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
#+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
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
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
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
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
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 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
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
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
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
then:
#+begin_src sh
chmod +x ./install_with_chameleon.sh
./install_with_chameleon.sh
#+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