Partition forms by Index

Issue #11 invalid
Martin Sandve Alnæs created an issue

(martinal: copied this from launchpad, sorry it has been lying for so long. Has there been any updates regarding the comments from GRM at the end here? Is there an updated branch available?)

The code generation strategy of MCFC involves breaking a form into portions where all the Expr nodes in each portion use the same set of indices, and then generating an individual expression for each portion in the outermost loop possible. An additional expression that combines the portions is also generated. For an example, see slides 6-16 of http://fenicsproject.org/pub/workshops/fenics12/slides/Markall.pdf

The main motivation for using this strategy is to reduce the size of the generated code - it is also possible that producing an affine loop nest instead of a large expression may make the generated code more amenable to optimisation (e.g. using the polyhedral model) by the target C compiler.

In order that this code generation strategy might be implemented in other form compilers, I have begun factoring out the partitioning code from MCFC and adding it into a branch of UFL ( lp:~grm08/ufl/indexpartitioning ). I suspect one problem is that the partitioning code is not efficient (in ufl/algorithms/indexpartitioning.py) and could be improved.

Any further comments would be gratefully received.

MSA: I didn't see this before now, because blueprints are not automatically emailed. Will take a look but not right away.

GRM: I just linked the related branch. The original implementation wasn't very elegant, and I think it will be slow on large forms. I think I need to come up with some unit tests to demonstrate what it is supposed to do.

Work items: Complete lifting the implementation of the IndexPartitioner from MCFC: TODO Add suitable tests: TODO

Comments (2)

  1. Log in to comment