dolfin calls instant.swig_get_version() on all processes when running in parallel

Issue #288 resolved
Chris Richardson created an issue

In site-packages/dolfin/compilemodules, jit compilation implicitly calls instant.swig_get_version() on all processes, triggering unnecessary system calls.

The problem largely arises because there is no MPI awareness in instant, so everything has to be controlled from dolfin. e.g. it would be possible to write a function in dolfin which only runs code on the root process, and use that to call instant, and then sets _swig_version_cache to some default value on other processes.

Comments (3)

  1. Johan Hake

    We have tried to get rid of all these calls, but it looks like there are at least two more to remove.

    In ffc.jitobject.signature and in instant.build.recompile. That latter can just be removed as we have pushed the responsibility to check for SWIG to caller. The former can also be removed as we are now checking SWIG version runtime, by setting a variable in the compiled module.

  2. Log in to comment