From adccd18015eec2589d69194fa30be45b04cb515e Mon Sep 17 00:00:00 2001
From: Denis Davydov <davydden@gmail.com>
Date: Sat, 2 Apr 2016 12:02:59 +0200
Subject: [PATCH] dealii: add extra test for Petsc+Metis

---
 var/spack/repos/builtin/packages/dealii/package.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 0b76db3827..d8a0df643d 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -174,6 +174,19 @@ def install(self, spec, prefix):
             make('release')
             make('run',parallel=False)
 
+        # An example which uses Metis + PETSc
+        # FIXME: switch step-18 to MPI
+        with working_dir('examples/step-18'):
+            print('=====================================')
+            print('============= Step-18 ===============')
+            print('=====================================')
+            # list the number of cycles to speed up
+            filter_file(r'(end_time = 10;)',  ('end_time = 3;'), 'step-18.cc')
+            if '^petsc' in spec and '^metis' in spec:
+                cmake('.')
+                make('release')
+                make('run',parallel=False)
+
         # take step-40 which can use both PETSc and Trilinos
         # FIXME: switch step-40 to MPI run
         with working_dir('examples/step-40'):
-- 
GitLab