MPI tutorial compatible with Fenicsx 0.7+

Hi,

I’m looking to understand how to parallelise my project in fenicsX with the supported openMPI framework. I was looking for resources for this and could only find this.

Unfortunately, as soon as fenicsx calls are used the example scripts do not run - I presume the API has changed in more recent versions.

Are there any up to date resources on this?

Thanks,

R.

You could check out @dokken’s tutorial: The FEniCSx tutorial — FEniCSx tutorial

If you go to the source you can check out and build the tutorial at the specific verison you want, e.g., v0.7.0:

There might be a way to get this to work online without having to build it yourself; however, this is beyond my current knowledge.

I think @dokken also has some tutorials with emphasis on MPI, but I’ll let him relay the links.

Here is the DOLFINx + MPI tutorial for v0.7.x
https://scientificcomputing.github.io/mpi-tutorial/notebooks/dolfinx_MPI_tutorial.html
written by me and @hherlyng. It is inspired by the NewFrac code.

1 Like

Great, than you.

Just quickly, before I wrestle with that, my project is using the non-linear assembly with dolfinx-MPC to get periodic boundaries, as implemented here and discussed here. Will application to that be the same? Or will that create any significant hurdles?

Thanks,

R.

Not sure what you refer to here?

DOLFINx_MPC is built as an extension of DOLFINx, and uses DOLFINx structures, such as dofmaps, index-maps, functions etc.

The only major difference between the DOLFINx and DOLFINx_MPC is that DOLFINx MPC creates special index_maps and dofmaps with constraint information, and does assembly in a specific way, as specified in https://fenics2021.com/slides/dokken.pdf

Sorry, I’m not particularly fluent with all of the machinery and am guilty of “cargo cult coding” my way through to some extent.

So I was just wondering if the application in the link you provided - which implements a linear solver without the MPC extension - can be applied to my case, in terms of dolfinx calls, without further guidance/modification of the function calls etc. So the hurdles I was anticipating were really my adapt it to my case, not technical issues with MPC etc.

I’ll give it a go first and see if I run into any trouble.

Thanks.