-
Notifications
You must be signed in to change notification settings - Fork 91
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: Spack docker containers #3039
Conversation
e88ad2b
to
ed09300
Compare
606df70
to
eb9b77f
Compare
9aa2678
to
ada149c
Compare
d1a5ed4
to
b9f7735
Compare
b9f7735
to
f673591
Compare
f673591
to
a090c3b
Compare
3188c78
to
ad53f07
Compare
45f9942
to
76adca4
Compare
76adca4
to
52cdc7f
Compare
52cdc7f
to
ce09009
Compare
ce09009
to
e8b3a32
Compare
It is probably possible, but we would need to be careful in choosing which and when images get to be "latest". |
Does it make sens to say that geos develop branch should be in sync with tpl develop branch (latest commit). But when doing a geos release a corresponding release has to be done on the tpl side ? |
a4a3e99
to
be54b83
Compare
-DENABLE_HYPRE=${ENABLE_HYPRE} \ | ||
-DENABLE_HYPRE_DEVICE=${ENABLE_HYPRE_DEVICE} \ | ||
-DENABLE_TRILINOS=${ENABLE_TRILINOS} \ | ||
-DGEOS_LA_INTERFACE:PATH=${GEOS_LA_INTERFACE} \ |
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.
why the need to specify both ENABLE_TRILINOS
and GEOS_LA_INTERFACE
?
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.
why the need to specify both ENABLE_TRILINOS and GEOS_LA_INTERFACE?
The current way the linear algebra packages are configured in the CI jobs is by setting the ENABLE_HYPRE
and ENABLE_TRILINOS
variables as environment variables:
GEOS/.github/workflows/build_and_test.yml
Lines 199 to 207 in bd70903
# The linear algebra environment variables (ENABLE_HYPRE, ENABLE_HYPRE_DEVICE & ENABLE_TRILINOS) | |
# could be passed as scripts parameters as well, but a specific care must be taken to be sure | |
# there's no conflict with the host-config files. | |
ENABLE_HYPRE=${{ inputs.ENABLE_HYPRE }} | |
ENABLE_HYPRE_DEVICE=${{ inputs.ENABLE_HYPRE_DEVICE }} | |
ENABLE_TRILINOS=${{ inputs.ENABLE_TRILINOS }} | |
docker_args+=(-e ENABLE_HYPRE=${ENABLE_HYPRE:-OFF}) | |
docker_args+=(-e ENABLE_HYPRE_DEVICE=${ENABLE_HYPRE_DEVICE:-CPU}) | |
docker_args+=(-e ENABLE_TRILINOS=${ENABLE_TRILINOS:-ON}) |
Then reading those environment variables into CMake and choosing a GEOS_LA_INTERFACE
from there:
GEOS/host-configs/environment.cmake
Lines 16 to 43 in bd70903
# If not defined as argument, take from the environment... | |
if(NOT DEFINED ENABLE_HYPRE) | |
set(ENABLE_HYPRE "$ENV{ENABLE_HYPRE}" CACHE BOOL "" FORCE) | |
endif() | |
# ... and then check the value. | |
if(ENABLE_HYPRE) | |
set(GEOS_LA_INTERFACE "Hypre" CACHE STRING "" FORCE) | |
else() | |
set(ENABLE_HYPRE OFF CACHE BOOL "" FORCE) | |
endif() | |
# Same pattern | |
if(NOT DEFINED ENABLE_TRILINOS) | |
set(ENABLE_TRILINOS "$ENV{ENABLE_TRILINOS}" CACHE BOOL "" FORCE) | |
endif() | |
if(ENABLE_TRILINOS) | |
set(GEOS_LA_INTERFACE "Trilinos" CACHE STRING "" FORCE) | |
else() | |
set(ENABLE_TRILINOS FALSE CACHE BOOL "" FORCE) | |
endif() | |
if( (ENABLE_HYPRE AND ENABLE_TRILINOS) OR (NOT ENABLE_TRILINOS AND NOT ENABLE_HYPRE)) | |
MESSAGE(SEND_ERROR "Exactly one of ENABLE_HYPRE and ENABLE_TRILINOS must be defined.") | |
MESSAGE(SEND_ERROR "ENABLE_HYPRE = ${ENABLE_HYPRE}.") | |
MESSAGE(SEND_ERROR "ENABLE_TRILINOS = ${ENABLE_TRILINOS}.") | |
endif() | |
MESSAGE(STATUS "GEOS_LA_INTERFACE = ${GEOS_LA_INTERFACE}") |
Instead of reading in environment variables from environment.cmake
, the spack Docker containers each generate a host-config (spack-generated.cmake
) to use instead, where the GEOS_LA_INTERFACE
is by default set to Hypre. The snippet added here is for overriding the spack host-config defaults by defining those variables through CMake (passing them to config-build.py
) instead of reading them through environment variables. This is done for CI jobs that have GEOS_LA_INTERFACE
set to Trilinos.
be54b83
to
861477e
Compare
* `Manual compiler configuration <https://spack.readthedocs.io/en/latest/getting_started.html?highlight=compilers.yaml#manual-compiler-configuration>`_ | ||
* `External packages <https://spack.readthedocs.io/en/latest/packages_yaml.html#external-packages>`_ | ||
|
||
Building the dependencies can be as simple as running: |
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.
I would remove this part about this generic command and start by saying that a spack-env
file must be specified.
This PR attempts to run Github Actions using Docker images with dependencies built with uberenv, spack.
Related to GEOS-DEV/thirdPartyLibs#261
Relates to GEOS-DEV/LvArray#318