INSTALL.org 2.86 KB
Newer Older
1 2 3 4 5
# -*- mode: org -*-
# -*- coding: utf-8 -*-

#+TITLE: Fabulous installation procedure (Plafrim2)

6 7 8 9
* INSTALLATION on PLAFRIM2 with chameleon
** With SPACK
*** Install SPACK

10
    If you dont have spack, download it:
11
    #+begin_src bash
12 13 14
    cd ${HOME}
    git clone https://github.com/solverstack/spack.git
    #+end_src
15

16 17 18 19 20 21
    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

22
    Load spack to into your terminal environment:
23
    #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
24 25
    source ${SPACK_ROOT}/share/spack/setup-env.sh
    export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH
26
    spack compiler find
27
    #+end_src
28 29

*** Install Fabulous
30
    On plafrim, you need to load the required modules:
31
    #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
32 33 34 35 36
    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
37

38
    Set shell variables for spack to find the dependencies
39
    #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
40 41
    export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1
    #+end_src
42

43
    Check the specification with:
44 45
    #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
    SPEC="fabulous@develop+chameleon%gcc@6.1.0 ^chameleon@master ^mkl@exist ^cmake@exist"
46 47
    spack spec ${SPEC}
    #+end_src
48

49 50 51
    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:
52
    #+begin_src bash
53
    #local machine:
54
    spack mirror create -d fabulous_mirror -D -o fabulous@develop+chameleon^chameleon@master
55 56
    # mirror store dependencies as compressed archives already
    # so it is not very useful to add anymore compression at this stage:
57 58
    tar cf fabulous_mirror.tar fabulous_mirror/
    sftp fabulous_mirror.tar plafrim:~
59
    #on plafrim (for instance, in your $HOME directory):
60 61
    tar xf fabulous_mirror.tar
    spack mirror add local_mirror file://${HOME}/fabulous_mirror
62
    #+end_src
63

64
    If everything looks good, you can proceed the installation with:
65
    #+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh
66 67
    spack install -v ${SPEC}
    #+end_src
68

69 70 71 72 73
    You can perform these actions either manually, by evaluating the code blocks
    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
74 75
    (org-babel-tangle)
    #+end_src
76

77
    then:
78 79 80
    #+begin_src bash
    chmod +x ./install-fabulous.sh
    ./install-fabulous.sh
81
    #+end_src