From e7441be8a87662d67165f98db74e7a0c4336bdb7 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Wed, 30 Oct 2024 16:58:40 -0500 Subject: [PATCH] Update for workflows --- .github/workflows/build_mpich_source.yml | 25 ++++++-- .github/workflows/build_openmpi_source.yml | 25 ++++++-- .github/workflows/cmake-par-source.yml | 68 +++++++++++++++++----- testpar/testpar.h | 2 +- 4 files changed, 92 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build_mpich_source.yml b/.github/workflows/build_mpich_source.yml index 25b715693fc..69acbd8f597 100644 --- a/.github/workflows/build_mpich_source.yml +++ b/.github/workflows/build_mpich_source.yml @@ -1,13 +1,16 @@ # Build MPICH from source using the latest commit on the -# 'main' branch and cache the results. The result is installed -# to (or restored to) '${{ runner.workspace }}/mpich'. +# 'main' branch and cache the results. The result is compressed +# into a 'mpich.tar' archive to preserve permissions and +# then is uploaded as the artifact 'mpich' which can later +# be downloaded with 'actions/download-artifact' and then +# uncompressed with 'tar xvf mpich.tar -C ' # Triggers the workflow on a call from another workflow on: workflow_call: inputs: build_mode: - description: "production vs. debug build" + description: "Release vs. Debug build" required: true type: string @@ -53,8 +56,8 @@ jobs: # Enable threads=multiple for testing with Subfiling and # VOL connectors that require MPI_THREAD_MULTIPLE - - name: Install MPICH (GCC) (Production) - if: ${{ steps.cache-mpich-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode != 'debug') }} + - name: Install MPICH (GCC) (Release) + if: ${{ steps.cache-mpich-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Release') }} run: | cd $GITHUB_WORKSPACE/mpich ./autogen.sh @@ -68,7 +71,7 @@ jobs: # Enable threads=multiple for testing with Subfiling and # VOL connectors that require MPI_THREAD_MULTIPLE - name: Install MPICH (GCC) (Debug) - if: ${{ steps.cache-mpich-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode == 'debug') }} + if: ${{ steps.cache-mpich-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Debug') }} run: | cd $GITHUB_WORKSPACE/mpich ./autogen.sh @@ -80,3 +83,13 @@ jobs: --enable-threads=multiple make -j2 make install + + - name: Tar MPICH installation to preserve permissions for artifact + run: tar -cvf mpich.tar ${{ runner.workspace }}/mpich + + - name: Save MPICH installation artifact + uses: actions/upload-artifact@v4 + with: + name: mpich + path: mpich.tar + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/build_openmpi_source.yml b/.github/workflows/build_openmpi_source.yml index a617153cc4f..94a2540dce8 100644 --- a/.github/workflows/build_openmpi_source.yml +++ b/.github/workflows/build_openmpi_source.yml @@ -1,13 +1,16 @@ # Build OpenMPI from source using the latest commit on the -# 'main' branch and cache the results. The result is installed -# to (or restored to) '${{ runner.workspace }}/openmpi'. +# 'main' branch and cache the results. The result is compressed +# into a 'openmpi.tar' archive to preserve permissions and +# then is uploaded as the artifact 'openmpi' which can later +# be downloaded with 'actions/download-artifact' and then +# uncompressed with 'tar xvf openmpi.tar -C ' # Triggers the workflow on a call from another workflow on: workflow_call: inputs: build_mode: - description: "production vs. debug build" + description: "Release vs. Debug build" required: true type: string @@ -51,8 +54,8 @@ jobs: path: ${{ runner.workspace }}/openmpi key: ${{ runner.os }}-${{ runner.arch }}-gcc-openmpi-${{ steps.get-sha.outputs.sha }}-${{ inputs.build_mode }} - - name: Install OpenMPI (GCC) (Production) - if: ${{ steps.cache-openmpi-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode != 'debug') }} + - name: Install OpenMPI (GCC) (Release) + if: ${{ steps.cache-openmpi-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Release') }} run: | cd $GITHUB_WORKSPACE/ompi ./autogen.pl @@ -63,7 +66,7 @@ jobs: make install - name: Install OpenMPI (GCC) (Debug) - if: ${{ steps.cache-openmpi-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode == 'debug') }} + if: ${{ steps.cache-openmpi-ubuntu-gcc.outputs.cache-hit != 'true' && (inputs.build_mode == 'Debug') }} run: | cd $GITHUB_WORKSPACE/ompi ./autogen.pl @@ -73,3 +76,13 @@ jobs: --enable-debug make -j2 make install + + - name: Tar OpenMPI installation to preserve permissions for artifact + run: tar -cvf openmpi.tar ${{ runner.workspace }}/openmpi + + - name: Save OpenMPI installation artifact + uses: actions/upload-artifact@v4 + with: + name: openmpi + path: openmpi.tar + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/.github/workflows/cmake-par-source.yml b/.github/workflows/cmake-par-source.yml index ed6e22c6d43..b9d3106677c 100644 --- a/.github/workflows/cmake-par-source.yml +++ b/.github/workflows/cmake-par-source.yml @@ -27,22 +27,47 @@ permissions: contents: read jobs: + Build_openmpi_source: + name: Build OpenMPI from source + uses: ./.github/workflows/build_openmpi_source.yml + with: + build_mode: ${{ inputs.build_mode }} + + Build_mpich_source: + name: Build MPICH from source + uses: ./.github/workflows/build_mpich_source.yml + with: + build_mode: ${{ inputs.build_mode }} + CMake_build_parallel_src_openmpi: + needs: Build_openmpi_source name: "Parallel OpenMPI GCC-${{ inputs.build_mode }}" runs-on: ubuntu-latest steps: - - name: Install CMake Dependencies (OpenMPI) + - name: Install Linux Dependencies (OpenMPI) run: | sudo apt-get update - sudo apt-get install ninja-build graphviz curl - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 + sudo apt-get install ninja-build sudo apt install libaec0 libaec-dev - sudo apt-get install libopenmpi-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - name: Install Dependencies + - name: Get MPI installation (OpenMPI) + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: openmpi + + - name: Untar MPI installation (OpenMPI) + run: | + tar xvf openmpi.tar -C ${{ runner.workspace }} + + - name: Set path (OpenMPI) + shell: bash + run: | + echo "${{ runner.workspace }}/openmpi/bin" >> $GITHUB_PATH + echo "LD_LIBRARY_PATH=${{ runner.workspace }}/openmpi/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "CC=${{ runner.workspace }}/openmpi/bin/mpicc" >> $GITHUB_ENV + echo "FC=${{ runner.workspace }}/openmpi/bin/mpif90" >> $GITHUB_ENV + + - name: Install Doxygen uses: ssciwr/doxygen-install@v1 with: version: "1.9.7" @@ -128,6 +153,7 @@ jobs: if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` CMake_build_parallel_src_mpich: + needs: Build_mpich_source name: "Parallel Mpich GCC-${{ inputs.build_mode }}" runs-on: ubuntu-latest steps: @@ -136,15 +162,27 @@ jobs: - name: Install Linux Dependencies (MPICH) run: | sudo apt-get update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 + sudo apt-get install ninja-build sudo apt install libaec0 libaec-dev - sudo apt-get install libmpich-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - name: Install Dependencies + - name: Get MPI installation (MPICH) + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: mpich + + - name: Untar MPI installation (MPICH) + run: | + tar xvf mpich.tar -C ${{ runner.workspace }} + + - name: Set path (MPICH) + shell: bash + run: | + echo "${{ runner.workspace }}/mpich/bin" >> $GITHUB_PATH + echo "LD_LIBRARY_PATH=${{ runner.workspace }}/mpich/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "CC=${{ runner.workspace }}/mpich/bin/mpicc" >> $GITHUB_ENV + echo "FC=${{ runner.workspace }}/mpich/bin/mpif90" >> $GITHUB_ENV + + - name: Install Doxygen uses: ssciwr/doxygen-install@v1 with: version: "1.9.7" diff --git a/testpar/testpar.h b/testpar/testpar.h index 30d11ec47e5..2641d1e56fd 100644 --- a/testpar/testpar.h +++ b/testpar/testpar.h @@ -158,7 +158,7 @@ extern "C" { H5TESTPAR_DLL hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type); H5TESTPAR_DLL void point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], - size_t num_points, hsize_t coords[], int order); + size_t num_points, hsize_t coords[], int order); #ifdef __cplusplus }