From 1ab78bd8b229f8176bfa124d6cc650d89345ccbd Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 13:27:33 -0700 Subject: [PATCH 1/8] try some changes to fix cuda installl --- .github/workflows/build-and-test-callable.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index 5fb23ff3..2ea92792 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -65,6 +65,7 @@ jobs: env: cuda-toolkit-version: '12.4.1' + CUDA_HOME: '/usr/local/cuda-12.4' cuda-driver-version: '550.54.15' # These are all passed to setup.py as one concatenated string build-flags: >- @@ -118,8 +119,10 @@ jobs: - name: Install CUDA if: inputs.cuda run: | + # Make a separate temp dir so cuda doesn't run out of space + mkdir -p ~/cache/cudatemp # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA - sudo sh ~/cache/cuda.run --silent --toolkit + sudo sh ~/cache/cuda.run --silent --toolkit --tmpdir=~/cache/cudatemp echo "/usr/local/cuda/bin" >> $GITHUB_PATH - name: Print dependency information From c33ffcb28d09a244fc1d1e29beb5de55326cfede Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 13:41:43 -0700 Subject: [PATCH 2/8] try change tmpdir and cuda_home --- .github/workflows/build-and-test-callable.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index 2ea92792..bde3556f 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -65,7 +65,7 @@ jobs: env: cuda-toolkit-version: '12.4.1' - CUDA_HOME: '/usr/local/cuda-12.4' + CUDA_HOME: '/usr/local/cuda' cuda-driver-version: '550.54.15' # These are all passed to setup.py as one concatenated string build-flags: >- @@ -120,9 +120,9 @@ jobs: if: inputs.cuda run: | # Make a separate temp dir so cuda doesn't run out of space - mkdir -p ~/cache/cudatemp + mkdir -p ~/cudatemp # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA - sudo sh ~/cache/cuda.run --silent --toolkit --tmpdir=~/cache/cudatemp + sudo sh ~/cache/cuda.run --silent --toolkit --tmpdir=~/cudatemp echo "/usr/local/cuda/bin" >> $GITHUB_PATH - name: Print dependency information From e721fcd2ae81c63839ae0e1db0bff76c39e1fc62 Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 13:56:42 -0700 Subject: [PATCH 3/8] not sure... trying to change permissions with mkdir to see if it helps --- .github/workflows/build-and-test-callable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index bde3556f..6f395978 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -120,7 +120,7 @@ jobs: if: inputs.cuda run: | # Make a separate temp dir so cuda doesn't run out of space - mkdir -p ~/cudatemp + sudo mkdir -p ~/cudatemp # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA sudo sh ~/cache/cuda.run --silent --toolkit --tmpdir=~/cudatemp echo "/usr/local/cuda/bin" >> $GITHUB_PATH From 3f5bda563739133a7162ec0ba9207541ecb543b2 Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 13:59:34 -0700 Subject: [PATCH 4/8] add skip-ci --- .github/workflows/build-and-test-dispatch.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test-dispatch.yml b/.github/workflows/build-and-test-dispatch.yml index 57e88839..87b50b80 100644 --- a/.github/workflows/build-and-test-dispatch.yml +++ b/.github/workflows/build-and-test-dispatch.yml @@ -26,7 +26,7 @@ jobs: # Build and test whole matrix of options on linux # ------------------------------------------------------------------------------------------------- test-linux-serial: - if: ${{ github.event_name == 'pull_request' || inputs.test_options == 'all' }} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' }} strategy: fail-fast: false matrix: @@ -40,9 +40,9 @@ jobs: mfem-branch: ${{ matrix.mfem-branch }} python-version: ${{ matrix.python-version }} parallel: ${{ matrix.parallel }} - + test-linux-parallel: - if: ${{ github.event_name == 'pull_request' || inputs.test_options == 'all' }} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' }} strategy: fail-fast: false matrix: @@ -56,7 +56,7 @@ jobs: mfem-branch: ${{ matrix.mfem-branch }} python-version: ${{ matrix.python-version }} parallel: ${{ matrix.parallel }} - + # ------------------------------------------------------------------------------------------------- # Fast test # ------------------------------------------------------------------------------------------------- @@ -79,7 +79,7 @@ jobs: # Specific cases (we want these to use defaults, and not expand the dimensions of the matrix) # ------------------------------------------------------------------------------------------------- test-macos: - if: ${{ github.event_name == 'pull_request' || inputs.test_options == 'all' }} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' }} strategy: fail-fast: false matrix: @@ -91,21 +91,21 @@ jobs: mfem-branch: ${{ matrix.mfem-branch }} test-cuda: - if: ${{ github.event_name == 'pull_request' || inputs.test_options == 'all' || inputs.test_options == 'cuda'}} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' || inputs.test_options == 'cuda'}} uses: ./.github/workflows/build-and-test-callable.yml with: cuda: true name: test-cuda test-libceed: - if: ${{ github.event_name == 'pull_request' || inputs.test_options == 'all' || inputs.test_options == 'libceed'}} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' || inputs.test_options == 'libceed'}} uses: ./.github/workflows/build-and-test-callable.yml with: libceed: true name: test-libceed test-gslib: - if: ${{ github.event_name == 'pull_request' || inputs.test_options == 'all' || inputs.test_options == 'gslib'}} + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' || inputs.test_options == 'gslib'}} uses: ./.github/workflows/build-and-test-callable.yml with: gslib: true From 352eae5a0545d0a11de88f6f999a2dea8b726c34 Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 14:07:35 -0700 Subject: [PATCH 5/8] try remove tmpdir (only change left is setting env CUDA_HOME) --- .github/workflows/build-and-test-callable.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index 6f395978..1320be53 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -119,10 +119,8 @@ jobs: - name: Install CUDA if: inputs.cuda run: | - # Make a separate temp dir so cuda doesn't run out of space - sudo mkdir -p ~/cudatemp # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA - sudo sh ~/cache/cuda.run --silent --toolkit --tmpdir=~/cudatemp + sudo sh ~/cache/cuda.run --silent --toolkit echo "/usr/local/cuda/bin" >> $GITHUB_PATH - name: Print dependency information From 03480d634c584c67af4638907a13849becd07704 Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 14:44:18 -0700 Subject: [PATCH 6/8] try gh action --- .github/workflows/build-and-test-callable.yml | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index 1320be53..737a9bb6 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -102,26 +102,33 @@ jobs: - name: Purge PIP cache run: pip cache purge - - name: Cache CUDA - if: inputs.cuda - id: cache-cuda - uses: actions/cache@v4 - with: - path: ~/cache - key: cuda-installer-${{ env.cuda-toolkit-version }}-${{ env.cuda-driver-version }} - - - name: Download CUDA - if: inputs.cuda && steps.cache-cuda.outputs.cache-hit == false - run: | - CUDA_URL="https://developer.download.nvidia.com/compute/cuda/${{ env.cuda-toolkit-version }}/local_installers/cuda_${{ env.cuda-toolkit-version }}_${{ env.cuda-driver-version }}_linux.run" - curl -o ~/cache/cuda.run --create-dirs $CUDA_URL + # - name: Cache CUDA + # if: inputs.cuda + # id: cache-cuda + # uses: actions/cache@v4 + # with: + # path: ~/cache + # key: cuda-installer-${{ env.cuda-toolkit-version }}-${{ env.cuda-driver-version }} + + # - name: Download CUDA + # if: inputs.cuda && steps.cache-cuda.outputs.cache-hit == false + # run: | + # CUDA_URL="https://developer.download.nvidia.com/compute/cuda/${{ env.cuda-toolkit-version }}/local_installers/cuda_${{ env.cuda-toolkit-version }}_${{ env.cuda-driver-version }}_linux.run" + # curl -o ~/cache/cuda.run --create-dirs $CUDA_URL + + # - name: Install CUDA + # if: inputs.cuda + # run: | + # # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA + # sudo sh ~/cache/cuda.run --silent --toolkit + # echo "/usr/local/cuda/bin" >> $GITHUB_PATH - name: Install CUDA - if: inputs.cuda - run: | - # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA - sudo sh ~/cache/cuda.run --silent --toolkit - echo "/usr/local/cuda/bin" >> $GITHUB_PATH + uses: Jimver/cuda-toolkit@master + id: cuda-toolkit + with: + log-file-suffix: '${{ inputs.os }}.txt' + - name: Print dependency information run: | From c7955e44b75f2f2784abe7fcbf33cc823aa0fe67 Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 14:50:03 -0700 Subject: [PATCH 7/8] try updating cuda version, and remove unnecessary env vars --- .github/workflows/build-and-test-callable.yml | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index 737a9bb6..0a89e4b6 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -34,10 +34,10 @@ on: default: false cuda-toolkit-version: type: string - default: '12.4.1' + default: '12.6.0' cuda-driver-version: type: string - default: '550.54.15' + default: '560.28.03' libceed: description: 'Build with libCEED' type: boolean @@ -64,9 +64,7 @@ jobs: ${{ inputs.cuda && '| cuda' || '' }}${{ inputs.libceed && '| libceed' || '' }}${{ inputs.gslib && '| gslib' || '' }} env: - cuda-toolkit-version: '12.4.1' CUDA_HOME: '/usr/local/cuda' - cuda-driver-version: '550.54.15' # These are all passed to setup.py as one concatenated string build-flags: >- ${{ inputs.parallel && '--with-parallel' || '' }} @@ -102,32 +100,32 @@ jobs: - name: Purge PIP cache run: pip cache purge - # - name: Cache CUDA - # if: inputs.cuda - # id: cache-cuda - # uses: actions/cache@v4 - # with: - # path: ~/cache - # key: cuda-installer-${{ env.cuda-toolkit-version }}-${{ env.cuda-driver-version }} - - # - name: Download CUDA - # if: inputs.cuda && steps.cache-cuda.outputs.cache-hit == false - # run: | - # CUDA_URL="https://developer.download.nvidia.com/compute/cuda/${{ env.cuda-toolkit-version }}/local_installers/cuda_${{ env.cuda-toolkit-version }}_${{ env.cuda-driver-version }}_linux.run" - # curl -o ~/cache/cuda.run --create-dirs $CUDA_URL + - name: Cache CUDA + if: inputs.cuda + id: cache-cuda + uses: actions/cache@v4 + with: + path: ~/cache + key: cuda-installer-${{ inputs.cuda-toolkit-version }}-${{ inputs.cuda-driver-version }} - # - name: Install CUDA - # if: inputs.cuda - # run: | - # # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA - # sudo sh ~/cache/cuda.run --silent --toolkit - # echo "/usr/local/cuda/bin" >> $GITHUB_PATH + - name: Download CUDA + if: inputs.cuda && steps.cache-cuda.outputs.cache-hit == false + run: | + CUDA_URL="https://developer.download.nvidia.com/compute/cuda/${{ inputs.cuda-toolkit-version }}/local_installers/cuda_${{ inputs.cuda-toolkit-version }}_${{ inputs.cuda-driver-version }}_linux.run" + curl -o ~/cache/cuda.run --create-dirs $CUDA_URL - name: Install CUDA - uses: Jimver/cuda-toolkit@master - id: cuda-toolkit - with: - log-file-suffix: '${{ inputs.os }}.txt' + if: inputs.cuda + run: | + # The --silent flag is necessary to bypass user-input, e.g. accepting the EULA + sudo sh ~/cache/cuda.run --silent --toolkit + echo "/usr/local/cuda/bin" >> $GITHUB_PATH + + # - name: Install CUDA + # uses: Jimver/cuda-toolkit@master + # id: cuda-toolkit + # with: + # log-file-suffix: '${{ inputs.os }}.txt' - name: Print dependency information From 5921edef08b23654301e524e87191ff8d3107a56 Mon Sep 17 00:00:00 2001 From: Justin Laughlin Date: Tue, 6 Aug 2024 15:08:08 -0700 Subject: [PATCH 8/8] cleanup --- .github/workflows/build-and-test-callable.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build-and-test-callable.yml b/.github/workflows/build-and-test-callable.yml index 0a89e4b6..a0fbdf76 100644 --- a/.github/workflows/build-and-test-callable.yml +++ b/.github/workflows/build-and-test-callable.yml @@ -121,13 +121,6 @@ jobs: sudo sh ~/cache/cuda.run --silent --toolkit echo "/usr/local/cuda/bin" >> $GITHUB_PATH - # - name: Install CUDA - # uses: Jimver/cuda-toolkit@master - # id: cuda-toolkit - # with: - # log-file-suffix: '${{ inputs.os }}.txt' - - - name: Print dependency information run: | pip list