MPI in fenics 2019.1.0 docker container

Hey guys,

I was testing a dolfin script for MPI and sadly it did not work the way I expected it to. Any help would be appreciated!

A minimal example script named mpi_test.py

from dolfin import *

mpi_rank = MPI.rank(MPI.comm_world)
mpi_size = MPI.size(MPI.comm_world)

print("rank / size: ", mpi_rank, "/", mpi_size)

Running mpirun -n 4 python3 mpi_test.py in Fenics 2018.1.0 container gives the following output

rank / size:  2 / 4
rank / size:  1 / 4
rank / size:  0 / 4
rank / size:  3 / 4

but the same script in the Fenics 2019.1.0 container gives

rank / size:  0 / 1
rank / size:  0 / 1
rank / size:  0 / 1
rank / size:  0 / 1

Has anything changed in the newer container? I couldnot find anything in the Changelog.

I cannot reproduce this behaviour.

1 Like

Hello Jack,

Thanks a lot for your reply! I think it was an issue with the build. I used a fenics 2019.1.0 docker image with SHA256 : f99661bca19762194d64c9fdf7ba341490bed9c6eb508c5ea37fb25febb5378d .

I pulled a newer image and then it worked as expected!

(Should’ve updated it here! My bad!)

Cheers.

1 Like