padding sequence size for ghosting

Issue #15 resolved
Iulian Grindeanu created an issue
  • When we create a new sequence for vertices or elements, and we configure with MPI, we increase the size of the sequence by 1.5; it would be better to have a runtime option for that

  • We do not really need it when we run in serial

about line 416 src/SequenceManager.cpp

EntityID SequenceManager::new_sequence_size(EntityHandle start,
                                            EntityID requested_size,
                                            int sequence_size) const
{
#ifdef USE_MPI
  // If we're compiled parallel, increase requested size by a factor of 1.5, to allow
  // for ghosts; if non-default value used for sequence_size that'll take precedent anyway
  requested_size *= 1.5;
#endif

Comments (4)

  1. Iulian Grindeanu reporter

    we need to discuss it, how would be the best way.
    I think we should have an object that contains some options, mostly runtime options. The issue with this "ghosting" parameter is that it should be used only when in parallel, when reading on more than one task. This routine is though very deep inside MOAB, and right now it is used every time we build with MPI, even if we have a serial run; This has a side effect of leaving many sequences that are not filled.

    Another solution would be to add some optional params to the methods that call this, but from ReadParallel to this routine there is a stack of 10 other methods (I mean, backtrace shows 10 functions in stack)

    How to access a global runtime "option" inside moab?

    A global option object/class/instance could store other things, like all parallel reading options, hdf5 reading options (related to buffer size, for example), if we run in true parallel or not. It could be related to MOAB initialize/Finalize , although I would not like to start MPI inside a moab class.

    How is PETSc dealing with runtime options?

    So a quick solution is to add for the time being just one global option, related to this factor, that could be set by the parallel reader, for example, and accessible by SequenceManager.

    Not sure what is the best solution . Ideas?

  2. Log in to comment