-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parallel build issues #788
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I agree that these changes should prevent (at least some) parallel compilation failures. CMake is strange in how it names and generates .mod
files and this should help to ensure that parallel builds aren't clobbering .mod
files needed & in use by other targets. I want to double check what tests CI is running to ensure it includes the changed test cases.
I confirmed that this is running the tests that were changed in CI. Thanks for tackling this Andre! This is ready to merge AFAICT. Let me know if you want me to do the merge and whether or not to wait for @rouson to take a look. |
@zbeekmann I switched from function to variable to evaluate it once only.
Else the function could possibly be evaluated multiple times with the same
result everytime. So just a small optimisation.
Am 8. Oktober 2024 20:00:09 schrieb zbeekman ***@***.***>:
… @zbeekman approved this pull request.
Looks good to me. I agree that these changes should prevent (at least some)
parallel compilation failures. CMake is strange in how it names and
generates .mod files and this should help to ensure that parallel builds
aren't clobbering .mod files needed & in use by other targets. I want to
double check what tests CI is running to ensure it includes the changed
test cases.
In src/script-templates/caf.in:
> @@ -161,14 +161,13 @@ __caf_err_report() {
trap '__caf_err_report "${FUNCNAME:-.}" ${LINENO}' ERR
# See if we are compiling or compiling and/or linking
-__only_compiling () {
- for arg in "${@}"; do
- if [[ "${arg}" == "-c" ]]; then
- return 0
- fi
- done
- return 1
-}
+with_link="true"
+for arg in "${@}"; do
+ if [[ "${arg}" == "-c" || "${arg}" == "-cpp" ]]; then
Good catch with -cpp.
In src/script-templates/caf.in:
> @@ -161,14 +161,13 @@ __caf_err_report() {
trap '__caf_err_report "${FUNCNAME:-.}" ${LINENO}' ERR
# See if we are compiling or compiling and/or linking
-__only_compiling () {
Just curious @vehre: what was your motivation for changing this from a
function to a variable?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Mpich from 4.0 on seems to bug when there is a message dangling on freeing the communicator.
Using just a variable to indicate openmpi did not work reliably with all generators, i.e. at least with ninja the variable was not set in the top-level CMakeLists.txt and therefore additional options were not set leading to test failures.
…communicator-4-mpich Fix test failures with mpich 4+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary of changes
Fix build dependencies to enable parallel builds.
Rationale for changes
While figuring issues in OpenCoarrays fast builds are reQuired to reduce turn-around time when switching mpi-library. The build system was only allowing seQuential builds using make. The patches in this pr fix this for
make -j N
andninja
. Other build systems might benefit, too. This may allow for easier implementing #759, but will not fix it completely.Additional info and certifications
This pull request (PR) is a:
I certify that
OpenCoarrays developer a chance to review my proposed code
be introduced)
Code coverage data