A parallel interface

As I said it in the last post, my current milestone is to provide bindings for the parallel interface in order to run the parallel finite volume scheme (described in the dune-grid-howto). Thus, I worked on that last week:

  • I firstly exported some enum types relative to the parallel grid partitions (see [1]), which are needed to iterate through entities in the parallel case (see the section “Common entity ranges for non-standard parallel partitions” here).
  • Then I exported the common entity iterators to iterate through entities of any codimension and any partition (see [1] and [2]). Like the iterators on entities of any codimension, the general idea is to use a static array of lambda functions where each lambda manages the creation of an iterator on entities of a specific codimension and a specific type partition (thus it’s a 2d static array generated at compile-time with the use of variadic templates, see [1]).

  • I also implemented the communication interface (see [1]) that merely consists in a communicate method and a DataHandle class used to let the user manages the communication between (parallel) partitions of entities. That was tricky since this DataHandle class has to derives from Dune::CommDataHandleIF (see here), uses the CRTP and has to be implemented in the Python side. My idea was to define a proxy class DataHandle that respects the CRTP but forwards all the function calls to the (real) Python implementation of DataHandle, using a PyObject* (pointing to that Python class). Unfortunatly, I haven’t tested yet that communication interface because I first have to setup my parallel environment (especially running correctly OpenMPI and creating a DUNE grid that handles parallelization).

  • I finally wrote the code of the parallel finite volume scheme (see dune-grid-howto and my code here) but as for the communication interface, I haven’t tested it in “real conditions” (eg in a parallel environment).

In brief, I will be working this week on testing (and surely… debugging) my parallel interface within a parallel environment, I keep you in touch!

blog comments powered by Disqus