2024-03-12 18:39:45 +08:00
|
|
|
name: hdf5 dev PAR autotools aocc ompi
|
|
|
|
|
|
|
|
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:
|
2024-03-14 22:16:53 +08:00
|
|
|
- name: Get Sources
|
|
|
|
uses: actions/checkout@v4.1.1
|
2024-03-12 18:39:45 +08:00
|
|
|
|
2024-03-14 22:16:53 +08:00
|
|
|
- name: Install Dependencies
|
2024-03-12 18:39:45 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y autoconf automake libtool libtool-bin libaec-dev
|
|
|
|
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
|
|
|
|
|
2024-04-01 11:47:56 +08:00
|
|
|
- name: Install AOCC 4.2.0
|
2024-03-14 22:16:53 +08:00
|
|
|
shell: bash
|
2024-03-12 18:39:45 +08:00
|
|
|
run: |
|
2024-04-01 11:47:56 +08:00
|
|
|
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
|
2024-03-12 18:39:45 +08:00
|
|
|
bash install.sh
|
|
|
|
source /home/runner/work/hdf5/hdf5/setenv_AOCC.sh
|
|
|
|
which clang
|
|
|
|
which flang
|
|
|
|
clang -v
|
|
|
|
|
2024-04-01 11:47:56 +08:00
|
|
|
- name: Cache OpenMPI 4.1.6 installation
|
|
|
|
id: cache-openmpi-4_1_6
|
2024-03-12 18:39:45 +08:00
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
2024-04-01 11:47:56 +08:00
|
|
|
path: /home/runner/work/hdf5/hdf5/openmpi-4.1.6-install
|
|
|
|
key: ${{ runner.os }}-${{ runner.arch }}-openmpi-4_1_6-cache
|
2024-03-12 18:39:45 +08:00
|
|
|
|
2024-04-01 11:47:56 +08:00
|
|
|
- name: Install OpenMPI 4.1.6
|
|
|
|
if: ${{ steps.cache-openmpi-4_1_6.outputs.cache-hit != 'true' }}
|
2024-03-12 18:39:45 +08:00
|
|
|
run: |
|
2024-04-01 11:47:56 +08:00
|
|
|
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
|
2024-03-12 18:39:45 +08:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
- name: Autotools Configure
|
|
|
|
env:
|
|
|
|
NPROCS: 2
|
|
|
|
run: |
|
2024-04-01 11:47:56 +08:00
|
|
|
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
|
2024-03-12 18:39:45 +08:00
|
|
|
sh ./autogen.sh
|
|
|
|
mkdir "${{ runner.workspace }}/build"
|
|
|
|
cd "${{ runner.workspace }}/build"
|
|
|
|
CC=mpicc $GITHUB_WORKSPACE/configure \
|
|
|
|
--prefix=/tmp \
|
|
|
|
--enable-build-mode=${{ inputs.build_mode }} \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-parallel \
|
2024-04-01 11:47:56 +08:00
|
|
|
LDFLAGS="-L/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib \
|
|
|
|
-L/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib"
|
2024-03-12 18:39:45 +08:00
|
|
|
|
|
|
|
- name: Autotools Build
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
NPROCS: 2
|
|
|
|
run: |
|
2024-04-01 11:47:56 +08:00
|
|
|
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
|
2024-03-12 18:39:45 +08:00
|
|
|
make -j3
|
|
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
|
|
|
|
- name: Autotools Run Tests
|
|
|
|
env:
|
|
|
|
NPROCS: 2
|
|
|
|
run: |
|
2024-04-01 11:47:56 +08:00
|
|
|
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
|
2024-03-12 18:39:45 +08:00
|
|
|
make check -j
|
|
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
|
|
|
|
- name: Autotools Install
|
|
|
|
env:
|
|
|
|
NPROCS: 2
|
|
|
|
run: |
|
2024-04-01 11:47:56 +08:00
|
|
|
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
|
2024-03-12 18:39:45 +08:00
|
|
|
make install
|
|
|
|
working-directory: ${{ runner.workspace }}/build
|