Fabulous installation procedure

Table of Contents

Go back to README.html.

1. Dependencies

Fabulous depends on a Blas implementation, make sure to have them installed. If you are on a computation center make sure the modules are loaded !

2. Linking Fabulous with cmake

Fabulous cmake has been updated to be more modern, to find Fabulous in your cmake the following may be used

include(CMakeFindDependencyMacro)
find_dependency(FABULOUS REQUIRED)

Then, in order to link your code to Fabulous use the corresponding cmake target

FABULOUS::fabulous_cpp     # C++ library
FABULOUS::fabulous_c_api   # C interface
FABULOUS::fabulous_fortran # Fortran interface

3. Downloading the source code

The latest release on https://gitlab.inria.fr/solverstack/fabulous/-/releases , for example

wget https://gitlab.inria.fr/solverstack/fabulous/uploads/e972b50d111410b9f3c2e0e982f145f0/fabulous-1.1.2.tar.gz
tar xvf fabulous-1.1.2.tar.gz

or by cloning the depot

git clone --recurse-submodules https://gitlab.inria.fr/solverstack/fabulous.git

4. Installing from source

To install Fabulous on your machine, first download the sources, then run the following cmake / make commands

# In Fabulous directory
mkdir build
cd build

cmake .. -DFABULOUS_BUILD_FORTRAN_API=ON \  # Fortran api
      -DFABULOUS_BUILD_C_API=ON \  # C api
     -DFABULOUS_BUILD_EXAMPLES=ON  # Building examples

make install

5. docker image

Run the docker file docker-fabulous with the following instruction.

docker build -f docker-fabulous -t fabulous .

Then you can run the docker image directly.

6. Installing with Spack

6.1. Install spack

Install it from your distribution package manager or from its official project page.

6.2. Install Fabulous

Note: sometimes, depending on your configuration you will need to add the +blasmt option (explicitly allowing multi-threaded blas) to have the best performances.

6.2.1. On a local machine

Once spack is installed, not much is necessary

spack install -v fabulous

To see extra option for Fabulous installation please use

spack info fabulous

6.2.2. On a computation center

You need to load the required modules and check if spack finds the modules, for example

# Loading modules
module purge
module load compiler/gcc/10.1.0     # needs C++17 compiler
module load build/cmake/3.15.3      # cmake 3.15 minimal
module load linalg/mkl/2019_update4 # blas library

# Sometimes spack does not find some dependencies, may need to set environment variable
#export CMAKE_DIR=/cm/shared/modules/generic/build/cmake/3.15.3

# Check founded compiler
spack compiler find

# Check the specification
SPEC="fabulous%gcc@10.1.0 ^mkl@exist ^cmake@exist"
spack spec ${SPEC}

On a computation center spack may have troubles fetching the required dependencies on the internet. If you encounter this issue, you can create a spack mirror on your local machine

  1. Local machine
    spack mirror create -d fabulous_mirror -D -o fabulous@develop
    tar cf fabulous_mirror.tar fabulous_mirror/
    sftp fabulous_mirror.tar computation_center:~
    

    Spack mirrors store dependencies as compressed archives already, so it is not very useful to add anymore compression at this stage.

  2. On the computation center (for instance, in your $HOME directory)
    tar xf fabulous_mirror.tar
    spack mirror add local_mirror file://${HOME}/fabulous_mirror
    

    If everything looks good, you can proceed the installation with:

    spack install -v ${SPEC}
    

7. With guix

In order to have all Fabulous possible dependencies, add the following to your ${HOME}/.config/guix/channels.scm file.

(append %default-channels
  (list (channel
          (name 'guix-hpc)
          (url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git")
          (branch "master"))))

Then do a guix pull to update your channels and having the fabulous package available.

Then the installation is simple

guix install fabulous

8. Installing on ubuntu 20.04

Download the package and run it.

curl https://gitlab.inria.fr/solverstack/fabulous/-/package_files/26292/download -o fabulous_1.1.1_amd64.deb
sudo apt-get install -y fabulous_1.1.1_amd64.deb

9. Installing on MacOSX with brew

Note : the installation by source also works on MacOSX.

First install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then get the Fabulous brew package from https://gitlab.inria.fr/solverstack/brew-repo

git clone https://gitlab.inria.fr/solverstack/brew-repo.git

And run the script

brew install --build-from-source ./brew-repo/fabulous.rb

10. Documentation for developers

10.1. With guix

Execute the following command from the root folder of Fabulous.

guix environment --pure gfortran-toolchain cmake --ad-hoc doxygen -- bash make_doc.sh

10.2. Without guix

Make sure you have a fortran compiler and doxygen install, then execute the following command from the root folder of Fabulous.

bash make_doc.sh

11. Installing Fabulous 1.0.1 (for chameleon usage)

11.1. WARNING : Deprecated code

  • Chameleon usage is deprecated in Fabulous-1.1.0, please refer to Fabulous-1.0.1 to continue using Chamelon.
  • The exemples may use deprecated mkl blas, please turn off exemple build if it is your case.
  • The following is an install guide for Fabulous-1.1.0, without chameleon and without the exemples.

11.2. From source

Follow the instructions below

export FABULOUS_INSTALL_DIR=$PWD/install # your install directory
git clone --recurse-submodules --branch 1.0.1 git@gitlab.inria.fr:solverstack/fabulous.git
mkdir fabulous/build
cd fabulous/build
cmake .. -DFABULOUS_BUILD_FORTRAN_API=ON \  # Fortran api
      -DFABULOUS_BUILD_C_API=ON \  # C api
     -DFABULOUS_BUILD_EXAMPLES=ON \  # Building examples
     -FABULOUS_USE_CHAMELEON=ON \  # chameleon
     -DCMAKE_INSTALL_PREFIX=${FABULOUS_INSTALL_DIR}
make install

11.3. With guix

First configure your channels (see section "INSTALLING on PLAFRIM with guix").

Then the installation is simple

guix install fabulous-1.0.1

Author: Gilles Marait

Created: 2021-09-29 Wed 11:54

Validate