~ubuntu-branches/ubuntu/wily/dolfin/wily-proposed

« back to all changes in this revision

Viewing changes to test/system/parallel-assembly-solve/test.py

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2015-03-17 07:57:11 UTC
  • mfrom: (1.1.18) (19.1.24 experimental)
  • Revision ID: package-import@ubuntu.com-20150317075711-1v207zbty9qmygow
Tags: 1.5.0-1
* New upstream release (closes: #780359).
* debian/control:
  - Bump Standards-Version to 3.9.6 (no changes needed).
  - Bump X-Python-Version to >= 2.7.
  - Update package names for new SONAME 1.5 (libdolfin1.4 ->
    libdolfin1.5, libdolfin1.4-dbg -> libdolfin1.5-dbg and
    libdolfin1.4-dev -> libdolfin1.5-dev).
  - Bump minimum required version for python-instant, python-ufl and
    python-ffc to 1.5.0.
  - Add python-sympy and python-six to Depends for binary package
    python-dolfin.
  - Add dh-python to Build-Depends.
  - Remove libcgal-dev from {Build-}Depends.
* Remove CSGCGALMeshGenerator3D-oom.patch since CGAL is no longer used
  by DOLFIN.
* Move debian/libdolfin1.4.install -> debian/libdolfin1.5.install.
* debian/rules: No longer any non DFSG-free stuff to remove, so update
  get-orig-source target (update debian/watch accordingly).
* Update debian/copyright and debian/copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"Run solver.py in parallel"
2
 
 
3
 
# Copyright (C) 2009 Anders Logg
4
 
#
5
 
# This file is part of DOLFIN.
6
 
#
7
 
# DOLFIN is free software: you can redistribute it and/or modify
8
 
# it under the terms of the GNU Lesser General Public License as published by
9
 
# the Free Software Foundation, either version 3 of the License, or
10
 
# (at your option) any later version.
11
 
#
12
 
# DOLFIN is distributed in the hope that it will be useful,
13
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 
# GNU Lesser General Public License for more details.
16
 
#
17
 
# You should have received a copy of the GNU Lesser General Public License
18
 
# along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
19
 
#
20
 
# Modified by Johan Hake
21
 
# Modified by Johannes Ring 2011
22
 
# Modified by Garth N. Wells 2013
23
 
#
24
 
# First added:  2009-08-17
25
 
# Last changed: 2013-07-06
26
 
 
27
 
import sys
28
 
import subprocess
29
 
from dolfin import has_mpi, has_parmetis, has_scotch
30
 
 
31
 
if not (has_mpi()):
32
 
    print "DOLFIN has not been compiled with MPI. Test is not run."
33
 
    sys.exit(0)
34
 
elif not (has_parmetis() or has_scotch()):
35
 
    print "DOLFIN has not been compiled with ParMETIS or SCOTCH. Test is not run."
36
 
    sys.exit(0)
37
 
 
38
 
# Number of processes
39
 
num_processes = 3
40
 
 
41
 
# Run solver.py
42
 
output = subprocess.check_output(['mpirun', '-np', str(num_processes),
43
 
                                  sys.executable, 'solver.py'])
44
 
if len(sys.argv) > 1 and sys.argv[1] == "--debug":
45
 
    print output
46
 
 
47
 
# Return exit status
48
 
if "ERROR" in output:
49
 
    print output
50
 
    sys.exit(1)
51
 
else:
52
 
    print "OK"
53
 
    sys.exit(0)