Hey guys, I’m working on a project where I’m trying to generate figures after running a parallel solve with fenics. I would like to parallelize the picture making function, as there can be hundreds or thousands of figures. I would like assign each core a photo to create and when it finishes assign it a new one. The only issue I am having is when calling the function with mpirun the mesh breaks up like it would in the (parallel)solver when I try to retrieve it from the file. Is there a way to retrieve the complete mesh for functions on every core? (the code works well on a single core)
Split your MPI communicators carefully? E.g. generate/read the mesh on COMM_SELF
.
Sorry I’m relatively new to this, is there a way I can do it if the mesh is already generated? I’m currently calling mesh = d.Mesh(fileLocation) to get the mesh in the serialized portion.
Nevermind! It worked with mesh = d.Mesh(MPI.COMM_SELF, fileLocation) without regenerating. Thanks!