From dc564d9abd43d29242ba9377dbf1681b701ca87d Mon Sep 17 00:00:00 2001 From: nychiang Date: Wed, 10 Sep 2025 13:20:01 -0700 Subject: [PATCH 1/4] create branch --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a74376a1e..baf24c31d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ if(NOT DEFINED CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) endif() - set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_CUDA_SEPARABLE_COMPILATION ON) @@ -38,6 +37,7 @@ option(HIOP_USE_AXOM "Build with AXOM to use Sidre for scalable checkpointing" O option(HIOP_DEEPCHECKS "Extra checks and asserts in the code with a high penalty on performance" OFF) option(HIOP_WITH_KRON_REDUCTION "Build Kron Reduction code (requires UMFPACK)" OFF) option(HIOP_DEVELOPER_MODE "Build with extended warnings and options" OFF) + #with testing drivers capable of 'selfchecking' (-selfcheck) option(HIOP_WITH_MAKETEST "Enable 'make test'" ON) option(HIOP_BUILD_SHARED "Build shared library" OFF) From bacf09c15389bb73b69c299995c80951787129ff Mon Sep 17 00:00:00 2001 From: nychiang Date: Tue, 30 Sep 2025 22:01:32 -0700 Subject: [PATCH 2/4] add token --- .github/workflows/spack_build.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index 6844cbec7..2e8fdd290 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -29,6 +29,7 @@ jobs: uses: warjiang/setup-skopeo@v0.1.3 with: version: latest + github_token: ${{ secrets.GITHUB_TOKEN }} # Use skopeo to check for image for convenience - name: Check for existing base images @@ -43,6 +44,8 @@ jobs: --creds "${{ env.USERNAME }}:${{ secrets.GITHUB_TOKEN }}" \ > /dev/null && echo "Image already exists. Please bump version." && exit 0 echo "IMAGE_EXISTS=false" >> $GITHUB_ENV + with: + github_token: ${{ secrets.GITHUB_TOKEN }} # Need to build custom base image with gfortran - name: Create Dockerfile heredoc @@ -64,6 +67,8 @@ jobs: libstdc++6 \ && rm -rf /var/lib/apt/lists/* EOF + with: + github_token: ${{ secrets.GITHUB_TOKEN }} # https://docs.github.com/en/actions/publishing-packages/publishing-docker-images - name: Log in to the Container registry @@ -72,6 +77,7 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ env.USERNAME }} password: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker if: ${{ env.IMAGE_EXISTS == 'false' }} @@ -80,6 +86,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} labels: org.opencontainers.image.version=${{ env.BASE_VERSION }} + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker base image if: ${{ env.IMAGE_EXISTS == 'false' }} @@ -89,6 +96,7 @@ jobs: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BASE_VERSION }} labels: ${{ steps.meta.outputs.labels }} + github_token: ${{ secrets.GITHUB_TOKEN }} hiop_spack_builds: needs: base_image_build @@ -119,12 +127,17 @@ jobs: # 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 + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Clone Spack run: git clone https://github.com/spack/spack.git + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Spack run: echo "$PWD/spack/bin" >> "$GITHUB_PATH" + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Create heredoc spack.yaml run: | @@ -159,29 +172,45 @@ jobs: # Building OpenSSL was causing errors require: "~openssl" EOF + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Configure GHCR mirror run: spack -e . mirror set --oci-username ${{ env.USERNAME }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Trust keys run: spack -e . buildcache keys --install --trust + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Find external packages run: spack -e . external find --all --exclude python --exclude curl --exclude openssl + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Spack develop HiOp run: spack -e . develop --path=$(pwd) hiop@git."${{ github.head_ref || github.ref_name }}"=develop + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Concretize run: spack -e . concretize --fresh + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install Dependencies run: spack -e . install --no-check-signature --fail-fast --show-log-on-error --verbose --only dependencies + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install HiOp run: | ls -al spack -d -e . install --keep-stage --verbose --show-log-on-error --only package --no-cache + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Test Build run: | @@ -191,8 +220,12 @@ jobs: source env.txt || true cd $(spack -e . location --build-dir hiop@develop) ctest -VV + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Push binaries to buildcache run: | spack -e . buildcache push --force --base-image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BASE_VERSION }} --unsigned --update-index local-buildcache if: ${{ !cancelled() }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From a09520705da3f6c20abf524fd0358898432fba85 Mon Sep 17 00:00:00 2001 From: nychiang Date: Tue, 30 Sep 2025 22:09:53 -0700 Subject: [PATCH 3/4] try to fix --- .github/workflows/spack_build.yml | 54 +++++++++++-------------------- 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/.github/workflows/spack_build.yml b/.github/workflows/spack_build.yml index 2e8fdd290..5948c08a1 100644 --- a/.github/workflows/spack_build.yml +++ b/.github/workflows/spack_build.yml @@ -1,4 +1,3 @@ -# https://spack.readthedocs.io/en/latest/binary_caches.html#spack-build-cache-for-github-actions name: Spack Builds (Ubuntu x86_64 Buildcache) on: [pull_request] @@ -29,7 +28,6 @@ jobs: uses: warjiang/setup-skopeo@v0.1.3 with: version: latest - github_token: ${{ secrets.GITHUB_TOKEN }} # Use skopeo to check for image for convenience - name: Check for existing base images @@ -44,8 +42,6 @@ jobs: --creds "${{ env.USERNAME }}:${{ secrets.GITHUB_TOKEN }}" \ > /dev/null && echo "Image already exists. Please bump version." && exit 0 echo "IMAGE_EXISTS=false" >> $GITHUB_ENV - with: - github_token: ${{ secrets.GITHUB_TOKEN }} # Need to build custom base image with gfortran - name: Create Dockerfile heredoc @@ -67,8 +63,6 @@ jobs: libstdc++6 \ && rm -rf /var/lib/apt/lists/* EOF - with: - github_token: ${{ secrets.GITHUB_TOKEN }} # https://docs.github.com/en/actions/publishing-packages/publishing-docker-images - name: Log in to the Container registry @@ -77,7 +71,6 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ env.USERNAME }} password: ${{ secrets.GITHUB_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker if: ${{ env.IMAGE_EXISTS == 'false' }} @@ -86,7 +79,6 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} labels: org.opencontainers.image.version=${{ env.BASE_VERSION }} - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker base image if: ${{ env.IMAGE_EXISTS == 'false' }} @@ -96,7 +88,6 @@ jobs: push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BASE_VERSION }} labels: ${{ steps.meta.outputs.labels }} - github_token: ${{ secrets.GITHUB_TOKEN }} hiop_spack_builds: needs: base_image_build @@ -127,17 +118,12 @@ jobs: # 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 - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Clone Spack run: git clone https://github.com/spack/spack.git - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Spack run: echo "$PWD/spack/bin" >> "$GITHUB_PATH" - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Create heredoc spack.yaml run: | @@ -172,45 +158,29 @@ jobs: # Building OpenSSL was causing errors require: "~openssl" EOF - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Configure GHCR mirror run: spack -e . mirror set --oci-username ${{ env.USERNAME }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Trust keys run: spack -e . buildcache keys --install --trust - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Find external packages run: spack -e . external find --all --exclude python --exclude curl --exclude openssl - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Spack develop HiOp run: spack -e . develop --path=$(pwd) hiop@git."${{ github.head_ref || github.ref_name }}"=develop - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Concretize run: spack -e . concretize --fresh - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install Dependencies run: spack -e . install --no-check-signature --fail-fast --show-log-on-error --verbose --only dependencies - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install HiOp run: | ls -al spack -d -e . install --keep-stage --verbose --show-log-on-error --only package --no-cache - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Test Build run: | @@ -220,12 +190,24 @@ jobs: source env.txt || true cd $(spack -e . location --build-dir hiop@develop) ctest -VV - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Push binaries to buildcache - run: | - spack -e . buildcache push --force --base-image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BASE_VERSION }} --unsigned --update-index local-buildcache if: ${{ !cancelled() }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} + env: + # What Spack’s example expects + GITHUB_USER: ${{ env.USERNAME }} # e.g. hiop-bot + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # packages: write perms + run: | + # Ensure the mirror uses these env var names for auth (idempotent) + spack -e . mirror set \ + --oci-username-variable GITHUB_USER \ + --oci-password-variable GITHUB_TOKEN \ + local-buildcache + + # Push (NO username/password flags here!) + spack -e . buildcache push \ + --force \ + --base-image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BASE_VERSION }} \ + --unsigned \ + --update-index \ + local-buildcache From bf05489a1a297fe36a616d8276ca8298ec40537b Mon Sep 17 00:00:00 2001 From: nychiang Date: Wed, 1 Oct 2025 01:04:55 -0700 Subject: [PATCH 4/4] remove CI on lassen --- .gitlab/llnl-ci.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.gitlab/llnl-ci.yml b/.gitlab/llnl-ci.yml index f66729eea..3f4dd41cf 100644 --- a/.gitlab/llnl-ci.yml +++ b/.gitlab/llnl-ci.yml @@ -27,14 +27,6 @@ default: CUSTOM_CI_BUILDS_DIR: "/usr/workspace/hiop/gitlab_ci/dane/${CI_PIPELINE_ID}" MY_CLUSTER: dane -.lassen: - tags: - - shell - - lassen - variables: - CUSTOM_CI_BUILDS_DIR: "/usr/workspace/hiop/gitlab_ci/lassen/${CI_PIPELINE_ID}" - MY_CLUSTER: lassen - .llnl_script_config: stage: config script: @@ -177,27 +169,3 @@ clean_on_dane: - .dane - .llnl_script_clean needs: ['test_on_dane_hiopbbpy', 'test_on_dane'] - -# For LLNL/lassen CI -config_on_lassen: - extends: - - .lassen - - .llnl_script_config - -build_on_lassen: - extends: - - .lassen - - .llnl_script_build - needs: ['config_on_lassen'] - -test_on_lassen: - extends: - - .lassen - - .llnl_jsrun_script_test - needs: ['build_on_lassen'] - -clean_on_lassen: - extends: - - .lassen - - .llnl_script_clean - needs: ['test_on_lassen'] \ No newline at end of file