|
| 1 | +name: hdf5 dev parallel from source ctest script runs |
| 2 | + |
| 3 | +# Triggers the workflow on a call from another workflow |
| 4 | +on: |
| 5 | + workflow_call: |
| 6 | + inputs: |
| 7 | + snap_name: |
| 8 | + description: 'The name in the source tarballs' |
| 9 | + type: string |
| 10 | + required: false |
| 11 | + default: hdfsrc |
| 12 | + file_base: |
| 13 | + description: "The common base name of the source tarballs" |
| 14 | + required: true |
| 15 | + type: string |
| 16 | + use_environ: |
| 17 | + description: 'Environment to locate files' |
| 18 | + type: string |
| 19 | + required: true |
| 20 | + default: snapshots |
| 21 | + build_mode: |
| 22 | + description: "release vs. debug build" |
| 23 | + required: true |
| 24 | + type: string |
| 25 | + |
| 26 | +permissions: |
| 27 | + contents: read |
| 28 | + |
| 29 | +jobs: |
| 30 | + CMake_build_parallel_src_openmpi: |
| 31 | + name: "Parallel OpenMPI GCC-${{ inputs.build_mode }}" |
| 32 | + runs-on: ubuntu-latest |
| 33 | + steps: |
| 34 | + - name: Install CMake Dependencies (OpenMPI) |
| 35 | + run: | |
| 36 | + sudo apt-get update |
| 37 | + sudo apt-get install ninja-build graphviz curl |
| 38 | + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev |
| 39 | + sudo apt install gcc-12 g++-12 gfortran-12 |
| 40 | + sudo apt install libaec0 libaec-dev |
| 41 | + sudo apt-get install libopenmpi-dev |
| 42 | + echo "CC=mpicc" >> $GITHUB_ENV |
| 43 | + echo "FC=mpif90" >> $GITHUB_ENV |
| 44 | +
|
| 45 | + - name: Install Dependencies |
| 46 | + uses: ssciwr/doxygen-install@v1 |
| 47 | + with: |
| 48 | + version: "1.9.7" |
| 49 | + |
| 50 | + - name: Set file base name (OpenMPI) |
| 51 | + id: set-file-base |
| 52 | + run: | |
| 53 | + FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") |
| 54 | + echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT |
| 55 | + if [[ '${{ inputs.use_environ }}' == 'release' ]] |
| 56 | + then |
| 57 | + SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}") |
| 58 | + else |
| 59 | + SOURCE_NAME_BASE=$(echo "hdfsrc") |
| 60 | + fi |
| 61 | + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT |
| 62 | +
|
| 63 | + # Get files created by release script |
| 64 | + - name: Get tgz-tarball (OpenMPI) |
| 65 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 66 | + with: |
| 67 | + name: tgz-tarball |
| 68 | + path: ${{ github.workspace }} |
| 69 | + |
| 70 | + - name: List files for the space (OpenMPI) |
| 71 | + run: | |
| 72 | + ls -l ${{ github.workspace }} |
| 73 | + ls ${{ runner.workspace }} |
| 74 | +
|
| 75 | + - name: Uncompress source (OpenMPI) |
| 76 | + run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz |
| 77 | + |
| 78 | + - name: Copy script files for the space (OpenMPI) |
| 79 | + run: | |
| 80 | + cp ${{ github.workspace }}/${{ steps.set-file-base.outputs.SOURCE_BASE }}/config/cmake/scripts/CTestScript.cmake ${{ runner.workspace }}/hdf5 |
| 81 | + cp ${{ github.workspace }}/${{ steps.set-file-base.outputs.SOURCE_BASE }}/config/cmake/scripts/HDF5config.cmake ${{ runner.workspace }}/hdf5 |
| 82 | +
|
| 83 | + - name: List files for the hdf5 (OpenMPI) |
| 84 | + run: | |
| 85 | + ls ${{ runner.workspace }}/hdf5 |
| 86 | +
|
| 87 | + - name: Create options file (OpenMPI) |
| 88 | + uses: "DamianReeves/write-file-action@master" |
| 89 | + with: |
| 90 | + path: ${{ runner.workspace }}/hdf5/HDF5options.cmake |
| 91 | + write-mode: overwrite |
| 92 | + contents: | |
| 93 | + set (CTEST_DROP_SITE_INIT "my.cdash.org") |
| 94 | + # Change following line to submit to your CDash dashboard to a different CDash project |
| 95 | + #set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5") |
| 96 | + set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}") |
| 97 | + set (ctest_test_args INCLUDE MPI_TEST) |
| 98 | + set (MODEL "MPI") |
| 99 | + set (GROUP "MPI") |
| 100 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE") |
| 101 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n") |
| 102 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=2") |
| 103 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") |
| 104 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SUBFILING_VFD:BOOL=ON") |
| 105 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") |
| 106 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") |
| 107 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON") |
| 108 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON") |
| 109 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON") |
| 110 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=ON") |
| 111 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") |
| 112 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") |
| 113 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") |
| 114 | +
|
| 115 | + - name: Run ctest script (OpenMPI) |
| 116 | + run: | |
| 117 | + cd "${{ runner.workspace }}/hdf5" |
| 118 | + ctest -S HDF5config.cmake,CTEST_SITE_EXT=GH-${{ github.event.repository.full_name }}-OpenMPI-s,LOCAL_SUBMIT=ON,NINJA=TRUE,BUILD_GENERATOR=Unix,CTEST_SOURCE_NAME=${{ steps.set-file-base.outputs.SOURCE_BASE }} -C ${{ inputs.build_mode }} -VV -O hdf5.log |
| 119 | + shell: bash |
| 120 | + continue-on-error: true |
| 121 | + |
| 122 | + # Save log files created by ctest script |
| 123 | + - name: Save log (OpenMPI) |
| 124 | + uses: actions/upload-artifact@v4 |
| 125 | + with: |
| 126 | + name: openmpi-log |
| 127 | + path: ${{ runner.workspace }}/hdf5/hdf5.log |
| 128 | + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` |
| 129 | + |
| 130 | + CMake_build_parallel_src_mpich: |
| 131 | + name: "Parallel Mpich GCC-${{ inputs.build_mode }}" |
| 132 | + runs-on: ubuntu-latest |
| 133 | + steps: |
| 134 | + |
| 135 | + |
| 136 | + - name: Install Linux Dependencies (MPICH) |
| 137 | + run: | |
| 138 | + sudo apt-get update |
| 139 | + sudo apt-get install ninja-build doxygen graphviz |
| 140 | + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev |
| 141 | + sudo apt install gcc-12 g++-12 gfortran-12 |
| 142 | + sudo apt install libaec0 libaec-dev |
| 143 | + sudo apt-get install libmpich-dev |
| 144 | + echo "CC=mpicc" >> $GITHUB_ENV |
| 145 | + echo "FC=mpif90" >> $GITHUB_ENV |
| 146 | +
|
| 147 | + - name: Install Dependencies |
| 148 | + uses: ssciwr/doxygen-install@v1 |
| 149 | + with: |
| 150 | + version: "1.9.7" |
| 151 | + |
| 152 | + - name: Set file base name (MPICH) |
| 153 | + id: set-file-base |
| 154 | + run: | |
| 155 | + FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") |
| 156 | + echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT |
| 157 | + if [[ '${{ inputs.use_environ }}' == 'release' ]] |
| 158 | + then |
| 159 | + SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}") |
| 160 | + else |
| 161 | + SOURCE_NAME_BASE=$(echo "hdfsrc") |
| 162 | + fi |
| 163 | + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT |
| 164 | +
|
| 165 | + # Get files created by release script |
| 166 | + - name: Get tgz-tarball (MPICH) |
| 167 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 168 | + with: |
| 169 | + name: tgz-tarball |
| 170 | + path: ${{ github.workspace }} |
| 171 | + |
| 172 | + - name: List files for the space (MPICH) |
| 173 | + run: | |
| 174 | + ls -l ${{ github.workspace }} |
| 175 | + ls ${{ runner.workspace }} |
| 176 | +
|
| 177 | + - name: Uncompress source (MPICH) |
| 178 | + run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz |
| 179 | + |
| 180 | + - name: Copy script files for the space (MPICH) |
| 181 | + run: | |
| 182 | + cp ${{ github.workspace }}/${{ steps.set-file-base.outputs.SOURCE_BASE }}/config/cmake/scripts/CTestScript.cmake ${{ runner.workspace }}/hdf5 |
| 183 | + cp ${{ github.workspace }}/${{ steps.set-file-base.outputs.SOURCE_BASE }}/config/cmake/scripts/HDF5config.cmake ${{ runner.workspace }}/hdf5 |
| 184 | +
|
| 185 | + - name: List files for the hdf5 (MPICH) |
| 186 | + run: | |
| 187 | + ls ${{ runner.workspace }}/hdf5 |
| 188 | +
|
| 189 | + - name: Create options file (MPICH) |
| 190 | + uses: "DamianReeves/write-file-action@master" |
| 191 | + with: |
| 192 | + path: ${{ runner.workspace }}/hdf5/HDF5options.cmake |
| 193 | + write-mode: overwrite |
| 194 | + contents: | |
| 195 | + set (CTEST_DROP_SITE_INIT "my.cdash.org") |
| 196 | + # Change following line to submit to your CDash dashboard to a different CDash project |
| 197 | + #set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5") |
| 198 | + set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}") |
| 199 | + set (ctest_test_args INCLUDE MPI_TEST) |
| 200 | + set (MODEL "MPI") |
| 201 | + set (GROUP "MPI") |
| 202 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE") |
| 203 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n") |
| 204 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=2") |
| 205 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") |
| 206 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SUBFILING_VFD:BOOL=ON") |
| 207 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") |
| 208 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") |
| 209 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON") |
| 210 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON") |
| 211 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON") |
| 212 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=ON") |
| 213 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON") |
| 214 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF") |
| 215 | + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF") |
| 216 | +
|
| 217 | + - name: Run ctest script (MPICH) |
| 218 | + run: | |
| 219 | + cd "${{ runner.workspace }}/hdf5" |
| 220 | + ctest -S HDF5config.cmake,CTEST_SITE_EXT=GH-${{ github.event.repository.full_name }}-MPICH-s,LOCAL_SUBMIT=ON,NINJA=TRUE,BUILD_GENERATOR=Unix,CTEST_SOURCE_NAME=${{ steps.set-file-base.outputs.SOURCE_BASE }} -C ${{ inputs.build_mode }} -VV -O hdf5.log |
| 221 | + shell: bash |
| 222 | + continue-on-error: true |
| 223 | + |
| 224 | + # Save log files created by ctest script |
| 225 | + - name: Save log (MPICH) |
| 226 | + uses: actions/upload-artifact@v4 |
| 227 | + with: |
| 228 | + name: mpich-log |
| 229 | + path: ${{ runner.workspace }}/hdf5/hdf5.log |
| 230 | + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` |
0 commit comments