This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

making solve() run in parallel

0 votes

the code I'm writing contains

problem = NonlinearVariationalProblem(L, u_, bcs, J)
solver = NonlinearVariationalSolver(problem)

while (t < T):
    t += dt
    u0_.vector()[:] = u_.vector()
    solver.solve()

and I'm running it in parallel

$ mpiexec -n 4 python2 rbc.py
...
Process 0: Solving linear system of size 124565 x 124565 (PETSc LU solver, mumps)
...

While the code does some things in parallel like applying boundary conditions, only one process does the Solving.

asked Jan 8, 2014 by bshankar FEniCS Novice (790 points)

1 Answer

+1 vote
 
Best answer

No that is not true. The output is only presented on the first process. The solver is run in parallel. At least if you are using PETSc or Epetra as linear algebra backends.

answered Jan 9, 2014 by johanhake FEniCS Expert (22,480 points)
selected Jan 9, 2014 by bshankar
...