hdf5/.github/workflows/aocc-cmake.yml
Dana Robinson 6fbe13a66d
Add subfiling to CI more places where we test parallel (#4778)
* CMake: gcc,, AOCC
* Autotools: AOCC (gcc was added in a previous commit)

NVHPC generates a lot of tools errors for some reason
2024-08-27 18:53:10 -07:00

101 lines
3.8 KiB
YAML

name: hdf5 dev PAR CMake aocc ompi
# Triggers the workflow on a call from another workflow
on:
workflow_call:
inputs:
build_mode:
description: "release vs. debug build"
required: true
type: string
permissions:
contents: read
jobs:
aocc_build_and_test:
name: "aocc ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/checkout@v4.1.7
- name: Install Dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y libaec-dev ninja-build
sudo apt install -y doxygen libncurses-dev libquadmath0 libstdc++6 libxml2
sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2
sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential
- name: Install AOCC 4.2.0
shell: bash
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar
tar -xvf aocc-compiler-4.2.0.tar
cd aocc-compiler-4.2.0
bash install.sh
source /home/runner/work/hdf5/hdf5/setenv_AOCC.sh
which clang
which flang
clang -v
- name: Cache OpenMPI 4.1.6 installation
id: cache-openmpi-4_1_6
uses: actions/cache@v4
with:
path: /home/runner/work/hdf5/hdf5/openmpi-4.1.6-install
key: ${{ runner.os }}-${{ runner.arch }}-openmpi-4_1_6-cache
- name: Install OpenMPI 4.1.6
if: ${{ steps.cache-openmpi-4_1_6.outputs.cache-hit != 'true' }}
run: |
export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/usr/local/lib
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.gz
tar zxvf openmpi-4.1.6.tar.gz
cd openmpi-4.1.6
./configure CC=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/bin/clang FC=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/bin/flang --prefix=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install
make
make install
- name: CMake Configure
shell: bash
run: |
export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_SUBFILING_VFD:BOOL=ON \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_BUILD_FORTRAN:BOOL=OFF \
-DHDF5_BUILD_JAVA:BOOL=OFF \
-DMPIEXEC_MAX_NUMPROCS:STRING="2" \
$GITHUB_WORKSPACE
#cat src/libhdf5.settings
- name: CMake Build
shell: bash
run: |
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build
- name: CMake Run Tests
shell: bash
run: |
ctest . -E MPI_TEST --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
- name: CMake Run Parallel Tests
shell: bash
run: |
ctest . -R MPI_TEST -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build