From 64f54fe1bb735cc01600d834c28523879cef0cab Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Fri, 23 Apr 2021 15:18:45 +0200
Subject: [PATCH] Update information about distribution. Add scripts to
 generate debian packages.

---
 distrib/debian/README.org                |  47 +++++++++++
 distrib/debian/changelog                 |   5 ++
 distrib/debian/control                   |  21 +++++
 distrib/debian/copyright                 |  38 +++++++++
 distrib/debian/dockerfile-debian-testing |  38 +++++++++
 distrib/debian/dockerfile-ubuntu20.04    |  38 +++++++++
 distrib/debian/dockerfile-ubuntu20.10    |  38 +++++++++
 distrib/debian/install_dependencies.sh   |  27 +++++-
 distrib/debian/rules                     |   6 ++
 distrib/spack/install_dependencies.sh    |   9 --
 doc/orgmode/chapters/installing.org      | 101 ++++++++++++++---------
 11 files changed, 317 insertions(+), 51 deletions(-)
 create mode 100644 distrib/debian/README.org
 create mode 100644 distrib/debian/changelog
 create mode 100644 distrib/debian/control
 create mode 100644 distrib/debian/copyright
 create mode 100644 distrib/debian/dockerfile-debian-testing
 create mode 100644 distrib/debian/dockerfile-ubuntu20.04
 create mode 100644 distrib/debian/dockerfile-ubuntu20.10
 create mode 100755 distrib/debian/rules
 delete mode 100755 distrib/spack/install_dependencies.sh

diff --git a/distrib/debian/README.org b/distrib/debian/README.org
new file mode 100644
index 000000000..1aec3e46c
--- /dev/null
+++ b/distrib/debian/README.org
@@ -0,0 +1,47 @@
+#+TITLE: Howto: Debian packaging
+
+Example installation of Chameleon using git and CMake is given in the
+script ~install_dependencies.sh~.
+
+How to generate a debian package with available dockerfiles. You need
+to be maintainer on the chameleon gitlab project. Then create your
+gitlab token, go to Users settings, Personal Access Tokens, scope api,
+set in ~GITLABTOKEN~ environment variable.
+
+Be sure "Packages" are enabled in your gitlab project, see in
+Settings, General, Visibility, project features, permissions ->
+Packages, save changes.
+
+Install Docker, see example [[https://gitlab.inria.fr/sed-bso/hpclib/-/blob/master/tools/install_docker.sh][installation on Ubuntu]].
+
+The following will create a new package and upload it on the chameleon
+[[https://gitlab.inria.fr/solverstack/chameleon/-/packages][gitlab packages page]]
+#+begin_src sh
+GITLABTOKEN=
+docker build -t chameleon_ubuntu20.04 -f dockerfile-ubuntu20.04 --build-arg GITLABTOKEN=$GITLABTOKEN .
+docker build -t chameleon_ubuntu20.10 -f dockerfile-ubuntu20.10 --build-arg GITLABTOKEN=$GITLABTOKEN .
+docker build -t chameleon_debiantesting -f dockerfile-debian-testing --build-arg GITLABTOKEN=$GITLABTOKEN .
+#+end_src
+We use default variables here concerning package details (release
+number, url, ...). One can change the release to consider by giving
+additional information, one or more of the following
+#+begin_src sh
+GITLABTOKEN=
+GITLABPROJNUM=616
+DEBIANDIST=ubuntu_20.04 # or debian_testing for ex.
+RELEASEVER="1.1.0"
+DEBIANARCH="1_amd64" # or "amd64 for debian"
+RELEASETAR=chameleon-$RELEASEVER.tar.gz
+RELEASEURL=https://gitlab.inria.fr/solverstack/chameleon/uploads/b299d6037d7636c6be16108c89bc2aab/$RELEASETAR
+
+docker build -t chameleon_ubuntu20.04 \
+             -f dockerfile-ubuntu20.04 \
+             --build-arg GITLABTOKEN=$GITLABTOKEN \
+             --build-arg GITLABPROJNUM=$GITLABPROJNUM \
+             --build-arg DEBIANDIST=$DEBIANDIST \
+             --build-arg RELEASEVER=$RELEASEVER \
+             --build-arg DEBIANARCH=$DEBIANARCH \
+             --build-arg RELEASETAR=$RELEASETAR \
+             --build-arg RELEASEURL=$RELEASEURL \
+             .
+#+end_src
diff --git a/distrib/debian/changelog b/distrib/debian/changelog
new file mode 100644
index 000000000..83ab2c048
--- /dev/null
+++ b/distrib/debian/changelog
@@ -0,0 +1,5 @@
+chameleon (1.1.0-1) unstable; urgency=medium
+
+  * Initial release
+
+ -- Florent Pruvost <florent.pruvost@inria.fr>  Wed, 21 Apr 2021 17:36:16 +0200
diff --git a/distrib/debian/control b/distrib/debian/control
new file mode 100644
index 000000000..ccb50e313
--- /dev/null
+++ b/distrib/debian/control
@@ -0,0 +1,21 @@
+Source: chameleon
+Priority: optional
+Maintainer: Florent Pruvost <florent.pruvost@inria.fr>
+Build-Depends: debhelper-compat (= 12), cmake, python, pkg-config, libopenblas-dev, liblapacke-dev, libstarpu-dev, libopenmpi-dev, libhwloc-dev
+Standards-Version: 4.4.1
+Section: libs
+Homepage: https://gitlab.inria.fr/solverstack/chameleon
+
+Package: chameleon
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libopenblas-dev, liblapacke-dev, libstarpu-dev, libopenmpi-dev
+Description: Dense linear algebra subroutines for heterogeneous and distributed architectures
+ Chameleon is a C library providing parallel algorithms to perform
+ BLAS/LAPACK operations exploiting fully modern architectures.
+ Chameleon dense linear algebra software relies on sequential
+ task-based algorithms where sub-tasks of the overall algorithms are
+ submitted to a Runtime system. Such a system is a layer between the
+ application and the hardware which handles the scheduling and the
+ effective execution of tasks on the processing units. A Runtime
+ system such as StarPU is able to manage automatically data transfers
+ between not shared memory area (CPUs-GPUs, distributed nodes).
diff --git a/distrib/debian/copyright b/distrib/debian/copyright
new file mode 100644
index 000000000..259776632
--- /dev/null
+++ b/distrib/debian/copyright
@@ -0,0 +1,38 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: chameleon
+Upstream-Contact: mathieu.faverge@inria.fr florent.pruvost@inria.fr
+Source: https://gitlab.inria.fr/solverstack/chameleon
+
+Files: *
+Copyright: 2012-2021 mathieu.faverge@inria.fr
+           2013-2021 florent.pruvost@inria.fr
+License: CeCILL-C
+ This software is a computer program whose purpose is to process
+ Matrices Over Runtime Systems @ Exascale (MORSE). More information
+ can be found on the following website: http://www.inria.fr/en/teams/morse.
+ .
+ This software is governed by the CeCILL-C license under French law and
+ abiding by the rules of distribution of free software.  You can  use,
+ modify and/ or redistribute the software under the terms of the CeCILL-C
+ license as circulated by CEA, CNRS and INRIA at the following URL
+ "http://www.cecill.info".
+ .
+ As a counterpart to the access to the source code and  rights to copy,
+ modify and redistribute granted by the license, users are provided only
+ with a limited warranty  and the software's author,  the holder of the
+ economic rights,  and the successive licensors  have only  limited
+ liability.
+ .
+ In this respect, the user's attention is drawn to the risks associated
+ with loading,  using,  modifying and/or developing or reproducing the
+ software by the user in light of its specific status of free software,
+ that may mean  that it is complicated to manipulate,  and  that  also
+ therefore means  that it is reserved for developers  and  experienced
+ professionals having in-depth computer knowledge. Users are therefore
+ encouraged to load and test the software's suitability as regards their
+ requirements in conditions enabling the security of their systems and/or
+ data to be ensured and,  more generally, to use and operate it in the
+ same conditions as regards security.
+ .
+ The fact that you are presently reading this means that you have had
+ knowledge of the CeCILL-C license and that you accept its terms.
diff --git a/distrib/debian/dockerfile-debian-testing b/distrib/debian/dockerfile-debian-testing
new file mode 100644
index 000000000..8f2a9dfd1
--- /dev/null
+++ b/distrib/debian/dockerfile-debian-testing
@@ -0,0 +1,38 @@
+FROM debian:testing
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -y
+RUN apt-get install git build-essential wget tar curl devscripts dh-make quilt pbuilder sbuild lintian svn-buildpackage git-buildpackage -y
+RUN apt-get install gfortran cmake python pkg-config libopenblas-dev liblapacke-dev libstarpu-dev libopenmpi-dev libhwloc-dev -y
+
+ARG GITLABTOKEN
+ARG GITLABPROJNUM=616
+ARG DEBIANDIST=debian_testing
+ARG RELEASEVER="1.1.0"
+ARG DEBIANARCH="1_amd64"
+ARG RELEASETAR=chameleon-$RELEASEVER.tar.gz
+ARG RELEASETARDEB=chameleon_$RELEASEVER.orig.tar.gz
+ARG RELEASEURL=https://gitlab.inria.fr/solverstack/chameleon/uploads/b299d6037d7636c6be16108c89bc2aab/$RELEASETAR
+
+RUN wget $RELEASEURL
+RUN mv $RELEASETAR $RELEASETARDEB
+RUN tar xvf $RELEASETARDEB
+
+ENV LOGNAME=root
+ENV DEBEMAIL=florent.pruvost@inria.fr
+RUN cd /chameleon-$RELEASEVER/ && dh_make --library --yes
+
+COPY changelog /chameleon-$RELEASEVER/debian/
+COPY control /chameleon-$RELEASEVER/debian/
+COPY copyright /chameleon-$RELEASEVER/debian/
+COPY rules /chameleon-$RELEASEVER/debian/
+
+RUN export DEB_BUILD_OPTIONS='nocheck' && cd /chameleon-$RELEASEVER/ && debuild -us -uc
+
+RUN apt-get install ./chameleon_${RELEASEVER}-${DEBIANARCH}.deb -y
+RUN export OMPI_ALLOW_RUN_AS_ROOT=1 && export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 && mpiexec -n 2 chameleon_stesting -t 2 -o gemm -n 1000
+
+RUN git clone https://gitlab.inria.fr/solverstack/distrib.git
+RUN cd /distrib/cmake/test/chameleon && mkdir build && cd build && cmake .. && make && ./test_chameleon
+
+RUN curl --header "PRIVATE-TOKEN: ${GITLABTOKEN}" --upload-file ./chameleon_${RELEASEVER}-${DEBIANARCH}.deb "https://gitlab.inria.fr/api/v4/projects/${GITLABPROJNUM}/packages/generic/${DEBIANDIST}/${RELEASEVER}/chameleon_${RELEASEVER}-${DEBIANARCH}.deb"
diff --git a/distrib/debian/dockerfile-ubuntu20.04 b/distrib/debian/dockerfile-ubuntu20.04
new file mode 100644
index 000000000..38b62aa3e
--- /dev/null
+++ b/distrib/debian/dockerfile-ubuntu20.04
@@ -0,0 +1,38 @@
+FROM ubuntu:20.04
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -y
+RUN apt-get install git build-essential wget tar curl devscripts dh-make quilt pbuilder sbuild lintian svn-buildpackage git-buildpackage -y
+RUN apt-get install gfortran cmake python pkg-config libopenblas-dev liblapacke-dev libstarpu-dev libopenmpi-dev libhwloc-dev -y
+
+ARG GITLABTOKEN
+ARG GITLABPROJNUM=616
+ARG DEBIANDIST=ubuntu_20.04
+ARG RELEASEVER="1.1.0"
+ARG DEBIANARCH="1_amd64"
+ARG RELEASETAR=chameleon-$RELEASEVER.tar.gz
+ARG RELEASETARDEB=chameleon_$RELEASEVER.orig.tar.gz
+ARG RELEASEURL=https://gitlab.inria.fr/solverstack/chameleon/uploads/b299d6037d7636c6be16108c89bc2aab/$RELEASETAR
+
+RUN wget $RELEASEURL
+RUN mv $RELEASETAR $RELEASETARDEB
+RUN tar xvf $RELEASETARDEB
+
+ENV LOGNAME=root
+ENV DEBEMAIL=florent.pruvost@inria.fr
+RUN cd /chameleon-$RELEASEVER/ && dh_make --library --yes
+
+COPY changelog /chameleon-$RELEASEVER/debian/
+COPY control /chameleon-$RELEASEVER/debian/
+COPY copyright /chameleon-$RELEASEVER/debian/
+COPY rules /chameleon-$RELEASEVER/debian/
+
+RUN export DEB_BUILD_OPTIONS='nocheck' && cd /chameleon-$RELEASEVER/ && debuild -us -uc
+
+RUN apt-get install ./chameleon_$RELEASEVER-$DEBIANARCH.deb -y
+RUN export OMPI_ALLOW_RUN_AS_ROOT=1 && export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 && mpiexec -n 2 chameleon_stesting -t 2 -o gemm -n 1000
+
+RUN git clone https://gitlab.inria.fr/solverstack/distrib.git
+RUN cd /distrib/cmake/test/chameleon && mkdir build && cd build && cmake .. && make && ./test_chameleon
+
+RUN curl --header "PRIVATE-TOKEN: ${GITLABTOKEN}" --upload-file ./chameleon_$RELEASEVER-$DEBIANARCH.deb "https://gitlab.inria.fr/api/v4/projects/$GITLABPROJNUM/packages/generic/$DEBIANDIST/$RELEASEVER/chameleon_$RELEASEVER-$DEBIANARCH.deb"
\ No newline at end of file
diff --git a/distrib/debian/dockerfile-ubuntu20.10 b/distrib/debian/dockerfile-ubuntu20.10
new file mode 100644
index 000000000..4f968f541
--- /dev/null
+++ b/distrib/debian/dockerfile-ubuntu20.10
@@ -0,0 +1,38 @@
+FROM ubuntu:20.10
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update -y
+RUN apt-get install git build-essential wget tar curl devscripts dh-make quilt pbuilder sbuild lintian svn-buildpackage git-buildpackage -y
+RUN apt-get install gfortran cmake python pkg-config libopenblas-dev liblapacke-dev libstarpu-dev libopenmpi-dev libhwloc-dev -y
+
+ARG GITLABTOKEN
+ARG GITLABPROJNUM=616
+ARG DEBIANDIST=ubuntu_20.10
+ARG RELEASEVER="1.1.0"
+ARG DEBIANARCH="1_amd64"
+ARG RELEASETAR=chameleon-$RELEASEVER.tar.gz
+ARG RELEASETARDEB=chameleon_$RELEASEVER.orig.tar.gz
+ARG RELEASEURL=https://gitlab.inria.fr/solverstack/chameleon/uploads/b299d6037d7636c6be16108c89bc2aab/$RELEASETAR
+
+RUN wget $RELEASEURL
+RUN mv $RELEASETAR $RELEASETARDEB
+RUN tar xvf $RELEASETARDEB
+
+ENV LOGNAME=root
+ENV DEBEMAIL=florent.pruvost@inria.fr
+RUN cd /chameleon-$RELEASEVER/ && dh_make --library --yes
+
+COPY changelog /chameleon-$RELEASEVER/debian/
+COPY control /chameleon-$RELEASEVER/debian/
+COPY copyright /chameleon-$RELEASEVER/debian/
+COPY rules /chameleon-$RELEASEVER/debian/
+
+RUN export DEB_BUILD_OPTIONS='nocheck' && cd /chameleon-$RELEASEVER/ && debuild -us -uc
+
+RUN apt-get install ./chameleon_$RELEASEVER-$DEBIANARCH.deb -y
+RUN export OMPI_ALLOW_RUN_AS_ROOT=1 && export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 && mpiexec -n 2 chameleon_stesting -t 2 -o gemm -n 1000
+
+RUN git clone https://gitlab.inria.fr/solverstack/distrib.git
+RUN cd /distrib/cmake/test/chameleon && mkdir build && cd build && cmake .. && make && ./test_chameleon
+
+RUN curl --header "PRIVATE-TOKEN: ${GITLABTOKEN}" --upload-file ./chameleon_$RELEASEVER-$DEBIANARCH.deb "https://gitlab.inria.fr/api/v4/projects/$GITLABPROJNUM/packages/generic/$DEBIANDIST/$RELEASEVER/chameleon_$RELEASEVER-$DEBIANARCH.deb"
\ No newline at end of file
diff --git a/distrib/debian/install_dependencies.sh b/distrib/debian/install_dependencies.sh
index 054714005..1256a7c1c 100755
--- a/distrib/debian/install_dependencies.sh
+++ b/distrib/debian/install_dependencies.sh
@@ -1,2 +1,27 @@
 #!/bin/sh
-sudo apt install libstarpu-dev libopenblas-dev liblapacke-dev
+# whatis: standard development environment to use the chameleon library
+
+sudo apt-get update -y
+sudo apt-get install build-essential git gfortran cmake doxygen python pkg-config libopenblas-dev liblapacke-dev libstarpu-dev libopenmpi-dev libhwloc-dev -y
+# libopenblas-dev can be replaced by libmkl-dev or liblapack-dev
+
+# install chameleon with cmake
+git clone --recursive https://gitlab.inria.fr/solverstack/chameleon.git
+cd chameleon && cmake -S . -B build -DBUILD_SHARED_LIBS=ON && cmake --build build -j5 && sudo cmake --install build
+# enable MPI with -DCHAMELEON_USE_MPI=ON
+
+# example usage: use chameleon drivers for performance tests
+chameleon_stesting -t 4 -o gemm -n 2000
+# if MPI enabled
+mpiexec -n 2 chameleon_stesting -t 4 -o gemm -n 4000
+
+# example usage: use chameleon library in your own cmake project (we provide a CHAMELEONConfig.cmake)
+cd ..
+git clone https://gitlab.inria.fr/solverstack/distrib.git
+cd distrib/cmake/test/chameleon && mkdir build && cd build && cmake .. && make && ./test_chameleon
+
+# example usage: use chameleon library in your own not cmake project
+# use pkg-config to get compiler flags and linking
+pkg-config --cflags chameleon
+pkg-config --libs chameleon
+# if there are static libraries use the --static option of pkg-config
diff --git a/distrib/debian/rules b/distrib/debian/rules
new file mode 100755
index 000000000..182b3708a
--- /dev/null
+++ b/distrib/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+%:
+	dh $@
+
+override_dh_auto_configure:
+	dh_auto_configure -- -DCHAMELEON_USE_MPI=ON -DBUILD_SHARED_LIBS=ON
diff --git a/distrib/spack/install_dependencies.sh b/distrib/spack/install_dependencies.sh
deleted file mode 100755
index 4286fca1e..000000000
--- a/distrib/spack/install_dependencies.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# Please follow http://morse.gforge.inria.fr/spack/spack.html for further instructions
-git clone https://github.com/solverstack/spack.git
-. spack/share/spack/setup-env.sh
-spack install -v openblas
-spack install -v starpu
-spack load openblas
-spack load starpu
diff --git a/doc/orgmode/chapters/installing.org b/doc/orgmode/chapters/installing.org
index 289f6c78f..bbeb9fe7a 100644
--- a/doc/orgmode/chapters/installing.org
+++ b/doc/orgmode/chapters/installing.org
@@ -54,8 +54,10 @@ we encourage users to use [[sec:spack][Spack]].
 
    # Update Debian packages list
    sudo apt-get update
-   # Install OpenBLAS
+   # Install BLAS/LAPACK, can be OpenBLAS, Intel MKL, Netlib LAPACK
    sudo apt-get install -y libopenblas-dev liblapacke-dev
+   # or sudo apt-get install -y libmkl-dev
+   # or sudo apt-get install -y liblapack-dev liblapacke-dev
    # Install OpenMPI
    sudo apt-get install -y libopenmpi-dev
    # Install StarPU
@@ -105,19 +107,18 @@ we encourage users to use [[sec:spack][Spack]].
    sed -i -e "s#CFLAGS=.*#CFLAGS= -O2 -DADD_ -fPIC#g" make.inc
    make
    sudo make install
-
    #+end_src
+
+   See also our script example in the [[https://gitlab.inria.fr/solverstack/chameleon/-/blob/master/distrib/debian/install_dependencies.sh][distrib/debian]] sub-directory.
+
 *** Known issues
-    1) we need the lapacke interface to tmg routines and symbol like
-       ~LAPACKE_dlatms_work~ should be defined in the lapacke
-       library. The Debian packages /libopenblas-dev/ and /liblapacke-dev/
-       (version 1.0.0) do not provide the tmg interface. Please update
-       your distribution or install the lapacke interface library in
-       another way, by yourself from source or with [[https://gitlab.inria.fr/solverstack/spack-repo][Spack]], or with
-       [[https://gitlab.inria.fr/guix-hpc/guix-hpc-non-free][Guix-HPC]],...
-    2) sometimes parallel make with -j can fails due to undefined
-       dependencies between some targets. Try to invoke the make
-       command several times if so.
+    - we need the lapacke interface to tmg routines and symbol like
+      ~LAPACKE_dlatms_work~ should be defined in the lapacke
+      library. Make sure the Debian packages /libopenblas-dev/ and
+      /liblapacke-dev/ (no problem with Intel MKL) do provide the tmg
+      interface. If not you can possibly update your distribution or
+      install the lapacke interface library in another way, by
+      yourself from source or with [[https://gitlab.inria.fr/solverstack/spack-repo][Spack]], or with [[https://gitlab.inria.fr/guix-hpc/guix-hpc-non-free][Guix-HPC]],...
 *** Some details about dependencies
 **** BLAS implementation
      [[http://www.netlib.org/blas/][BLAS]] (Basic Linear Algebra Subprograms), are a de facto standard
@@ -144,7 +145,6 @@ we encourage users to use [[sec:spack][Spack]].
 
      *Caution about the compatibility:* Chameleon has been mainly tested with
      the reference CBLAS from NETLIB, OpenBLAS and Intel MKL.
-
 **** LAPACK implementation
      [[http://www.netlib.org/lapack/][LAPACK]] (Linear Algebra PACKage) is a software library for
      numerical linear algebra, a successor of LINPACK and EISPACK and
@@ -155,7 +155,6 @@ we encourage users to use [[sec:spack][Spack]].
 
      *Caution about the compatibility:* Chameleon has been mainly tested
      with the reference LAPACK from NETLIB, OpenBLAS and Intel MKL.
-
 **** LAPACKE
      [[http://www.netlib.org/lapack/][LAPACKE]] is a C language interface to LAPACK (or CLAPACK).  It is
      produced by Intel in coordination with the LAPACK team and is
@@ -171,7 +170,6 @@ we encourage users to use [[sec:spack][Spack]].
      MKL. In addition the LAPACKE library *must* be configured to
      provide the interface with the TMG routines and symbols like
      ~LAPACKE_dlatms_work~ should be defined.
-
 **** libtmg
      [[http://www.netlib.org/lapack/][libtmg]] is a component of the LAPACK library, containing routines
      for generation of input matrices for testing and timing of
@@ -181,7 +179,6 @@ we encourage users to use [[sec:spack][Spack]].
 
      *Caution about the compatibility:* Chameleon has been mainly tested
      with the reference TMGLIB from NETLIB, OpenBLAS and Intel MKL.
-
 **** StarPU
      [[http://runtime.bordeaux.inria.fr/StarPU/][StarPU]] is a task programming library for hybrid architectures.
      StarPU handles run-time concerns such as:
@@ -195,8 +192,7 @@ we encourage users to use [[sec:spack][Spack]].
      environment. Note StarPU is enabled by default.
 
      *Caution about the compatibility:* Chameleon has been mainly tested
-     with StarPU-1.1 and 1.2 releases.
-
+     with StarPU-1.1, 1.2 and 1.3 releases.
 **** PaRSEC
      [[http://icl.utk.edu/parsec/][PaRSEC]] is a generic framework for architecture aware scheduling
      and management of micro-tasks on distributed many-core
@@ -205,7 +201,6 @@ we encourage users to use [[sec:spack][Spack]].
      *Caution about the compatibility:* Chameleon is compatible with
      this version
      https://bitbucket.org/mfaverge/parsec/branch/mymaster.
-
 **** QUARK
      [[http://icl.cs.utk.edu/quark/][QUARK]] (QUeuing And Runtime for Kernels) provides a library that
      enables the dynamic execution of tasks with data dependencies in
@@ -216,19 +211,16 @@ we encourage users to use [[sec:spack][Spack]].
 
      *Caution about the compatibility:* Chameleon has been mainly tested
      with the QUARK library coming from https://github.com/ecrc/quark.
-
 **** EZTrace
      This library provides efficient modules for recording
      traces. Chameleon can trace kernels execution on CPU workers
      thanks to EZTrace and produce .paje files. EZTrace also provides
      integrated modules to trace MPI calls and/or memory usage. See
-     how to use this feature here [[sec:trace_ezt][Execution trace
-     using EZTrace]]. To trace kernels execution on all kind of
-     workers, such as CUDA, We recommend to use the internal tracing
-     support of the runtime system used done by the underlying
-     runtime.  See how to use this feature here [[sec:trace_fxt][Execution trace
-     using StarPU/FxT]].
-
+     how to use this feature here [[sec:trace_ezt][Execution trace using EZTrace]]. To
+     trace kernels execution on all kind of workers, such as CUDA, We
+     recommend to use the internal tracing support of the runtime
+     system used done by the underlying runtime.  See how to use this
+     feature here [[sec:trace_fxt][Execution trace using StarPU/FxT]].
 **** hwloc
      [[http://www.open-mpi.org/projects/hwloc/][hwloc]] (Portable Hardware Locality) is a software package for
      accessing the topology of a multicore system including components
@@ -239,7 +231,7 @@ we encourage users to use [[sec:spack][Spack]].
      in major distributions and for most OSes and can be downloaded
      from http://www.open-mpi.org/software/hwloc.
 
-     *Caution about the compatibility:* hwlov should be compatible with
+     *Caution about the compatibility:* hwloc should be compatible with
      the runtime system used.
 **** OpenMPI
      [[http://www.open-mpi.org/][OpenMPI]] is an open source Message Passing Interface
@@ -250,7 +242,6 @@ we encourage users to use [[sec:spack][Spack]].
 
      *Caution about the compatibility:* OpenMPI should be built with the
      --enable-mpi-thread-multiple option.
-
 **** Nvidia CUDA Toolkit
      [[https://developer.nvidia.com/cuda-toolkit][Nvidia CUDA Toolkit]] provides a comprehensive development
      environment for C and C++ developers building GPU-accelerated
@@ -263,16 +254,41 @@ we encourage users to use [[sec:spack][Spack]].
      StarPU (default).  To use CUDA through StarPU, it is necessary to
      compile StarPU with CUDA enabled.
 
-     *Caution about the compatibility:* Chameleon has been mainly tested
-     with CUDA releases from versions 4 to 7.5.  Your compiler must be
-     compatible with CUDA.
+     *Caution about the compatibility:* your compiler must be compatible
+     with CUDA.
+** Distribution Debian
+   Download one of the available package for your distribution here
+   https://gitlab.inria.fr/solverstack/chameleon/-/packages, then
+   install as follows
+   #+begin_src sh
+   sudo apt-get install ./chameleon_1.1.0-1_amd64.deb -y
+   #+end_src
+   Chameleon will be installed on your system meaning you can use
+   drivers for performance tests
+   #+begin_src sh
+   mpiexec -n 2 chameleon_stesting -t 2 -o gemm -n 1000
+   #+end_src
+   and use Chameleon library in your own project
+   #+begin_src sh
+   # example usage: use chameleon library in your own cmake project (we provide a CHAMELEONConfig.cmake)
+   git clone https://gitlab.inria.fr/solverstack/distrib.git
+   cd distrib/cmake/test/chameleon && mkdir build && cd build && cmake .. && make && ./test_chameleon
+
+   # example usage: use chameleon library in your own not cmake project
+   # use pkg-config to get compiler flags and linking
+   pkg-config --cflags chameleon
+   pkg-config --libs chameleon
+   # if there are static libraries use the --static option of pkg-config
+   #+end_src
 
+   Do not hesitate to send an [[mailto:florent.pruvost@inria.fr][email]] if you need a package for your
+   Debian distribution.
 ** Distribution of Chameleon using GNU Guix
    <<sec:guix>>
 
    We provide [[http://guix.gnu.org/][Guix]] packages to install Chameleon with its dependencies
    in a reproducible way on GNU/Linux systems. For MacOSX please refer
-   to the next section about Spack packaging.
+   to the next sections about Brew or Spack packaging.
 
    If you are "root" on the system you can install Guix and directly
    use it to install the libraries. On supercomputers your are not
@@ -333,9 +349,10 @@ we encourage users to use [[sec:spack][Spack]].
     #+end_src
 
     Notice that there exist several build variants
-    - chameleon (default) : with starpu - with mpi
+    - chameleon (default) : with starpu - with mpi - with OpenBlas
     - chameleon-mkl-mt : default version but with Intel MKL multithreaded to replace OpenBlas
     - chameleon-cuda : with starpu - with mpi - with cuda
+    - chameleon-cuda-mkl-mt : with starpu - with mpi - with cuda - with Intel MKL multithreaded to replace OpenBlas
     - chameleon-simgrid : with starpu - with mpi - with simgrid
     - chameleon-openmp : with openmp - without mpi
     - chameleon-parsec : with parsec - without mpi
@@ -429,15 +446,15 @@ we encourage users to use [[sec:spack][Spack]].
 
 *** Installing Spack
 
-    To get support to install a full distribution, Chameleon plus
-    dependencies, we encourage users to use [[https://spack.io/][Spack]]. Please refer to our
-    [[https://gitlab.inria.fr/solverstack/spack-repo/blob/master/README.org][Spack Repository]].
+    To get support to install a full distribution on Linux or MacOS X,
+    Chameleon plus dependencies, we encourage users to use
+    [[https://spack.io/][Spack]]. Please refer to our [[https://gitlab.inria.fr/solverstack/spack-repo/blob/master/README.org][Spack Repository]].
 
     #+begin_src sh
     git clone https://github.com/llnl/spack.git
     export SPACK_ROOT=$PWD/spack
     cd spack/
-    git checkout v0.13.2
+    git checkout v0.16.0
     . $SPACK_ROOT/share/spack/setup-env.sh
     git clone https://gitlab.inria.fr/solverstack/spack-repo.git ./var/spack/repos/solverstack
     spack repo add ./var/spack/repos/solverstack
@@ -458,7 +475,7 @@ we encourage users to use [[sec:spack][Spack]].
     #+begin_src sh
     spack install -v chameleon
     # chameleon is installed here:
-    `spack location -i chameleon`
+    spack location -i chameleon
     #+end_src
 
     Notice that there exist several build variants
@@ -474,7 +491,7 @@ we encourage users to use [[sec:spack][Spack]].
 
     Change the version
     #+begin_src sh
-    spack install -v chameleon@0.9.2
+    spack install -v chameleon@1.0.0
     #+end_src
 
     Notice also that default mpi is OpenMPI and default blas/lapack is
@@ -492,7 +509,9 @@ we encourage users to use [[sec:spack][Spack]].
     # install chameleon with nmad to replace openmpi
     spack install -v chameleon ^nmad
     #+end_src
-
+** Distribution Brew for Mac OS X
+   We provide some [[https://brew.sh/][brew]] packages here
+   https://gitlab.inria.fr/solverstack/brew-repo (under construction).
 ** Build and install Chameleon with CMake
    Compilation of Chameleon libraries and executables are done with
    CMake (http://www.cmake.org/). This version has been tested with
-- 
GitLab