Skip to content

Commit

Permalink
Add Spack CPU build with exago+hiop+raja~ipopt ^hiop+raja~sparse (#41)
Browse files Browse the repository at this point in the history
* Add CPU build with hiop+sparse and exago~ipopt+hiop+raja

* Update .github/workflows/spack_cpu_build.yaml

* `+mpi` to `+raja` CPU build

* Add HIOPRAJASPARSE model if sparse and raja enabled

* Fix other HIOPRAJASPARSE ifdef
  • Loading branch information
cameronrutherford committed Oct 25, 2023
1 parent 33143f3 commit 9dae838
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/spack_cpu_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,29 @@ jobs:
container: spack/ubuntu-focal:latest
strategy:
matrix:
# Minimal Build(s)
# Need S3 mirror to have these builds speedup
spack_spec:
# Minimal Build(s)
# See #39 - ~python~mpi causes issues
# - exago@develop~mpi~ipopt~hiop~python~raja
# See #44 - +mpi~python should fail if no python in system,
# but the runner happens to have one...
- exago@develop+mpi~ipopt+hiop~python~raja ^openmpi
# See #18 - +hiop~mpi causes issues
# - exago@develop~mpi~ipopt+hiop~python+raja
# See #16 - +python~mpi causes issues
# - exago@develop~mpi~ipopt+hiop+python~raja
- exago@develop+mpi~ipopt+hiop+python~raja ^openmpi
# See #40 - +hiop+raja~ipopt ^hiop~sparse is useful for edge cases
- exago@develop+mpi~ipopt+hiop~python+raja ^openmpi ^hiop+raja~sparse

name: Build ExaGO with Spack
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Once we move submodule deps into spack, we can do some more builds...
# Once we move submodule deps into spack, we can do some more builds
# Also need to change build script to use spack from base image
submodules: true

- name: Build Environment
Expand Down
4 changes: 4 additions & 0 deletions src/opflow/interface/opflowregi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ extern PetscErrorCode OPFLOWModelCreate_PBPOLHIOP(OPFLOW);

#if defined(EXAGO_ENABLE_RAJA)
extern PetscErrorCode OPFLOWModelCreate_PBPOLRAJAHIOP(OPFLOW);
#if defined(EXAGO_ENABLE_HIOP_SPARSE)
extern PetscErrorCode OPFLOWModelCreate_PBPOLRAJAHIOPSPARSE(OPFLOW);
#endif
#endif

/*
OPFLOWModelRegisterAll - Registers all built OPFLOW models
Expand Down Expand Up @@ -115,9 +117,11 @@ PetscErrorCode OPFLOWModelRegisterAll(OPFLOW opflow) {
ierr = OPFLOWModelRegister(opflow, OPFLOWMODEL_PBPOLRAJAHIOP,
OPFLOWModelCreate_PBPOLRAJAHIOP);
CHKERRQ(ierr);
#if defined(EXAGO_ENABLE_HIOP_SPARSE)
ierr = OPFLOWModelRegister(opflow, OPFLOWMODEL_PBPOLRAJAHIOPSPARSE,
OPFLOWModelCreate_PBPOLRAJAHIOPSPARSE);
CHKERRQ(ierr);
#endif
#endif

opflow->OPFLOWModelRegisterAllCalled = PETSC_TRUE;
Expand Down

0 comments on commit 9dae838

Please sign in to comment.