dolfin calls instant.swig_get_version() on all processes when running in parallel
Issue #288
resolved
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)
-
-
reporter Sounds good to me.
-
- changed status to resolved
Resolved by two commits in instant and ffc.
- Log in to comment
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 ininstant.build.recompile
. That latter can just be removed as we have pushed the responsibility to check forSWIG
to caller. The former can also be removed as we are now checkingSWIG
version runtime, by setting a variable in the compiled module.