From ac20b3d943ed6b8991e3e98181455e8996d9dcb2 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Wed, 6 Nov 2024 15:00:48 -0500 Subject: [PATCH 1/6] Update spack_build.yml to fix cmake pulling llvm --- .github/workflows/spack_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index bc7af238..9a2bd727 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -99,9 +99,9 @@ jobs: strategy: matrix: spack_spec: - - hiop@develop+mpi~raja~shared~kron~sparse ^openblas ^openmpi ^libevent~openssl - - hiop@develop~mpi~raja~shared~kron~sparse ^openblas ^libevent~openssl - - hiop@develop~mpi+raja~shared~kron~sparse ^openblas ^libevent~openssl + - hiop@develop+mpi~raja~shared~kron~sparse ^openmpi + - hiop@develop~mpi~raja~shared~kron~sparse + - hiop@develop~mpi+raja~shared~kron~sparse # We will need coinhsl for this, but what are the rules for using # a coinhsl tarball? @@ -129,7 +129,7 @@ jobs: cat << EOF > spack.yaml spack: specs: - - ${{ matrix.spack_spec }} target=x86_64_v2 + - ${{ matrix.spack_spec }} ^openblas ^cmake~qtgui~ncurses ^libevent~openssl target=x86_64_v2 concretizer: reuse: dependencies config: From 431593189975b4ee2ef21637a1c6d4566f99a040 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Wed, 6 Nov 2024 19:29:50 -0500 Subject: [PATCH 2/6] Update spack_build.yml to specify cmake requirements for all packages, and re-enable build cache --- .github/workflows/spack_build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index 9a2bd727..36c6c7a9 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -129,7 +129,7 @@ jobs: cat << EOF > spack.yaml spack: specs: - - ${{ matrix.spack_spec }} ^openblas ^cmake~qtgui~ncurses ^libevent~openssl target=x86_64_v2 + - ${{ matrix.spack_spec }} ^libevent~openssl target=x86_64_v2 concretizer: reuse: dependencies config: @@ -141,10 +141,15 @@ jobs: padded_length: False mirrors: local-buildcache: oci://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - # spack: https://binaries.spack.io/develop + spack: https://binaries.spack.io/develop packages: all: require: "%gcc" + # https://spack.readthedocs.io/en/latest/packages_yaml.html#setting-requirements-on-virtual-specs + blas: + require: "openblas" + cmake: + require: "~qtgui~ncurses" EOF - name: Configure GHCR mirror From 0c1e55f91f05cbfdbcb06423f7240a01b1bf30cc Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Thu, 7 Nov 2024 14:32:01 -0500 Subject: [PATCH 3/6] Move openblas into direct package spec --- .github/workflows/spack_build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index 36c6c7a9..97c874a0 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -99,9 +99,9 @@ jobs: strategy: matrix: spack_spec: - - hiop@develop+mpi~raja~shared~kron~sparse ^openmpi - - hiop@develop~mpi~raja~shared~kron~sparse - - hiop@develop~mpi+raja~shared~kron~sparse + - hiop@develop+mpi~raja~shared~kron~sparse ^openblas ^openmpi + - hiop@develop~mpi~raja~shared~kron~sparse ^openblas + - hiop@develop~mpi+raja~shared~kron~sparse ^openblas # We will need coinhsl for this, but what are the rules for using # a coinhsl tarball? @@ -146,8 +146,6 @@ jobs: all: require: "%gcc" # https://spack.readthedocs.io/en/latest/packages_yaml.html#setting-requirements-on-virtual-specs - blas: - require: "openblas" cmake: require: "~qtgui~ncurses" EOF From a486ada29920ef803a2147eed94f6d375bf3070d Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Thu, 7 Nov 2024 14:44:47 -0500 Subject: [PATCH 4/6] Specify openblas in a different way --- .github/workflows/spack_build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index 97c874a0..00c5f817 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -99,9 +99,9 @@ jobs: strategy: matrix: spack_spec: - - hiop@develop+mpi~raja~shared~kron~sparse ^openblas ^openmpi - - hiop@develop~mpi~raja~shared~kron~sparse ^openblas - - hiop@develop~mpi+raja~shared~kron~sparse ^openblas + - hiop@develop+mpi~raja~shared~kron~sparse ^openmpi + - hiop@develop~mpi~raja~shared~kron~sparse + - hiop@develop~mpi+raja~shared~kron~sparse # We will need coinhsl for this, but what are the rules for using # a coinhsl tarball? @@ -129,9 +129,12 @@ jobs: cat << EOF > spack.yaml spack: specs: - - ${{ matrix.spack_spec }} ^libevent~openssl target=x86_64_v2 + - ${{ matrix.spack_spec }} target=x86_64_v2 + - openblas + - libevent~openssl concretizer: - reuse: dependencies + reuse: false + unify: true config: source_cache: $SPACK_CACHE/source_cache misc_cache: $SPACK_CACHE/misc_cache From 7ba7b00a7c72e99e5b650f39ca17a6b6d0426962 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Thu, 7 Nov 2024 15:29:49 -0500 Subject: [PATCH 5/6] Try re-using builds for quicker pipelines --- .github/workflows/spack_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index 00c5f817..c43458b5 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -133,7 +133,7 @@ jobs: - openblas - libevent~openssl concretizer: - reuse: false + reuse: true unify: true config: source_cache: $SPACK_CACHE/source_cache From d07cab2a3e567369d2da065f66cfa6ea6c2728ea Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Fri, 8 Nov 2024 11:26:24 -0500 Subject: [PATCH 6/6] Add some comments and move libevent version spec --- .github/workflows/spack_build.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index c43458b5..6844cbec 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -102,10 +102,13 @@ jobs: - hiop@develop+mpi~raja~shared~kron~sparse ^openmpi - hiop@develop~mpi~raja~shared~kron~sparse - hiop@develop~mpi+raja~shared~kron~sparse - - # We will need coinhsl for this, but what are the rules for using - # a coinhsl tarball? - # - hiop@develop~mpi~raja~shared~kron+sparse + # We will need coinhsl for this, but what are the rules for using + # a coinhsl tarball? + # - hiop@develop~mpi~raja~shared~kron+sparse + blas_provider: + - openblas + compiler: + - gcc name: Build HiOp with Spack @@ -130,11 +133,10 @@ jobs: spack: specs: - ${{ matrix.spack_spec }} target=x86_64_v2 - - openblas - - libevent~openssl + - ${{ matrix.blas_provider }} target=x86_64_v2 concretizer: - reuse: true - unify: true + reuse: true # We want to re-use existing binaries in spack / GHCR mirror + unify: true # We want to build the openblas and hiop version together! config: source_cache: $SPACK_CACHE/source_cache misc_cache: $SPACK_CACHE/misc_cache @@ -144,13 +146,18 @@ jobs: padded_length: False mirrors: local-buildcache: oci://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # If the spack buildcache fails for any readon, feel free to disable spack: https://binaries.spack.io/develop packages: all: - require: "%gcc" + require: "%${{ matrix.compiler }}" # https://spack.readthedocs.io/en/latest/packages_yaml.html#setting-requirements-on-virtual-specs cmake: + # We don't need CMake GUI features for minimal container builds require: "~qtgui~ncurses" + libevent: + # Building OpenSSL was causing errors + require: "~openssl" EOF - name: Configure GHCR mirror