Unnecessary recompilation?
Bug #1177383 reported by
Martin Sandve Alnæs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dolfin-adjoint |
New
|
Undecided
|
Unassigned |
Bug Description
This may not be a bug per se, but something that can hopefully be improved.
I notice that when running dolfin-adjoint e.g. with only a different number of timesteps, there is quite a bit of jit compilation going on. I suspect there are places in dolfin-adjoint that could avoid this. Things to keep in mind:
- Don't use computed literals in forms, wrap them in a Constant(value) to avoid recompilation
- Preserve ordering of functions if possible when doing things like replacing.
To post a comment you must log in.
a) We don't ever add literal constants into forms, as far as I know.
b) When you say preserve ordering of functions -- what do you mean? At the moment we just use dolfin.replace and build a dictionary of what's to be replaced, which has no sense of ordering. Can you give a small example?