1
"Run solver.py in parallel"
3
__author__ = "Anders Logg (logg@simula.no)"
4
__date__ = "2009-08-17 -- 2009-09-21"
5
__copyright__ = "Copyright (C) 2009 Anders Logg"
6
__license__ = "GNU LGPL version 2.1"
8
# Modified by Johan Hake
11
from dolfin_utils.commands import getoutput
12
from dolfin import has_mpi, has_parmetis
14
if not (has_mpi() and has_parmetis()):
15
print "DOLFIN has not been compiled with mpi and Parmetis. Test is not run."
18
# If it works on nine processes, it works for any number of processes (N. Jansson, 2009)
19
num_processes = 9 # Should really be 9 here, but it breaks
22
output = getoutput("mpirun -n %d python solver.py" % num_processes)
23
if len(sys.argv) > 1 and sys.argv[1] == "--debug":