diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index acde4028783e462b1f6a2adb1f75554e616bdbf9..3c6f8358de4d95722ebaedb21908b7a4c805d0a8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,87 +1,24 @@
-image: hpclib/hiepacs
+---
+image: hpclib/hiepacs-openmpi
 
 stages:
   - build
   - test
+  - analyse
   - sonar
 #  - deploy
 
-build_spm:
-  stage: build
-  artifacts:
-    name: spm_build
-    expire_in: 42 minutes
-    untracked: true
-  script:
-    - git submodule update --init --recursive
-    - mkdir build
-    - cd build
-    - cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/../install -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DSPM_INT64=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-    - make -j 4 | tee ../pastix-build.log
-    - make install | tee -a ../pastix-build.log
-  only:
-    - branches
-    - master@solverstack/spm
-
-test_spm:
-  stage: test
-  dependencies:
-    - build_spm
-  artifacts:
-    name: spm_test
-    expire_in: 42 minutes
-    paths:
-      - spm.lcov
-      - spm-gcov.log
-  script:
-    - git submodule update --init --recursive
-    - source install/bin/spm_env.sh
-    - (cd build &&
-       eval "ctest
-             $TESTS_RESTRICTION
-             -D ExperimentalTest
-             -D ExperimentalCoverage
-             -D ExperimentalSubmit
-             | tee -a ../spm-build.log")
-    - lcov --directory build --capture --output-file spm.lcov
-    - gcovr -r $PWD | tee spm-gcov.log
-  only:
-    - branches
-    - master@solverstack/spm
-
-sonar_spm:
-  stage: sonar
-  dependencies:
-    - build_spm
-    - test_spm
-  artifacts:
-    name: spm_sonar
-    expire_in: 1 week
-    paths:
-      - spm.lcov
-      - spm-coverage.xml
-      - spm-cppcheck.xml
-      - spm-rats.xml
-      - sonar.log
-  script:
-    - ./tools/analysis.sh
-  only:
-    - master@solverstack/spm
-
-# pages:
-#   stage: deploy
-#   dependencies:
-#     - build_spm
-#   artifacts:
-#     paths:
-#     - public
-#   script:
-#     - git submodule update --init --recursive
-#     - mkdir -p build
-#     - cd build
-#     - cmake .. -DBUILD_DOCUMENTATION=ON -DSPM_INT64=OFF
-#     - make docs
-#     - mv docs/out/html ../public/
-#   only:
-#     - master@solverstack/spm
+before_script:
+  - git submodule update --init --recursive
+  - source .gitlab/env.sh
+  - mkdir -p build
 
+include:
+  - .gitlab/common.yml
+  - .gitlab/build.yml
+  - .gitlab/test.yml
+  - .gitlab/coverage.yml
+  - .gitlab/sonarqube.yml
+  - .gitlab/coverity.yml
+#  - .gitlab/pages.yml
+#  - .gitlab/release.yml
diff --git a/.gitlab/build.yml b/.gitlab/build.yml
new file mode 100644
index 0000000000000000000000000000000000000000..ad5fb509ce8b0581c2f69530df27445baca076cc
--- /dev/null
+++ b/.gitlab/build.yml
@@ -0,0 +1,41 @@
+---
+.build_script_template: &build_script
+  stage: build
+  tags: ["large"]
+  artifacts:
+    name: spm_build_${VERSION}
+    expire_in: 180 minutes
+    untracked: true
+    paths:
+      - install-${VERSION}
+      - build
+      - spm-build-${VERSION}.log
+  script:
+    - cd build
+    - cmake -DSPM_CI_VERSION=${VERSION}
+            -C ../.gitlab/ci-test-initial-cache.cmake  ..
+    - make -j 4 | tee ../spm-build-${VERSION}.log
+    - make install | tee -a ../spm-build-${VERSION}.log
+  only:
+    - branches
+    - master@solverstack/spm
+
+.build_script_template_seq: &build_script_seq
+  extends:
+    - .build_script_template
+    - .only-branches-seq
+
+.build_script_template_mpi: &build_script_mpi
+  extends:
+    - .build_script_template
+    - .only-branches-mpi
+
+build_spm_seq:
+  <<: *build_script_seq
+  variables:
+    VERSION: seq
+
+build_spm_mpi:
+  <<: *build_script_mpi
+  variables:
+    VERSION: mpi
diff --git a/.gitlab/ci-test-initial-cache.cmake b/.gitlab/ci-test-initial-cache.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..f139f0cd97391bca77a689dcff4e4531c1414aec
--- /dev/null
+++ b/.gitlab/ci-test-initial-cache.cmake
@@ -0,0 +1,25 @@
+#
+# Default options for the gitlab CI test configurations
+#
+set( BUILD_SHARED_LIBS ON CACHE BOOL "" )
+
+set( CMAKE_INSTALL_PREFIX "$ENV{PWD}/../install-${SPM_CI_VERSION}" CACHE PATH "" )
+set( CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "" )
+set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "" )
+
+set( CMAKE_BUILD_TYPE "Debug" )
+set( CMAKE_C_FLAGS -O0 -g )
+
+set( SPM_INT64 OFF CACHE BOOL "" )
+
+option(MORSE_ENABLE_WARNING  "Enable warning messages"        ON)
+option(MORSE_ENABLE_COVERAGE "Enable flags for coverage test" ON)
+
+if ( "${SPM_CI_VERSION}" STREQUAL "doc" )
+  set( BUILD_DOCUMENTATION ON CACHE BOOL "" )
+  set( SPM_WITH_MPI     ON CACHE BOOL "" )
+elseif ( "${SPM_CI_VERSION}" STREQUAL "mpi" )
+  set( SPM_WITH_MPI ON  CACHE BOOL "" )
+else()
+  set( SPM_WITH_MPI OFF CACHE BOOL "" )
+endif()
diff --git a/.gitlab/common.yml b/.gitlab/common.yml
new file mode 100644
index 0000000000000000000000000000000000000000..5091500ab34f9a1d01be2221b609ace85ef64327
--- /dev/null
+++ b/.gitlab/common.yml
@@ -0,0 +1,21 @@
+#
+# This file describes the common rules for the stages
+#
+---
+.only-master:
+  only:
+    - master@solverstack/spm
+
+.only-branches-seq:
+  except:
+    - schedules
+  only:
+    - branches
+    - master@solverstack/spm
+
+.only-branches-mpi:
+  except:
+    - schedules
+  only:
+    - branches
+    - master@solverstack/spm
diff --git a/.gitlab/coverage.yml b/.gitlab/coverage.yml
new file mode 100644
index 0000000000000000000000000000000000000000..166ebafeca3022b6414787f11d72eb08b71ff59d
--- /dev/null
+++ b/.gitlab/coverage.yml
@@ -0,0 +1,24 @@
+#
+# Rule to gather the coverages from the different branches
+#
+---
+coverage:
+  stage: analyse
+  artifacts:
+    name: spm_coverage
+    expire_in: 180 minutes
+    paths:
+      - spm.lcov
+      - spm-*.lcov
+      - spm-gcov.log
+  script:
+    - export INPUT_FILES=""
+    - for name in $( ls -1 spm-*.lcov );
+      do
+        lcov --remove $name '*spm/*' '*parsec/*trf_sp*'
+           -q --output-file /tmp/$name | tee -a spm-gcov.log;
+        mv /tmp/$name .;
+        export INPUT_FILES="$INPUT_FILES -a $name";
+      done
+    - lcov $INPUT_FILES -o spm.lcov  | tee -a spm-gcov.log
+    - lcov --summary spm.lcov | tee -a spm-gcov.log
diff --git a/.gitlab/coverity.yml b/.gitlab/coverity.yml
new file mode 100644
index 0000000000000000000000000000000000000000..62a59f6198913006fe36d02d6c650c5602ce1c04
--- /dev/null
+++ b/.gitlab/coverity.yml
@@ -0,0 +1,30 @@
+---
+coverity:
+  stage: analyse
+  tags: ["large"]
+  dependencies: []
+  artifacts:
+    name: spm_coverity
+    expire_in: 1 week
+    paths:
+      - spm.tgz
+  variables:
+    VERSION: mpi
+  script:
+    - mkdir -p build-coverity
+    - cd build-coverity
+    - cmake -DSPM_CI_VERSION=${VERSION}
+            -C ../.gitlab/ci-test-initial-cache.cmake  ..
+    - cov-build --dir ../cov-int make -j 4
+    - cd ..
+    - tar czvf spm.tgz cov-int
+    - curl --form token=$COVERITY_TOKEN
+           --form email=mathieu.faverge@inria.fr
+           --form file=@spm.tgz
+           --form version="`git rev-parse --short HEAD`"
+           --form description=""
+           https://scan.coverity.com/builds?project=SPM
+  only:
+    - master@solverstack/spm
+  except:
+    - schedules
diff --git a/.gitlab/env.sh b/.gitlab/env.sh
new file mode 100644
index 0000000000000000000000000000000000000000..ba10ea46f7bc71387f5460de42cabc72bfaa0442
--- /dev/null
+++ b/.gitlab/env.sh
@@ -0,0 +1,6 @@
+# Add OpenMPI to the environment
+export PATH=$OPENMPI_DIR/bin:$PATH
+export LD_RUN_PATH=$OPENMPI_DIR/lib:$LD_RUN_PATH
+export LD_LIBRARY_PATH=$OPENMPI_DIR/lib:$LD_LIBRARY_PATH
+export INCLUDE_PATH=$OPENMPI_DIR/include:$INCLUDE_PATH
+export PKG_CONFIG_PATH=$OPENMPI_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
diff --git a/.gitlab/pages.yml b/.gitlab/pages.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c6d9d775b7391ee699777ba3f12e0b99b7fb3552
--- /dev/null
+++ b/.gitlab/pages.yml
@@ -0,0 +1,18 @@
+---
+pages:
+  stage: deploy
+  tags: ["large"]
+  dependencies: []
+  artifacts:
+    paths:
+      - public
+  script:
+    - mkdir -p build
+    - cd build
+    - cmake .. -DSPM_CI_VERSION=doc
+            -C ../.gitlab/ci-test-initial-cache.cmake
+    - make -j5
+    - make docs | tee spm-doc.log
+    - mv docs/out/html ../public/
+  extends:
+    - .only-master
diff --git a/.gitlab/release.yml b/.gitlab/release.yml
new file mode 100644
index 0000000000000000000000000000000000000000..6e17ce195966fe09c3434b422b7db07cc616b1cf
--- /dev/null
+++ b/.gitlab/release.yml
@@ -0,0 +1,9 @@
+---
+package:
+  stage: deploy
+  tags: ["large"]
+  dependencies: []
+  only:
+    - /^release-.*$/
+  script:
+    - ./tools/release.sh
diff --git a/.gitlab/sonarqube.yml b/.gitlab/sonarqube.yml
new file mode 100644
index 0000000000000000000000000000000000000000..6646145f881f7d6ffca7185f3efe45852348a3f3
--- /dev/null
+++ b/.gitlab/sonarqube.yml
@@ -0,0 +1,18 @@
+---
+sonar_spm:
+  stage: sonar
+  tags: ["large"]
+  artifacts:
+    name: spm_sonar
+    expire_in: 1 week
+    paths:
+      - spm.lcov
+      - coverage/
+      - spm-coverage.xml
+      - spm-cppcheck.xml
+      - spm-rats.xml
+      - sonar.log
+  script:
+    - ./tools/analysis.sh
+  extends:
+    - .only-master
diff --git a/.gitlab/test.yml b/.gitlab/test.yml
new file mode 100644
index 0000000000000000000000000000000000000000..414f374187d1934e60c8947ffbbc5c77fc314cd4
--- /dev/null
+++ b/.gitlab/test.yml
@@ -0,0 +1,59 @@
+---
+.test_script_template: &test_script
+  stage: test
+  tags: ["large"]
+  artifacts:
+    name: spm_test_${VERSION}
+    expire_in: 180 minutes
+    paths:
+      - spm-${VERSION}-${RUN}.lcov
+      - spm-gcov-${VERSION}.log
+  script:
+    - source install-${VERSION}/bin/spm_env.sh
+    - (cd build &&
+       eval "ctest
+             $TESTS_RESTRICTION
+             -D ExperimentalTest
+             -D ExperimentalCoverage
+             -D ExperimentalSubmit
+             | tee -a ../spm-build-${VERSION}.log")
+    - lcov --capture --directory build
+           -q --output-file spm-${VERSION}-${RUN}.lcov
+           | tee -a spm-gcov-${VERSION}.log
+
+.test_script_template_seq: &test_script_seq
+  extends:
+    - .test_script_template
+    - .only-branches-seq
+
+.test_script_template_mpi: &test_script_mpi
+  extends:
+    - .test_script_template
+    - .only-branches-mpi
+
+test_spm_seq_shm:
+  variables:
+    VERSION: seq
+    RUN: shm
+    TESTS_RESTRICTION: "-R \"shm_\""
+  dependencies:
+    - build_spm_seq
+  <<: *test_script_seq
+
+test_spm_mpi_shm:
+  variables:
+    VERSION: mpi
+    RUN: shm
+    TESTS_RESTRICTION: "-R \"shm_\""
+  dependencies:
+    - build_spm_mpi
+  <<: *test_script_mpi
+
+# test_spm_mpi_dist:
+#   variables:
+#     VERSION: mpi
+#     RUN: dist
+#     TESTS_RESTRICTION: "-R \"mpi_\""
+#   dependencies:
+#     - build_spm_mpi
+#   <<: *test_script_mpi
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 2bf4e3a16fc561d9bb5711e7279524b685fb41b7..d0d3da74f69b73d405cec0dd64ee10606c10d4ec 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -7,9 +7,9 @@
 set(CTEST_PROJECT_NAME "spm")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
 
-set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "cdash.inria.fr")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=pastix")
+set(CTEST_DROP_METHOD "https")
+set(CTEST_DROP_SITE "cdash-ci.inria.fr")
+set(CTEST_DROP_LOCATION "/submit.php?project=PaStiX")
 set(CTEST_DROP_SITE_CDASH TRUE)
 
 #--------------------------------------------------------------------
@@ -38,4 +38,11 @@ if(NOT BUILDNAME)
     set(BUILDNAME "${BUILDNAME}-${CMAKE_BUILD_TYPE}")
   endif(CMAKE_BUILD_TYPE)
 
+  # Specific options
+  if(SPM_WITH_MPI)
+    set(BUILDNAME "${BUILDNAME}-MPI")
+  else()
+    set(BUILDNAME "${BUILDNAME}-SHM")
+  endif()
+
 endif()
diff --git a/cmake_modules/morse_cmake b/cmake_modules/morse_cmake
index 28a162f1279e26cee8386c836e4d2b5af5f37f52..285d7d3a11cf6baf72507994a2589083b4003c6f 160000
--- a/cmake_modules/morse_cmake
+++ b/cmake_modules/morse_cmake
@@ -1 +1 @@
-Subproject commit 28a162f1279e26cee8386c836e4d2b5af5f37f52
+Subproject commit 285d7d3a11cf6baf72507994a2589083b4003c6f
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index ab6d3b8f42cf41e49c811015b5becff9e1501c8d..37cfed3d4342aab3e5a06f4612a946231705def5 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -59,30 +59,46 @@ set( SPM_TESTS
 set( SPM_DOF_TESTS
   spm_dof_expand_tests spm_dof_norm_tests spm_dof_matvec_tests)
 
-# Laplacian
-foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
-  foreach(arithm ${RP_SPM_PRECISIONS} )
-    add_test(test_lap_${arithm}_${example} ./${example}  --lap  ${arithm}:10:10:10:10.:2.)
-    add_test(test_xlap_${arithm}_${example} ./${example} --xlap ${arithm}:6:10:12:5.:0.33)
+# List of run types
+set( RUNTYPE shm )
+if (SPM_WITH_MPI)
+  list( APPEND RUNTYPE mpi )
+endif()
+
+foreach( version ${RUNTYPE} )
+  unset( exe )
+  if( version STREQUAL "shm" )
+    set( exe "")
+  endif()
+  if( version STREQUAL "mpi" )
+    set( exe mpiexec -np 4 )
+  endif()
+
+  # Laplacian
+  foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
+    foreach(arithm ${RP_SPM_PRECISIONS} )
+      add_test( ${version}_test_lap_${arithm}_${example}  ${exe} ./${example} --lap  ${arithm}:10:10:10:10.:2. )
+      add_test( ${version}_test_xlap_${arithm}_${example} ${exe} ./${example} --xlap ${arithm}:6:10:12:5.:0.33 )
+    endforeach()
   endforeach()
-endforeach()
 
-# RSA
-foreach(example ${SPM_TESTS} )
-  add_test(test_rsa_${example} ./${example} --rsa ${CMAKE_SOURCE_DIR}/tests/matrix/small.rsa)
-endforeach()
+  # RSA
+  foreach(example ${SPM_TESTS} )
+    add_test( ${version}_test_rsa_${example} ${exe} ./${example} --rsa ${CMAKE_SOURCE_DIR}/tests/matrix/small.rsa)
+  endforeach()
 
-# Matrix Market
-foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
-  add_test(test_mm_${example} ./${example} --mm ${CMAKE_SOURCE_DIR}/tests/matrix/young4c.mtx)
-endforeach()
+  # Matrix Market
+  foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
+    add_test( ${version}_test_mm_${example} ${exe} ./${example} --mm ${CMAKE_SOURCE_DIR}/tests/matrix/young4c.mtx)
+  endforeach()
 
-# Harwell Boeing
-foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
-  add_test(test_hb_${example} ./${example} --hb ${CMAKE_SOURCE_DIR}/tests/matrix/orsirr.rua)
-endforeach()
+  # Harwell Boeing
+  foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
+    add_test( ${version}_test_hb_${example} ${exe} ./${example} --hb ${CMAKE_SOURCE_DIR}/tests/matrix/orsirr.rua)
+  endforeach()
 
-# Matrix Market - Hermitian
-foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
-  add_test(test_mm2_${example} ./${example} --mm ${CMAKE_SOURCE_DIR}/tests/matrix/mhd1280b.mtx)
+  # Matrix Market - Hermitian
+  foreach(example ${SPM_TESTS} ${SPM_DOF_TESTS} )
+    add_test( ${version}_test_mm2_${example} ${exe} ./${example} --mm ${CMAKE_SOURCE_DIR}/tests/matrix/mhd1280b.mtx)
+  endforeach()
 endforeach()
diff --git a/tools/analysis.sh b/tools/analysis.sh
index 73c46a7a34a355dae4fb6e0aba7ccb12aab54f03..2cdf3002a293b77d5e64c2d2ed7f6473c4be3f46 100755
--- a/tools/analysis.sh
+++ b/tools/analysis.sh
@@ -1,4 +1,15 @@
-#!/bin/bash
+#!/usr/bin/env bash
+###
+#
+#  @file analysis.sh
+#  @copyright 2013-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+#                       Univ. Bordeaux. All rights reserved.
+#
+#  @version 1.0.0
+#  @author Mathieu Faverge
+#  @date 2019-11-12
+#
+###
 
 # Performs an analysis of SpM source code:
 # - we consider to be in SpM's source code root
@@ -16,7 +27,8 @@ then
 fi
 BUILDDIR=${BUILDDIR:-build}
 
-./.gitlab-ci-filelist.sh $BUILDDIR
+TOOLSDIR=$(dirname $0)
+$TOOLSDIR/filelist.sh $BUILDDIR
 
 # Generate coverage xml output
 lcov_cobertura.py spm.lcov --output spm-coverage.xml
@@ -25,10 +37,10 @@ lcov_cobertura.py spm.lcov --output spm-coverage.xml
 export UNDEFINITIONS="-UWIN32 -UWIN64 -U_MSC_EXTENSIONS -U_MSC_VER -U__SUNPRO_C -U__SUNPRO_CC -U__sun -Usun -U__cplusplus"
 
 # to get it displayed and captured by gitlab to expose the badge on the main page
-cat ./spm-gcov.log
+lcov --summary spm.lcov | tee spm-gcov.log
 
 # run cppcheck analysis
-cppcheck -v -f --language=c --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingInclude ${UNDEFINITIONS} --file-list=./filelist.txt 2> spm-cppcheck.xml
+cppcheck -v -f --language=c --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingInclude ${UNDEFINITIONS} --file-list=./filelist-c.txt 2> spm-cppcheck.xml
 
 # run rats analysis
 rats -w 3 --xml  `cat filelist.txt` > spm-rats.xml
@@ -41,10 +53,10 @@ cat > sonar-project.properties << EOF
 sonar.host.url=https://sonarqube.inria.fr/sonarqube
 sonar.login=$SONARQUBE_LOGIN
 
-sonar.links.homepage=https://gitlab.inria.fr/solverstack/spm
-sonar.links.scm=https://gitlab.inria.fr/solverstack/spm.git
-sonar.links.ci=https://gitlab.inria.fr/solverstack/spm/pipelines
-sonar.links.issue=https://gitlab.inria.fr/solverstack/spm/issues
+sonar.links.homepage=$CI_PROJECT_URL
+sonar.links.scm=$CI_REPOSITORY_URL
+sonar.links.ci=$CI_PROJECT_URL/pipelines
+sonar.links.issue=$CI_PROJECT_URL/issues
 
 sonar.projectKey=$SONARQUBE_PROJECTKEY
 sonar.projectDescription=Parallel Sparse direct Solver
@@ -62,7 +74,7 @@ sonar.c.compiler.reportPath=spm-build.log
 sonar.c.coverage.reportPath=spm-coverage.xml
 sonar.c.cppcheck.reportPath=spm-cppcheck.xml
 sonar.c.rats.reportPath=spm-rats.xml
-sonar.c.jsonCompilationDatabase=build/compile_commands.json
+sonar.c.jsonCompilationDatabase=${BUILDDIR}/compile_commands.json
 EOF
 
 # run sonar analysis + publish on sonarqube-dev
diff --git a/.gitlab-ci-filelist.sh b/tools/filelist.sh
similarity index 50%
rename from .gitlab-ci-filelist.sh
rename to tools/filelist.sh
index efdc57aaea0d957ad8a02da22a62567df692f4d6..1c2406eb71ad719916e9c1af1f515418c5dac3c5 100755
--- a/.gitlab-ci-filelist.sh
+++ b/tools/filelist.sh
@@ -1,4 +1,17 @@
-#!/bin/sh
+#!/usr/bin/env sh
+###
+#
+#  @file filelist.sh
+#  @copyright 2013-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+#                       Univ. Bordeaux. All rights reserved.
+#
+#  @brief Generate the filelist for the static analysis
+#
+#  @version 1.0.0
+#  @author Mathieu Faverge
+#  @date 2019-11-12
+#
+###
 
 if [ $# -gt 0 ]
 then
@@ -10,13 +23,23 @@ echo $PWD
 rm -f filelist.txt
 
 git ls-files | grep "\.[ch]"   >  filelist.txt
-#git ls-files | grep "\.py"     >> filelist.txt
+git ls-files | grep "\.py"     >> filelist.txt
 find $BUILDDIR -name '*\.[ch]' >> filelist.txt
-#echo "wrappers/python/examples/pypastix/enum.py" >> filelist.txt
+echo "${BUILDDIR}/include/spm/config.h" >> filelist.txt
+echo "wrappers/python/spm/enum.py" >> filelist.txt
 
 # Remove all CMakeFiles generated files
 sed -i '/CMakeFiles/d' filelist.txt
 
+# Remove all .cmake files
+sed -i '/.cmake/d' filelist.txt
+
+# Remove all .in files
+sed -i '/.in$/d' filelist.txt
+
+# Remove all clang files
+sed -i '/^\.clang/d' filelist.txt
+
 # Remove installed files
 sed -i '/^install.*/d' filelist.txt
 
@@ -32,8 +55,17 @@ do
     sed -i "\:^$file.*:d" filelist.txt
 done
 
+# Remove submodules
+for file in cmake_modules/morse_cmake
+do
+    sed -i "\:^$file:d" filelist.txt
+done
+
 # Remove external driver files
 for file in src/drivers/iohb.c src/drivers/iohb.h src/drivers/mmio.c src/drivers/mmio.h
 do
     sed -i "\:^$file.*:d" filelist.txt
 done
+
+grep '/\.c$/d' filelist.txt > filelist-c.txt
+
diff --git a/wrappers/fortran90/CMakeLists.txt b/wrappers/fortran90/CMakeLists.txt
index a7a81fea05e7f7e8d6a9a10fdd6ed3d47d04dffa..2c7b9f8be9b2927bf10f371c36de46c24af1dba9 100644
--- a/wrappers/fortran90/CMakeLists.txt
+++ b/wrappers/fortran90/CMakeLists.txt
@@ -42,6 +42,12 @@ set (EXAMPLES
   spm_user.f90
   )
 
+# List of run types
+set( RUNTYPE shm )
+if (SPM_WITH_MPI)
+  list( APPEND RUNTYPE mpi )
+endif()
+
 foreach (_file ${EXAMPLES})
   get_filename_component(_name_we ${_file} NAME_WE)
   add_executable(${_name_we} examples/${_file})
@@ -50,7 +56,17 @@ foreach (_file ${EXAMPLES})
   install(TARGETS ${_name_we}       RUNTIME DESTINATION examples )
   install(FILES   examples/${_file}         DESTINATION examples )
 
-  add_test(fortran_${_name_we} ./${_name_we})
+  foreach( version ${RUNTYPE} )
+    unset( exe )
+    if( version STREQUAL "shm" )
+      set( exe "")
+    endif()
+    if( version STREQUAL "mpi" )
+      set( exe mpiexec -np 4 )
+    endif()
+
+    add_test(${version}_fortran_${_name_we} ${exe} ./${_name_we})
+  endforeach()
 
 endforeach()