-
Notifications
You must be signed in to change notification settings - Fork 331
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
CI: Disable building with OpenMP on Apple Silicon #637
Conversation
With these changes, the following test (still) fails on macOS 14 (Apple Silicon):
For the macOS 13 runner (Intel CPU):
So, Afaict, the remaining test failures in this PR cannot be related to OpenMP. After all, no implementation of OpenMP is installed on the runners now at all. |
Since disabling OpenMP doesn't make a difference for the failing tests on Intel CPU, I updated this PR to build without OpenMP only on Apple Silicon. That way, we retain the CI coverage for OpenMP on macOS at least for Intel CPU. |
macos-13 test failures seem to be some other issue entirely, both failing test seem to pass their internal test ok, but
overall tests fail with this:
…-- stderr:
CMake Error at /Users/runner/work/elmerfem/elmerfem/cmake/Modules/test_macros.cmake:165 (FILE):
FILE failed to open for reading (No such file or directory):
/Users/runner/work/elmerfem/elmerfem/build/fem/tests/SD_H1BasisEvaluation/TEST.PASSED
Call Stack (most recent call first):
/Users/runner/work/elmerfem/elmerfem/fem/tests/SD_H1BasisEvaluation/runtest.cmake:3 (RUN_ELMER_TEST)
0% tests passed, 1 tests failed out of 1
From: "Markus Mützel" ***@***.***>
To: "ElmerCSC" ***@***.***>
Cc: "Subscribed" ***@***.***>
Sent: Monday, 27 January, 2025 12:26:32
Subject: Re: [ElmerCSC/elmerfem] Disable building with OpenMP on macOS runners. (PR #637)
Since disabling OpenMP doesn't make a difference for the failing tests on Intel CPU, I updated this PR to build without OpenMP only on Apple Silicon. That way, we retain the CI coverage for OpenMP on macOS at least for Intel CPU.
—
Reply to this email directly, [ #637 (comment) |
view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ACTOMSUD3THEDZQRFSRJW6T2MYCVRAVCNFSM6AAAAABV5TFMHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJVGM3DOMJQGA |
unsubscribe ] .
You are receiving this because you are subscribed to this thread. Message ID: ***@***.***>
The information in this email may be confidential and is intended solely for the use of the individual or entity to whom it is intended. If you are not the intended recipient of this message, please delete the message and notify the sender immediately. For information on how we process personal data and our contact information, please see CSC's website: [ https://csc.fi/en/privacy | Privacy ]
Tämän sähköpostin tiedot voivat olla luottamuksellisia ja ne on tarkoitettu yksinomaan sen henkilön tai yhteisön käyttöön, jolle ne on osoitettu. Jos et ole viestissä tarkoitettu vastaanottaja, tuhoa viesti ja ilmoita asiasta välittömästi viestin lähettäjälle. Tietoja henkilötietojen ja yhteystietojen käsittelystä löydät CSC:n verkkosivuilta: [ https://csc.fi/tietosuoja | Tietosuoja ]
|
608008c
to
9b6bbff
Compare
Looking at the CI log, the file
Could there be a situation where the test passes, but that file is still not being created? |
I'll have a further look.
|
836161e
to
b3b6f1d
Compare
Trying to follow your changes on the From GCC's documentation, the additional optimization passes that are activated with
Would it make sense to try and find out which of these flags are causing the issue? Are you suspicious it could be one of those options specifically? |
Yes, well, I have no idea which of those, one or more, could be the culprit. Could also be some combination,
i guess. My take would be to downgrade to -O2, also for macos-14 and ARM64, and then you could also
re-activate OpenMP.
From: "Markus Mützel" ***@***.***>
To: "ElmerCSC" ***@***.***>
Cc: "juharu" ***@***.***>, "Comment" ***@***.***>
Sent: Monday, 27 January, 2025 16:31:30
Subject: Re: [ElmerCSC/elmerfem] CI: Disable building with OpenMP on Apple Silicon (PR #637)
Trying to follow your changes on the act_test branch, it looks like switching the optimization level from -O3 to -O2 seems to have "fixed" the test failure.
From GCC's documentation, the additional optimization passes that are activated with -O3 are:
[ https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html | https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html ]
…-O3
Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the following optimization flags:
-fgcse-after-reload
-fipa-cp-clone
-floop-interchange
-floop-unroll-and-jam
-fpeel-loops
-fpredictive-commoning
-fsplit-loops
-fsplit-paths
-ftree-loop-distribution
-ftree-partial-pre
-funswitch-loops
-fvect-cost-model=dynamic
-fversion-loops-for-strides
Would it make sense to try and find out which of these flags are causing the issue? Are you suspicious it could be one of those options specifically?
—
Reply to this email directly, [ #637 (comment) |
view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ACTOMST6XJCKULWJ2CFLFET2MY7MFAVCNFSM6AAAAABV5TFMHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJVHEYTQNZTGA |
unsubscribe ] .
You are receiving this because you commented. Message ID: ***@***.***>
The information in this email may be confidential and is intended solely for the use of the individual or entity to whom it is intended. If you are not the intended recipient of this message, please delete the message and notify the sender immediately. For information on how we process personal data and our contact information, please see CSC's website: [ https://csc.fi/en/privacy | Privacy ]
Tämän sähköpostin tiedot voivat olla luottamuksellisia ja ne on tarkoitettu yksinomaan sen henkilön tai yhteisön käyttöön, jolle ne on osoitettu. Jos et ole viestissä tarkoitettu vastaanottaja, tuhoa viesti ja ilmoita asiasta välittömästi viestin lähettäjälle. Tietoja henkilötietojen ja yhteystietojen käsittelystä löydät CSC:n verkkosivuilta: [ https://csc.fi/tietosuoja | Tietosuoja ]
|
Ideally, we could disable only one (or more) optimization only in the compilation units that are causing these issues. |
I left the logic for adding runners without OpenMP in place to make it easier in case we would ever want to add them at some point in the future. Currently, the build matrix that doesn't contain that configuration though. Like you proposed, I changed the build type to "RelWithDebInfo" for the Apple Silicon and Intel CPU runners. |
In the latest iteration (with OpenMP, with
Maybe, will still need to build without OpenMP on Apple Silicon and can revert to The macOS 13 runner (Intel CPU) passed all tests in the test suite now. So, we could probably keep building with OpenMP and |
The only failing test is for macOS 14 (Apple Silicon):
That is the same test that also failed for the Ubuntu on ARM runner. It didn't matter whether ElmerFEM was built with or without OpenMP or which optimization level was used. That particular test always failed on macOS 14 (Apple Silicon). |
What is really strange about the failing
If I understood correctly, that file is only supposed to be created for succeeding tests. But it is still marked as failing. Is something different for that test compared to the others? |
Never mind. If the file exists, it depends on its content whether the test is counted as passing. (The file content must be The test seems to be failing due to an accuracy issue:
(In my opinion, the deviation doesn't look too bad. But tbh, I can't tell what is an acceptable deviation.) |
Thanx for looking into this! I checked the pointload2 case. It is related to a point-like volumetric source that can be given to a flow equation. The issue is that it was very sensitive. I activated a "stokes" mode, decreased resolution and took up iterative solvers to fight the sensitivity. In the original case even MUMPS and Umfpack gave a little different solutions. |
Building with OpenMP causes some test failures for macOS on Apple Silicon, see: ElmerCSC#634 (comment) The affected tests currently are: `H1BasisEvaluation` and `SD_H1BasisEvaluation`. For the time being, disable building with OpenMP on Apple Silicon in CI. OpenMP is needed as a transitional build dependency of the SuiteSparse package from Homebrew. So, also disable building with CHOLMOD.
The tests `SD_H1BasisEvaluation` and `SD_LinearFormsAssembly` are failing on macOS 13 (Intel CPU) at optimization level `-O3`. They are passing when ElmerFEM is built with optimization level `-O2`. Switch the build type to "RelWithDebInfo" for that runner as a work-around.
Thanks! I rebased this PR on top of your change. Let's see if that helps for the M1 runner. |
Building with OpenMP causes some test failures on macOS, see #634 (comment). The affected tests currently are:
H1BasisEvaluation
andSD_H1BasisEvaluation
.For the time being, disable building with OpenMP on macOS in CI.
OpenMP is needed as a transitional build dependency of the SuiteSparse package from Homebrew. So, also disable building with CHOLMOD.
The logic to build with OpenMP is left in place. So, it should be easy to re-activate building with it in case the underlying issues will be fixed.
Note that the tests with OpenMP fail for optimization level
-O3
but succeed with-O2
.