scotch: add oneAPI compiler flags that disable optimizations that alter mathematical results - #81
Conversation
| version("5.1.10b", sha256="54c9e7fafefd49d8b2017d179d4f11a655abe10365961583baaddc4eeb6a9add") | ||
|
|
||
| build_system(conditional("cmake", when="@7:"), "makefile", default="cmake") | ||
| build_system("cmake", conditional("makefile", when="@:6"), default="cmake") |
There was a problem hiding this comment.
If I understand correctly, this means that for versions 6 and earlier, both cmake and makefile are an option, and the default is cmake?
The original line 47 to me reads like cmake available from version 7 and makefile available for all versions, suggesting that the cmake build wasn't available for versions 6 and earlier?
If I am right (probably not ...) and our goal is to switch from makefile for version 6 to cmake for version 7, then this is sufficient?
build_system("make", when="@:6"))
build_system("cmake", when="@7:"))
The issue with that is that line 48 effectively precludes building scotch@:6 with oneapi. But maybe that's ok. After all, we weren't able to build scotch with oneapi until recently.
@AlexanderRichert-NOAA thoughts?
There was a problem hiding this comment.
If I understand correctly, this means that for versions 6 and earlier, both cmake and makefile are an option, and the default is cmake?
The original line 47 to me reads like cmake available from version 7 and makefile available for all versions, suggesting that the cmake build wasn't available for versions 6 and earlier?
7: -- only cmake for build system
:6 -- cmake or makefile, default cmake
based on your comment from JCSDA/spack-stack#2075
If I am right (probably not ...) and our goal is to switch from makefile for version 6 to cmake for version 7, then this is sufficient?
build_system("make", when="@:6")) build_system("cmake", when="@7:"))
I was trying to allow cmake or makefile for :6 but restrict to cmake for 7: -- if it's best to only build with makefile for :6, your suggestion does that. I am certainly agnostic about it.
The issue with that is that line 48 effectively precludes building scotch@:6 with oneapi. But maybe that's ok. After all, we weren't able to build scotch with oneapi until recently.
That is the point of line 48.
There was a problem hiding this comment.
Understood. git diff can be so confusing. Thanks for the clarification.
Add oneAPI compiler flags that disable optimizations that alter mathematical results
For Intel OneAPI C and Fortran compilers, set the following flags for the
scotchpackage recipe:-fp-model=precise-fp-speculation=safeThese are set for
CMAKE_{C,Fortran}_FLAGSto cover all build configuration types (Debug,Release,RelWithDebInfo,MinSizeRel).Also changes the
build_system()conditional so thatcmakeis the gated default forv7:andmakefileis gated to older versions, and constrainoneAPIbuilds to usecmake.Fixes: JCSDA/spack-stack#2075
Testing
Build test envs on hercules and orion with this PR's code changes; results are satisfactory, see here; @gspetro-NOAA has successfully run full regression tests.
A PR for authoritative
spack-packageswill also be created in the event that the PR for scotch either isn't accepted or is not merged prior to the nextspack-stackrelease