Skip to content

Commit

Permalink
Update for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed Oct 31, 2024
1 parent 3d578ea commit e7441be
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 28 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/build_mpich_source.yml
Original file line number Diff line number Diff line change
@@ -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 <directory>'

# 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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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`
25 changes: 19 additions & 6 deletions .github/workflows/build_openmpi_source.yml
Original file line number Diff line number Diff line change
@@ -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 <directory>'

# 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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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`
68 changes: 53 additions & 15 deletions .github/workflows/cmake-par-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion testpar/testpar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e7441be

Please sign in to comment.