I’m using this container quay.io/fenicsproject/stable:current to run the script below, which is just the script that was at ~/demo/python/documented/poisson in the docker image but with increased mesh resolution to be able to measure the speedup of the parallel run (hence the UnitSquareMesh(800, 800)).
I’m running the script with:
docker-compose run fenics bash
cd notebooks/examples
mpirun -np 6 python3 script.py
But I’m getting the error below. Just running python3 script.py works well though.
Any clue on how I could fix this?
The error trace
fenics@504b57b5deac:~/shared/notebooks/examples$ mpirun -np 6 python3 parallel_test.py
Process 0: Solving linear variational problem.
Process 1: Solving linear variational problem.
Process 4: Solving linear variational problem.
Process 5: Solving linear variational problem.
Process 3: Solving linear variational problem.
Process 2: Solving linear variational problem.
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= PID 114 RUNNING AT 504b57b5deac
= EXIT CODE: 9
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Killed (signal 9)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
The script
from dolfin import *
mesh = UnitSquareMesh(800, 800)
V = FunctionSpace(mesh, "Lagrange", 1)
def boundary(x):
return x[0] < DOLFIN_EPS or x[0] > 1.0 - DOLFIN_EPS
u0 = Constant(0.0)
bc = DirichletBC(V, u0, boundary)
u = TrialFunction(V)
v = TestFunction(V)
f = Expression("10*exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)", degree=2)
g = Expression("sin(5*x[0])", degree=2)
a = inner(grad(u), grad(v))*dx
L = f*v*dx + g*v*ds
u = Function(V)
solve(a == L, u, bc)
The docker-compose.yml
version: "3.9"
services:
fenics:
image: quay.io/fenicsproject/stable:current
volumes:
- ./:/home/fenics/shared
working_dir: /home/fenics/shared