pecos / tps

Torch Plasma Simulator
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Add option to specify partition file in run file. #20

Closed trevilo closed 3 years ago

trevilo commented 3 years ago

This PR will allow the user to specify the parallel decomposition using a 'partitioning' file, which, after two lines of metadata, has number_of_elements lines which indicate which mpi task each element is assigned to. That is,

number_of_elements <int>
number_of_processors <int>
<rank of elem 0>
<rank of elem 1>
...
<rank of last elem>

Such a file can be obtained using the MFEM [mesh-explorer miniapp] (https://mfem.org/meshing/#meshing-miniapps). See specifically L960-L967 where the partitioning file is written.

In principle, we could also have tps write such a file if none is provided, but this isn't being done yet, mostly because the ParMesh ctor doesn't return the partitioning by default, so it isn't easy to get, as far as I can tell.

Regardless, letting the user provide this info will make it easier to move runs across machines, MFEM versions, METIS versions, etc and generally cope better with any other changes that might introduce jitter in the default partitioning.