Add openmp to the XFEL builder by default #1063
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the end of a rabbit hole of dependencies. I thought I'd write it here in case it comes up again. Thanks @fredericpoitevin and @nksauter.
But this would pass
cftbx
triggers an import ofrstbx/__init__.py
which includesomptbx_ext
, the OpenMP adapter in cctbx. At this point we think we know what happens next.omptbx/omp_or_stubs.h
includes this code:In other words, if OpenMP is enabled, use
omp.h
, otherwise stub out the OpenMP API. Since the new psana2 included a library which uses OpenMP (we think), these stubs would clobber psana.Since we can't easily swap import orders around in the larger codebase, instead making
--enable_openmp_if_possible=True
the default for the XFEL builder is the best work around. That's already the case for the Phaser and Phenix builders so its not such a big step.