From 619c3587ea073a8ab1e7284919c3dbb769e39bef Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Tue, 15 Oct 2024 16:04:09 -0500 Subject: [PATCH 01/47] disable iotest --- .github/workflows/ubuntu_mpich.yml | 2 +- .github/workflows/ubuntu_openmpi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index b9018b1a..b234f376 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -103,7 +103,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --enable-test-hdf5-iotest \ + --disable-test-hdf5-iotest \ --with-mpi=${GITHUB_WORKSPACE}/MPICH # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 7f7fea9a..2c9fd4d5 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -98,7 +98,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --enable-test-hdf5-iotest \ + --disable-test-hdf5-iotest \ TESTMPIRUN="mpiexec --oversubscribe -n NP" # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error From a3485d696c68f739d72f5ae0a906b0f54475b605 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:10:25 -0600 Subject: [PATCH 02/47] add codeql CI --- .github/codeql-config.yml | 17 +++ .github/workflows/codeql.yml | 246 +++++++++++++++++++++++++++++++++++ RELEASE_NOTE.md | 2 +- src/H5VL_log_filei.cpp | 2 +- 4 files changed, 265 insertions(+), 2 deletions(-) create mode 100644 .github/codeql-config.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml new file mode 100644 index 00000000..5936bd03 --- /dev/null +++ b/.github/codeql-config.yml @@ -0,0 +1,17 @@ +# Query filters to include or exclude specific queries +query-filters: + - exclude: + # See: https://codeql.github.com/codeql-query-help/cpp/cpp-short-global-name/ + id: cpp/short-global-name + - exclude: + # See: https://codeql.github.com/codeql-query-help/cpp/cpp-commented-out-code/ + id: cpp/commented-out-code + - exclude: + # See: https://codeql.github.com/codeql-query-help/cpp/cpp-poorly-documented-function/ + id: cpp/poorly-documented-function + - exclude: + # See: https://codeql.github.com/codeql-query-help/cpp/cpp-trivial-switch/ + id: cpp/trivial-switch + - exclude: + # See: https://codeql.github.com/codeql-query-help/cpp/cpp-irregular-enum-init/ + id: cpp/irregular-enum-init diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..8b15b9ed --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,246 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '43 6 * * 3' + +env: + MPICH_VERSION: 4.1.2 + ARGOBOTS_VERSION: 1.1 + ASYNC_VOL_VERSION: 1.8.1 + +jobs: + analyze: + name: Analyze c-cpp + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: manual + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.1 + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get -y install automake autoconf libtool libtool-bin m4 cmake + # The MPICH installed on github actions is too slow + # sudo apt-get install mpich + # mpicc -v + # zlib + sudo apt-get -y install zlib1g-dev + make -s -j 8 distclean >> qout 2>&1 + + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + # The MPICH installed on github actions is too slow + # sudo apt-get install mpich + # mpicc -v + # zlib + sudo apt-get install zlib1g-dev + + - name: Build MPICH + run: | + cd ${GITHUB_WORKSPACE} + rm -rf MPICH ; mkdir MPICH ; cd MPICH + wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz + gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf - + cd mpich-${MPICH_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ + --silent \ + --enable-romio \ + --with-file-system=ufs \ + --with-device=ch3:sock \ + --disable-fortran \ + CC=gcc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + + - name: Install HDF5 + run: | + cd ${GITHUB_WORKSPACE} + rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 + wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz + tar -zxf hdf5.tar.gz + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + --enable-shared --disable-static \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + + - name: Install NetCDF + run: | + cd ${GITHUB_WORKSPACE} + rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF + wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz + tar -zxf v${NETCDF_VERSION}.tar.gz + cd netcdf-c-${NETCDF_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ + --silent \ + --disable-dap \ + --disable-nczarr \ + --disable-nczarr-filters \ + --disable-filter-testing \ + --disable-byterange \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ + CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ + LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ + LIBS="-lhdf5" + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: c-cpp + build-mode: manual + config-file: ./.github/codeql-config.yml + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: + #https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + queries: +security-extended,security-and-quality + + - name: Configure Log VOL connector + run: | + cd ${GITHUB_WORKSPACE} + autoreconf -i + ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ + --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ + --disable-test-hdf5-iotest \ + --with-mpi=${GITHUB_WORKSPACE}/MPICH + # Do NOT test QMCPACK, as it requires FFTW which fails to build + + - name: Print config.log if error + if: ${{ failure() }} + run: | + cd ${GITHUB_WORKSPACE} + cat config.log + + - name: Build Log VOL connector + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j 4 + # Do NOT parallel build, cmake for external tests can fail + make tests + + - name: Serial-run test - make check + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make check + + - name: Print test log files + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + fname=`find tests utils examples -type f -name "*.log"` + for f in $fname ; do \ + bname=`basename $f` ; \ + if test "x$bname" != xconfig.log ; then \ + echo "-------- dump $f ----------------------------" ; \ + cat $f ; \ + fi ; \ + done + + - name: Parallel-run test - make ptest + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make ptest + + - name: Test distribution - make distcheck + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" + + - name: make distclean + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + make -s distclean + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:c-cpp" + output: sarif-results + upload: failure-only + + - name: filter-sarif + uses: advanced-security/filter-sarif@main + with: + patterns: | + -**/* + src/**/* + input: sarif-results/cpp.sarif + output: sarif-results/cpp.sarif + + - name: Upload SARIF + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: sarif-results/cpp.sarif + + - name: Upload loc as a Build Artifact + uses: actions/upload-artifact@v4 + with: + name: sarif-results + path: sarif-results + retention-days: 1 diff --git a/RELEASE_NOTE.md b/RELEASE_NOTE.md index 7ae05a81..269137f5 100644 --- a/RELEASE_NOTE.md +++ b/RELEASE_NOTE.md @@ -122,7 +122,7 @@ + testing the Log VOL connector as a Pass-through VOL. + tests/testcases, tests/basic, tests/dynamic, and tests/read_regular additionally tests using the Log VOL connector on top of the native VOL. Test programs - are re-used and no additional test programs are added. Unlike tests/passthru + are reused and no additional test programs are added. Unlike tests/passthru where we expect users to specify the underlying VOLs, all necessary environment variables are set in the wrap_runs.sh and parallel_run.sh scripts. Running "make check" or "make ptest" is enough perform the test. diff --git a/src/H5VL_log_filei.cpp b/src/H5VL_log_filei.cpp index 75ea6fd5..b90f5aba 100644 --- a/src/H5VL_log_filei.cpp +++ b/src/H5VL_log_filei.cpp @@ -120,7 +120,7 @@ void H5VL_log_filei_post_open (H5VL_log_file_t *fp) { H5VL_LOGI_PROFILING_TIMER_START; - // check for exisitence of __int_att; + // check for existence of __int_att; // if inexists, mark as regular file and return directly. exists = H5VL_logi_exists_att (fp, H5VL_LOG_FILEI_ATTR, fp->dxplid); CHECK_LOG_INTERNAL_EXIST (exists); From 1ff6d50c6f144f44c2d56d7088e0222a74e6f2a8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:23:04 -0600 Subject: [PATCH 03/47] removed codeql --- .github/workflows/codeql.yml | 246 ----------------------------------- 1 file changed, 246 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 8b15b9ed..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,246 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL Advanced" - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - schedule: - - cron: '43 6 * * 3' - -env: - MPICH_VERSION: 4.1.2 - ARGOBOTS_VERSION: 1.1 - ASYNC_VOL_VERSION: 1.8.1 - -jobs: - analyze: - name: Analyze c-cpp - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners (GitHub.com only) - # Consider using larger runners or machines with greater resources for possible analysis time improvements. - runs-on: ubuntu-latest - timeout-minutes: 20 - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - - strategy: - fail-fast: false - matrix: - include: - - language: c-cpp - build-mode: manual - # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' - # Use `c-cpp` to analyze code written in C, C++ or both - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how - # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.1 - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get -y install automake autoconf libtool libtool-bin m4 cmake - # The MPICH installed on github actions is too slow - # sudo apt-get install mpich - # mpicc -v - # zlib - sudo apt-get -y install zlib1g-dev - make -s -j 8 distclean >> qout 2>&1 - - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev - # The MPICH installed on github actions is too slow - # sudo apt-get install mpich - # mpicc -v - # zlib - sudo apt-get install zlib1g-dev - - - name: Build MPICH - run: | - cd ${GITHUB_WORKSPACE} - rm -rf MPICH ; mkdir MPICH ; cd MPICH - wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz - gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf - - cd mpich-${MPICH_VERSION} - ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ - --silent \ - --enable-romio \ - --with-file-system=ufs \ - --with-device=ch3:sock \ - --disable-fortran \ - CC=gcc - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 - - - name: Install HDF5 - run: | - cd ${GITHUB_WORKSPACE} - rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 - wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz - tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 - - - name: Install NetCDF - run: | - cd ${GITHUB_WORKSPACE} - rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF - wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz - tar -zxf v${NETCDF_VERSION}.tar.gz - cd netcdf-c-${NETCDF_VERSION} - ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ - --silent \ - --disable-dap \ - --disable-nczarr \ - --disable-nczarr-filters \ - --disable-filter-testing \ - --disable-byterange \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ - CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ - LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ - LIBS="-lhdf5" - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: c-cpp - build-mode: manual - config-file: ./.github/codeql-config.yml - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: - #https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - queries: +security-extended,security-and-quality - - - name: Configure Log VOL connector - run: | - cd ${GITHUB_WORKSPACE} - autoreconf -i - ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ - --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --disable-test-hdf5-iotest \ - --with-mpi=${GITHUB_WORKSPACE}/MPICH - # Do NOT test QMCPACK, as it requires FFTW which fails to build - - - name: Print config.log if error - if: ${{ failure() }} - run: | - cd ${GITHUB_WORKSPACE} - cat config.log - - - name: Build Log VOL connector - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make -j 4 - # Do NOT parallel build, cmake for external tests can fail - make tests - - - name: Serial-run test - make check - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make check - - - name: Print test log files - if: ${{ always() }} - run: | - cd ${GITHUB_WORKSPACE} - fname=`find tests utils examples -type f -name "*.log"` - for f in $fname ; do \ - bname=`basename $f` ; \ - if test "x$bname" != xconfig.log ; then \ - echo "-------- dump $f ----------------------------" ; \ - cat $f ; \ - fi ; \ - done - - - name: Parallel-run test - make ptest - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make ptest - - - name: Test distribution - make distcheck - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" - - - name: make distclean - if: ${{ always() }} - run: | - cd ${GITHUB_WORKSPACE} - make -s distclean - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:c-cpp" - output: sarif-results - upload: failure-only - - - name: filter-sarif - uses: advanced-security/filter-sarif@main - with: - patterns: | - -**/* - src/**/* - input: sarif-results/cpp.sarif - output: sarif-results/cpp.sarif - - - name: Upload SARIF - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: sarif-results/cpp.sarif - - - name: Upload loc as a Build Artifact - uses: actions/upload-artifact@v4 - with: - name: sarif-results - path: sarif-results - retention-days: 1 From f483823fc78196a5e89036a751d1fde370bd4a66 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:24:31 -0600 Subject: [PATCH 04/47] Create codeql.yml --- .github/workflows/codeql.yml | 246 +++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..8b15b9ed --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,246 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '43 6 * * 3' + +env: + MPICH_VERSION: 4.1.2 + ARGOBOTS_VERSION: 1.1 + ASYNC_VOL_VERSION: 1.8.1 + +jobs: + analyze: + name: Analyze c-cpp + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: manual + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.1 + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get -y install automake autoconf libtool libtool-bin m4 cmake + # The MPICH installed on github actions is too slow + # sudo apt-get install mpich + # mpicc -v + # zlib + sudo apt-get -y install zlib1g-dev + make -s -j 8 distclean >> qout 2>&1 + + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + # The MPICH installed on github actions is too slow + # sudo apt-get install mpich + # mpicc -v + # zlib + sudo apt-get install zlib1g-dev + + - name: Build MPICH + run: | + cd ${GITHUB_WORKSPACE} + rm -rf MPICH ; mkdir MPICH ; cd MPICH + wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz + gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf - + cd mpich-${MPICH_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ + --silent \ + --enable-romio \ + --with-file-system=ufs \ + --with-device=ch3:sock \ + --disable-fortran \ + CC=gcc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + + - name: Install HDF5 + run: | + cd ${GITHUB_WORKSPACE} + rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 + wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz + tar -zxf hdf5.tar.gz + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + --enable-shared --disable-static \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + + - name: Install NetCDF + run: | + cd ${GITHUB_WORKSPACE} + rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF + wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz + tar -zxf v${NETCDF_VERSION}.tar.gz + cd netcdf-c-${NETCDF_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ + --silent \ + --disable-dap \ + --disable-nczarr \ + --disable-nczarr-filters \ + --disable-filter-testing \ + --disable-byterange \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ + CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ + LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ + LIBS="-lhdf5" + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: c-cpp + build-mode: manual + config-file: ./.github/codeql-config.yml + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: + #https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + queries: +security-extended,security-and-quality + + - name: Configure Log VOL connector + run: | + cd ${GITHUB_WORKSPACE} + autoreconf -i + ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ + --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ + --disable-test-hdf5-iotest \ + --with-mpi=${GITHUB_WORKSPACE}/MPICH + # Do NOT test QMCPACK, as it requires FFTW which fails to build + + - name: Print config.log if error + if: ${{ failure() }} + run: | + cd ${GITHUB_WORKSPACE} + cat config.log + + - name: Build Log VOL connector + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j 4 + # Do NOT parallel build, cmake for external tests can fail + make tests + + - name: Serial-run test - make check + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make check + + - name: Print test log files + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + fname=`find tests utils examples -type f -name "*.log"` + for f in $fname ; do \ + bname=`basename $f` ; \ + if test "x$bname" != xconfig.log ; then \ + echo "-------- dump $f ----------------------------" ; \ + cat $f ; \ + fi ; \ + done + + - name: Parallel-run test - make ptest + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make ptest + + - name: Test distribution - make distcheck + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" + + - name: make distclean + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + make -s distclean + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:c-cpp" + output: sarif-results + upload: failure-only + + - name: filter-sarif + uses: advanced-security/filter-sarif@main + with: + patterns: | + -**/* + src/**/* + input: sarif-results/cpp.sarif + output: sarif-results/cpp.sarif + + - name: Upload SARIF + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: sarif-results/cpp.sarif + + - name: Upload loc as a Build Artifact + uses: actions/upload-artifact@v4 + with: + name: sarif-results + path: sarif-results + retention-days: 1 From 0ac41cdf014202d62e73f95e2195e44ad54b5676 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:32:52 -0600 Subject: [PATCH 05/47] typo --- .github/workflows/codeql.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8b15b9ed..b860bb3c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -56,8 +56,9 @@ jobs: # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - - name: Checkout repository - uses: actions/checkout@v4.1.1 + - name: Checkout repository + uses: actions/checkout@v4.1.1 + - name: Set up dependencies run: | sudo apt-get update From be217b4e6c95a0b73c153916f37d686f036ebeae Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:35:32 -0600 Subject: [PATCH 06/47] typo2 --- .github/workflows/codeql.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b860bb3c..f092bd74 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,22 +25,22 @@ env: ASYNC_VOL_VERSION: 1.8.1 jobs: - analyze: - name: Analyze c-cpp - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners (GitHub.com only) - # Consider using larger runners or machines with greater resources for possible analysis time improvements. - runs-on: ubuntu-latest - timeout-minutes: 20 - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - + analyze: + name: Analyze c-cpp + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + strategy: fail-fast: false matrix: From 9832457dafc25026ffc19affd61528940655408b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:39:39 -0600 Subject: [PATCH 07/47] typo3 --- .github/workflows/codeql.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f092bd74..50110a91 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,7 +25,7 @@ env: ASYNC_VOL_VERSION: 1.8.1 jobs: - analyze: + analyze: name: Analyze c-cpp # Runner size impacts CodeQL analysis time. To learn more, please see: # - https://gh.io/recommended-hardware-resources-for-running-codeql @@ -41,21 +41,21 @@ jobs: # required to fetch internal or private CodeQL packs packages: read - strategy: - fail-fast: false - matrix: - include: - - language: c-cpp - build-mode: manual - # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' - # Use `c-cpp` to analyze code written in C, C++ or both - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how - # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages - steps: + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: manual + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: - name: Checkout repository uses: actions/checkout@v4.1.1 @@ -173,7 +173,7 @@ jobs: cd ${GITHUB_WORKSPACE} cat config.log - - name: Build Log VOL connector + - name: Build Log VOL connector if: ${{ success() }} run: | cd ${GITHUB_WORKSPACE} From 684b030b933e06e21f3ed1763e2643543c874cfa Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:44:09 -0600 Subject: [PATCH 08/47] typo4 --- .github/workflows/codeql.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 50110a91..a5e481c7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,7 +67,7 @@ jobs: # sudo apt-get install mpich # mpicc -v # zlib - sudo apt-get -y install zlib1g-dev + ## sudo apt-get -y install zlib1g-dev make -s -j 8 distclean >> qout 2>&1 - name: Set up dependencies @@ -167,11 +167,11 @@ jobs: --with-mpi=${GITHUB_WORKSPACE}/MPICH # Do NOT test QMCPACK, as it requires FFTW which fails to build - - name: Print config.log if error - if: ${{ failure() }} - run: | - cd ${GITHUB_WORKSPACE} - cat config.log +# - name: Print config.log if error +# if: ${{ failure() }} +# run: | +# cd ${GITHUB_WORKSPACE} +# cat config.log - name: Build Log VOL connector if: ${{ success() }} @@ -212,11 +212,11 @@ jobs: cd ${GITHUB_WORKSPACE} make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" - - name: make distclean - if: ${{ always() }} - run: | - cd ${GITHUB_WORKSPACE} - make -s distclean +# - name: make distclean +# if: ${{ always() }} +# run: | +# cd ${GITHUB_WORKSPACE} +# make -s distclean - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From 0cfd08fdb8af316b5200eb69ac70a11a78469300 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 15:48:34 -0600 Subject: [PATCH 09/47] typo5 --- .github/workflows/codeql.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a5e481c7..57b30c5f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -59,17 +59,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4.1.1 - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get -y install automake autoconf libtool libtool-bin m4 cmake - # The MPICH installed on github actions is too slow - # sudo apt-get install mpich - # mpicc -v - # zlib - ## sudo apt-get -y install zlib1g-dev - make -s -j 8 distclean >> qout 2>&1 - - name: Set up dependencies run: | sudo apt-get update From 567113a18b63007e42231dedd388c759e9c50767 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 14 Feb 2025 16:39:34 -0600 Subject: [PATCH 10/47] typo6 --- .github/workflows/codeql.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 57b30c5f..ea167fbc 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,15 +14,33 @@ name: "CodeQL Advanced" on: push: branches: [ "master" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + - '**/*.jpg' + - '**/*.png' + - 'docs/*' + - 'case_studies/*' pull_request: branches: [ "master" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + - '**/*.jpg' + - '**/*.png' + - 'docs/*' + - 'case_studies/*' + schedule: - cron: '43 6 * * 3' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: MPICH_VERSION: 4.1.2 - ARGOBOTS_VERSION: 1.1 - ASYNC_VOL_VERSION: 1.8.1 + NETCDF_VERSION: 4.9.2 jobs: analyze: From 438b5863e9b6017761b8ea06bc2db235ae875153 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sun, 16 Feb 2025 22:09:55 -0600 Subject: [PATCH 11/47] fixed high-level codeql issues --- src/H5VL_log_dataset.cpp | 49 +++++++++++++++++++++++++++++++--------- src/H5VL_log_filei.cpp | 2 +- src/H5VL_log_info.cpp | 4 +++- src/H5VL_log_wrap.cpp | 12 +++++++--- src/H5VL_logi_nb.cpp | 2 +- 5 files changed, 52 insertions(+), 17 deletions(-) diff --git a/src/H5VL_log_dataset.cpp b/src/H5VL_log_dataset.cpp index 6347df95..3570db1d 100644 --- a/src/H5VL_log_dataset.cpp +++ b/src/H5VL_log_dataset.cpp @@ -65,7 +65,7 @@ void *H5VL_log_dataset_create (void *obj, int i; H5VL_log_obj_t *op = (H5VL_log_obj_t *)obj; H5VL_log_dset_t *dp = NULL; - H5VL_log_dset_info_t *dip = NULL; // Dataset info + H5VL_log_dset_info_t *dip = nullptr; // Dataset info // H5VL_link_create_args_t args; // H5VL_loc_params_t loc; hid_t zero_space = -1; @@ -130,8 +130,14 @@ void *H5VL_log_dataset_create (void *obj, H5Sclose (zero_space); // Construct new dataset info - dip = new H5VL_log_dset_info_t (); - CHECK_PTR (dip) + try { + dip = new H5VL_log_dset_info_t (); + CHECK_PTR (dip) + } + catch (const std::bad_alloc&) { + err = -1; + ERR_OUT ("Memory allocation failed") + } dip->dtype = H5Tcopy (type_id); CHECK_ID (dip->dtype) @@ -288,7 +294,7 @@ static herr_t H5VL_log_dataset_read_elements (void *dset, H5VL_log_dset_t *dp = (H5VL_log_dset_t *)dset; H5VL_log_dset_info_t *dip = NULL; // Dataset info hid_t dsid = H5I_INVALID_HID; // Dataset space id - H5VL_log_selections *dsel = NULL; // Selection blocks + H5VL_log_selections *dsel = nullptr; // Selection blocks try { if (!dp->fp->is_log_based_file) { @@ -303,7 +309,16 @@ static herr_t H5VL_log_dataset_read_elements (void *dset, } else { dsid = file_space_id; } - dsel = new H5VL_log_selections (dsid); + + try { + dsel = new H5VL_log_selections (dsid); + CHECK_PTR (dsel) + } + catch (const std::bad_alloc&) { + err = -1; + ERR_OUT ("Memory allocation failed") + } + H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOGI_GET_DATASPACE_SELECTION); // H5S_All means using file space @@ -607,19 +622,31 @@ herr_t H5VL_log_dataset_optional (void *obj, if (args->op_type == H5Dwrite_n_op_val) { H5VL_LOGI_PROFILING_TIMER_START; - dsel = new H5VL_log_selections (dip->ndim, dip->dims, varnarg->n, varnarg->starts, - varnarg->counts); + try { + dsel = new H5VL_log_selections (dip->ndim, dip->dims, varnarg->n, varnarg->starts, + varnarg->counts); + CHECK_PTR (dsel) + } + catch (const std::bad_alloc&) { + err = -1; + ERR_OUT ("Memory allocation failed") + } H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOGI_GET_DATASPACE_SELECTION); - CHECK_PTR (dsel) H5VL_log_dataseti_write (dp, varnarg->mem_type_id, H5S_BLOCK, dsel, dxpl_id, varnarg->buf, req); } else if (args->op_type == H5Dread_n_op_val) { H5VL_LOGI_PROFILING_TIMER_START; - dsel = new H5VL_log_selections (dip->ndim, dip->dims, varnarg->n, varnarg->starts, - varnarg->counts); + try { + dsel = new H5VL_log_selections (dip->ndim, dip->dims, varnarg->n, varnarg->starts, + varnarg->counts); + CHECK_PTR (dsel) + } + catch (const std::bad_alloc&) { + err = -1; + ERR_OUT ("Memory allocation failed") + } H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOGI_GET_DATASPACE_SELECTION); - CHECK_PTR (dsel) H5VL_log_dataseti_read (dp, varnarg->mem_type_id, H5S_BLOCK, dsel, dxpl_id, varnarg->buf, req); diff --git a/src/H5VL_log_filei.cpp b/src/H5VL_log_filei.cpp index b90f5aba..08db85b4 100644 --- a/src/H5VL_log_filei.cpp +++ b/src/H5VL_log_filei.cpp @@ -899,7 +899,7 @@ void H5VL_log_filei_create_subfile (H5VL_log_file_t *fp, attbuf[0] = fp->ndset; attbuf[1] = fp->nldset; attbuf[2] = fp->nmdset; - attbuf[3] = fp->config & !(H5VL_FILEI_CONFIG_SUBFILING); // No subfiling flag in a subfile + attbuf[3] = fp->config & ~(H5VL_FILEI_CONFIG_SUBFILING); // No subfiling flag in a subfile attbuf[4] = fp->ngroup; H5VL_logi_add_att (fp->sfp, fp->uvlid, H5I_FILE, H5VL_LOG_FILEI_ATTR, H5T_STD_I32LE, H5T_NATIVE_INT32, H5VL_LOG_FILEI_NATTR, attbuf, dxpl_id, NULL); diff --git a/src/H5VL_log_info.cpp b/src/H5VL_log_info.cpp index 398649ce..484d0287 100644 --- a/src/H5VL_log_info.cpp +++ b/src/H5VL_log_info.cpp @@ -184,7 +184,9 @@ herr_t H5VL_log_str_to_info (const char *str, void **_info) { #endif /* Retrieve the underlying VOL connector value and info */ - sscanf (str, "under_vol=%u;", &under_vol_value); + if(sscanf (str, "under_vol=%u;", &under_vol_value) != 1) { + return -1; // Failed to parse the input string + }; uvlid = H5VLregister_connector_by_value ((H5VL_class_value_t)under_vol_value, H5P_VOL_INITIALIZE_DEFAULT); under_vol_info_start = strchr (str, '{'); diff --git a/src/H5VL_log_wrap.cpp b/src/H5VL_log_wrap.cpp index 19457091..a01b290b 100644 --- a/src/H5VL_log_wrap.cpp +++ b/src/H5VL_log_wrap.cpp @@ -63,7 +63,7 @@ err_out:; herr_t H5VL_log_get_wrap_ctx (const void *obj, void **wrap_ctx) { herr_t err = 0; H5VL_log_obj_t *op = (H5VL_log_obj_t *)obj; - H5VL_log_wrap_ctx_t *ctx; + H5VL_log_wrap_ctx_t *ctx = nullptr; try { #ifdef LOGVOL_DEBUG @@ -73,8 +73,14 @@ herr_t H5VL_log_get_wrap_ctx (const void *obj, void **wrap_ctx) { #endif /* Allocate new VOL object wrapping context for the pass through connector */ - ctx = new H5VL_log_wrap_ctx_t (); - CHECK_PTR (ctx) + try { + ctx = new H5VL_log_wrap_ctx_t (); + CHECK_PTR (ctx) + } + catch (const std::bad_alloc&) { + err = -1; + } + CHECK_ERR /* Increment reference count on underlying VOL ID, and copy the VOL info */ ctx->uvlid = op->uvlid; diff --git a/src/H5VL_logi_nb.cpp b/src/H5VL_logi_nb.cpp index d83d919e..5fef3998 100644 --- a/src/H5VL_logi_nb.cpp +++ b/src/H5VL_logi_nb.cpp @@ -33,7 +33,7 @@ H5VL_log_wreq_t::H5VL_log_wreq_t () {} H5VL_log_wreq_t::H5VL_log_wreq_t (const H5VL_log_wreq_t &rhs) { meta_buf = (char *)malloc (rhs.hdr->meta_size); - if (!meta_buf) throw "OOM"; + if (!meta_buf) throw std::bad_alloc(); hdr = (H5VL_logi_meta_hdr *)meta_buf; sel_buf = meta_buf + (rhs.sel_buf - rhs.meta_buf); memcpy (meta_buf, rhs.meta_buf, rhs.hdr->meta_size); From e8ea00f07549310e369b3b0c966f5678adbaf1b9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sun, 16 Feb 2025 22:12:04 -0600 Subject: [PATCH 12/47] fixed high-level codeql issues --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8b15b9ed..5f7f9c4c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -56,8 +56,8 @@ jobs: # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - - name: Checkout repository - uses: actions/checkout@v4.1.1 + - name: Checkout repository + uses: actions/checkout@v4.1.1 - name: Set up dependencies run: | sudo apt-get update From 2dd8a7ecf72bfc68309c8cbd2f7aeffe3a8347b9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sun, 16 Feb 2025 22:14:28 -0600 Subject: [PATCH 13/47] codeql yml update --- .github/workflows/codeql.yml | 114 +++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 53 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5f7f9c4c..ea167fbc 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,60 +14,68 @@ name: "CodeQL Advanced" on: push: branches: [ "master" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + - '**/*.jpg' + - '**/*.png' + - 'docs/*' + - 'case_studies/*' pull_request: branches: [ "master" ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + - '**/*.jpg' + - '**/*.png' + - 'docs/*' + - 'case_studies/*' + schedule: - cron: '43 6 * * 3' +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: MPICH_VERSION: 4.1.2 - ARGOBOTS_VERSION: 1.1 - ASYNC_VOL_VERSION: 1.8.1 + NETCDF_VERSION: 4.9.2 jobs: analyze: - name: Analyze c-cpp - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners (GitHub.com only) - # Consider using larger runners or machines with greater resources for possible analysis time improvements. - runs-on: ubuntu-latest - timeout-minutes: 20 - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - - strategy: - fail-fast: false - matrix: - include: - - language: c-cpp - build-mode: manual - # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' - # Use `c-cpp` to analyze code written in C, C++ or both - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how - # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages - steps: + name: Analyze c-cpp + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: manual + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: - name: Checkout repository uses: actions/checkout@v4.1.1 - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get -y install automake autoconf libtool libtool-bin m4 cmake - # The MPICH installed on github actions is too slow - # sudo apt-get install mpich - # mpicc -v - # zlib - sudo apt-get -y install zlib1g-dev - make -s -j 8 distclean >> qout 2>&1 - name: Set up dependencies run: | @@ -166,13 +174,13 @@ jobs: --with-mpi=${GITHUB_WORKSPACE}/MPICH # Do NOT test QMCPACK, as it requires FFTW which fails to build - - name: Print config.log if error - if: ${{ failure() }} - run: | - cd ${GITHUB_WORKSPACE} - cat config.log +# - name: Print config.log if error +# if: ${{ failure() }} +# run: | +# cd ${GITHUB_WORKSPACE} +# cat config.log - - name: Build Log VOL connector + - name: Build Log VOL connector if: ${{ success() }} run: | cd ${GITHUB_WORKSPACE} @@ -211,11 +219,11 @@ jobs: cd ${GITHUB_WORKSPACE} make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" - - name: make distclean - if: ${{ always() }} - run: | - cd ${GITHUB_WORKSPACE} - make -s distclean +# - name: make distclean +# if: ${{ always() }} +# run: | +# cd ${GITHUB_WORKSPACE} +# make -s distclean - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From ec67e86621a08aa5fc45ab9d728f12bea01de41f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sun, 16 Feb 2025 22:47:45 -0600 Subject: [PATCH 14/47] fixed codeql warning --- src/H5VL_logi_nb.cpp | 12 ++++++++++++ src/H5VL_logi_nb.hpp | 1 + 2 files changed, 13 insertions(+) diff --git a/src/H5VL_logi_nb.cpp b/src/H5VL_logi_nb.cpp index 5fef3998..bae1077e 100644 --- a/src/H5VL_logi_nb.cpp +++ b/src/H5VL_logi_nb.cpp @@ -38,6 +38,18 @@ H5VL_log_wreq_t::H5VL_log_wreq_t (const H5VL_log_wreq_t &rhs) { sel_buf = meta_buf + (rhs.sel_buf - rhs.meta_buf); memcpy (meta_buf, rhs.meta_buf, rhs.hdr->meta_size); } +H5VL_log_wreq_t& H5VL_log_wreq_t::operator=(const H5VL_log_wreq_t &rhs) { + if (this != &rhs) { + free(meta_buf); + meta_buf = (char *)malloc(rhs.hdr->meta_size); + if (!meta_buf) throw std::bad_alloc(); + hdr = (H5VL_logi_meta_hdr *)meta_buf; + sel_buf = meta_buf + (rhs.sel_buf - rhs.meta_buf); + memcpy(meta_buf, rhs.meta_buf, rhs.hdr->meta_size); + } + return *this; +} + H5VL_log_wreq_t::H5VL_log_wreq_t (void *dset, H5VL_log_selections *sels) { H5VL_log_dset_t *dp = (H5VL_log_dset_t *)dset; diff --git a/src/H5VL_logi_nb.hpp b/src/H5VL_logi_nb.hpp index 8670f678..c0060c1d 100644 --- a/src/H5VL_logi_nb.hpp +++ b/src/H5VL_logi_nb.hpp @@ -55,6 +55,7 @@ class H5VL_log_wreq_t { H5VL_log_wreq_t (); H5VL_log_wreq_t (const H5VL_log_wreq_t &obj); + H5VL_log_wreq_t& operator=(const H5VL_log_wreq_t &obj); H5VL_log_wreq_t (void *dp, H5VL_log_selections *sels); ~H5VL_log_wreq_t (); }; From 3e8b8b57f6420c8af4ae28e55697575f7701ad40 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Sun, 16 Feb 2025 23:20:38 -0600 Subject: [PATCH 15/47] address codeql issues --- .github/codeql-config.yml | 3 +++ src/H5VL_log_dataset.cpp | 5 ----- src/H5VL_log_filei_meta.cpp | 6 +++--- src/H5VL_log_reqi.hpp | 5 +++++ src/H5VL_log_wrap.cpp | 1 - src/H5VL_logi_filter_deflate.hpp | 5 +++++ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index 5936bd03..4dbee215 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -15,3 +15,6 @@ query-filters: - exclude: # See: https://codeql.github.com/codeql-query-help/cpp/cpp-irregular-enum-init/ id: cpp/irregular-enum-init + - exclude: + # See: https://codeql.github.com/codeql-query-help/cpp/cpp-long-switch/ + id: cpp/long-switch diff --git a/src/H5VL_log_dataset.cpp b/src/H5VL_log_dataset.cpp index 3570db1d..b07154b2 100644 --- a/src/H5VL_log_dataset.cpp +++ b/src/H5VL_log_dataset.cpp @@ -132,7 +132,6 @@ void *H5VL_log_dataset_create (void *obj, // Construct new dataset info try { dip = new H5VL_log_dset_info_t (); - CHECK_PTR (dip) } catch (const std::bad_alloc&) { err = -1; @@ -312,7 +311,6 @@ static herr_t H5VL_log_dataset_read_elements (void *dset, try { dsel = new H5VL_log_selections (dsid); - CHECK_PTR (dsel) } catch (const std::bad_alloc&) { err = -1; @@ -363,7 +361,6 @@ static herr_t H5VL_log_dataset_write_elements (void *dset, } dsel = new H5VL_log_selections (dsid); H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOGI_GET_DATASPACE_SELECTION); - CHECK_PTR (dsel) // H5S_All means using file space if (mem_space_id == H5S_ALL) mem_space_id = dsid; @@ -625,7 +622,6 @@ herr_t H5VL_log_dataset_optional (void *obj, try { dsel = new H5VL_log_selections (dip->ndim, dip->dims, varnarg->n, varnarg->starts, varnarg->counts); - CHECK_PTR (dsel) } catch (const std::bad_alloc&) { err = -1; @@ -640,7 +636,6 @@ herr_t H5VL_log_dataset_optional (void *obj, try { dsel = new H5VL_log_selections (dip->ndim, dip->dims, varnarg->n, varnarg->starts, varnarg->counts); - CHECK_PTR (dsel) } catch (const std::bad_alloc&) { err = -1; diff --git a/src/H5VL_log_filei_meta.cpp b/src/H5VL_log_filei_meta.cpp index ea5b12aa..0a852f14 100644 --- a/src/H5VL_log_filei_meta.cpp +++ b/src/H5VL_log_filei_meta.cpp @@ -259,9 +259,9 @@ void H5VL_log_filei_metaflush (H5VL_log_file_t *fp) { // mem space char *mbuff = (char *)malloc (mdsize); - for (int i = 0, mstart = 0; i < nentry; i++) { - memcpy (mbuff + mstart, (void *)offs[i], lens[i]); - mstart += lens[i]; + for (int j = 0, mstart = 0; j < nentry; j++) { + memcpy (mbuff + mstart, (void *)offs[j], lens[j]); + mstart += lens[j]; } hid_t mspace_id = H5Screate_simple (1, &mbsize, &mbsize); diff --git a/src/H5VL_log_reqi.hpp b/src/H5VL_log_reqi.hpp index 8368d602..f17b6337 100644 --- a/src/H5VL_log_reqi.hpp +++ b/src/H5VL_log_reqi.hpp @@ -1,3 +1,6 @@ +#ifndef H5VL_LOG_REQI_HPP +#define H5VL_LOG_REQI_HPP + /* * Copyright (C) 2022, Northwestern University and Argonne National Laboratory * See COPYRIGHT notice in top-level directory. @@ -7,3 +10,5 @@ #include herr_t H5VL_log_reqi_notify_cb (void *ctx, H5VL_request_status_t status); + +#endif diff --git a/src/H5VL_log_wrap.cpp b/src/H5VL_log_wrap.cpp index a01b290b..5775544c 100644 --- a/src/H5VL_log_wrap.cpp +++ b/src/H5VL_log_wrap.cpp @@ -75,7 +75,6 @@ herr_t H5VL_log_get_wrap_ctx (const void *obj, void **wrap_ctx) { /* Allocate new VOL object wrapping context for the pass through connector */ try { ctx = new H5VL_log_wrap_ctx_t (); - CHECK_PTR (ctx) } catch (const std::bad_alloc&) { err = -1; diff --git a/src/H5VL_logi_filter_deflate.hpp b/src/H5VL_logi_filter_deflate.hpp index 620c9c4c..31eb34ef 100644 --- a/src/H5VL_logi_filter_deflate.hpp +++ b/src/H5VL_logi_filter_deflate.hpp @@ -1,3 +1,6 @@ +#ifndef H5VL_LOGI_FILTER_DEFLATE_HPP +#define H5VL_LOGI_FILTER_DEFLATE_HPP + /* * Copyright (C) 2022, Northwestern University and Argonne National Laboratory * See COPYRIGHT notice in top-level directory. @@ -16,3 +19,5 @@ void H5VL_logi_filter_inflate ( H5VL_log_filter_t &fp, void *in, int in_len, void *out, int *out_len); void H5VL_logi_filter_inflate_alloc ( H5VL_log_filter_t &fp, void *in, int in_len, void **out, int *out_len); + +#endif From e80e23d2c536bbef6532888a3fc95fb75005c69d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 17 Feb 2025 11:11:16 -0600 Subject: [PATCH 16/47] general codeql fixes --- src/H5VL_log_filei_meta.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5VL_log_filei_meta.cpp b/src/H5VL_log_filei_meta.cpp index 0a852f14..ad4bb195 100644 --- a/src/H5VL_log_filei_meta.cpp +++ b/src/H5VL_log_filei_meta.cpp @@ -259,9 +259,9 @@ void H5VL_log_filei_metaflush (H5VL_log_file_t *fp) { // mem space char *mbuff = (char *)malloc (mdsize); - for (int j = 0, mstart = 0; j < nentry; j++) { - memcpy (mbuff + mstart, (void *)offs[j], lens[j]); - mstart += lens[j]; + for (int j = 0, hsize_t copy_pos = 0; j < nentry; j++) { + memcpy (mbuff + copy_pos, (void *)offs[j], lens[j]); + copy_pos += lens[j]; } hid_t mspace_id = H5Screate_simple (1, &mbsize, &mbsize); From 7e5d7ac82107c010933f65a247cd21ab84fd4ae6 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 17 Feb 2025 11:21:38 -0600 Subject: [PATCH 17/47] general codeql fixes --- src/H5VL_log_filei_meta.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/H5VL_log_filei_meta.cpp b/src/H5VL_log_filei_meta.cpp index ad4bb195..0c9ca9c9 100644 --- a/src/H5VL_log_filei_meta.cpp +++ b/src/H5VL_log_filei_meta.cpp @@ -259,7 +259,8 @@ void H5VL_log_filei_metaflush (H5VL_log_file_t *fp) { // mem space char *mbuff = (char *)malloc (mdsize); - for (int j = 0, hsize_t copy_pos = 0; j < nentry; j++) { + hsize_t copy_pos; + for (int j = 0, copy_pos = 0; j < nentry; j++) { memcpy (mbuff + copy_pos, (void *)offs[j], lens[j]); copy_pos += lens[j]; } From 85baf9cee496c65ddfdbb61039fb634a4d6c443b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 17 Feb 2025 11:44:10 -0600 Subject: [PATCH 18/47] misc. codeql fixes --- src/H5VL_log_att.cpp | 2 +- src/H5VL_log_dataseti.cpp | 8 ++++---- src/H5VL_log_file.cpp | 4 ++-- src/H5VL_log_filei.cpp | 6 +++--- src/H5VL_log_link.cpp | 2 +- src/H5VL_log_obj.cpp | 2 +- src/H5VL_log_req.cpp | 18 +++++++++--------- src/H5VL_logi_dataspace.cpp | 4 ++-- src/H5VL_logi_idx_compact.cpp | 2 +- src/H5VL_logi_nb.cpp | 9 +++++---- 10 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/H5VL_log_att.cpp b/src/H5VL_log_att.cpp index f3b12342..34724187 100644 --- a/src/H5VL_log_att.cpp +++ b/src/H5VL_log_att.cpp @@ -472,7 +472,7 @@ herr_t H5VL_log_attr_specific (void *obj, H5VL_LOGI_EXP_CATCH_ERR err_out:; - if (ctx) { free (ctx); } + free (ctx); if (iname && iname != original_name) { free (iname); } // Restore name in loc_param if (original_name) { diff --git a/src/H5VL_log_dataseti.cpp b/src/H5VL_log_dataseti.cpp index 98d136eb..be324c4e 100644 --- a/src/H5VL_log_dataseti.cpp +++ b/src/H5VL_log_dataseti.cpp @@ -986,18 +986,18 @@ void H5VL_log_dataseti_write (H5VL_log_dset_t *dp, // Filtering H5VL_LOGI_PROFILING_TIMER_START; if (dip->filters.size ()) { - char *buf = NULL; + char *buf_filter = NULL; int csize = 0; - H5VL_logi_filter (dip->filters, db.xbuf, db.size, (void **)&buf, &csize); + H5VL_logi_filter (dip->filters, db.xbuf, db.size, (void **)&buf_filter, &csize); if (db.xbuf != db.ubuf) { H5VL_log_filei_bfree (dp->fp, db.xbuf); } // Copy to xbuf // xbuf is managed buffer, buf is not, can't assign directly H5VL_log_filei_balloc (dp->fp, csize, (void **)(&(db.xbuf))); - memcpy (db.xbuf, buf, csize); - free (buf); + memcpy (db.xbuf, buf_filter, csize); + free (buf_filter); db.size = csize; } H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOG_DATASET_WRITE_FILTER); diff --git a/src/H5VL_log_file.cpp b/src/H5VL_log_file.cpp index 8bbc494a..a5f4e516 100644 --- a/src/H5VL_log_file.cpp +++ b/src/H5VL_log_file.cpp @@ -187,7 +187,7 @@ err_out:; fn_exit:; if (comm != MPI_COMM_SELF) { MPI_Comm_free (&comm); } if (mpiinfo != MPI_INFO_NULL) { MPI_Info_free (&mpiinfo); } - if (info) { free (info); } + free (info); return (void *)fp; } /* end H5VL_log_file_create() */ @@ -324,7 +324,7 @@ err_out:; fn_exit:; if (comm != MPI_COMM_SELF) { MPI_Comm_free (&comm); } if (mpiinfo != MPI_INFO_NULL) { MPI_Info_free (&mpiinfo); } - if (info) { free (info); } + free (info); return (void *)fp; } /* end H5VL_log_file_open() */ diff --git a/src/H5VL_log_filei.cpp b/src/H5VL_log_filei.cpp index 08db85b4..ff7f67f6 100644 --- a/src/H5VL_log_filei.cpp +++ b/src/H5VL_log_filei.cpp @@ -687,7 +687,7 @@ void H5VL_log_filei_flush (H5VL_log_file_t *fp, hid_t dxplid) { H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VL_LOG_FILEI_FLUSH); } - +#if 0 // UNUSED static inline void print_info (MPI_Info *info_used) { int i, nkeys; @@ -708,7 +708,7 @@ static inline void print_info (MPI_Info *info_used) { } printf ("-----------------------------------------------------------\n"); } - +#endif void H5VL_log_filei_close (H5VL_log_file_t *fp) { herr_t err = 0; int mpierr; @@ -805,7 +805,7 @@ void H5VL_log_filei_close (H5VL_log_file_t *fp) { // Free dataset info for (auto info : fp->dsets_info) { if (info) { - if (info->fill) { free (info->fill); } + free (info->fill); delete info; } } diff --git a/src/H5VL_log_link.cpp b/src/H5VL_log_link.cpp index 5ae19fb0..7e173923 100644 --- a/src/H5VL_log_link.cpp +++ b/src/H5VL_log_link.cpp @@ -417,7 +417,7 @@ herr_t H5VL_log_link_specific (void *obj, H5VL_LOGI_EXP_CATCH_ERR err_out:; - if (ctx) { free (ctx); } + free (ctx); if (iname && iname != original_name) { free (iname); } // Restore name in loc_param if (original_name) { diff --git a/src/H5VL_log_obj.cpp b/src/H5VL_log_obj.cpp index 4f3c75be..f1f64645 100644 --- a/src/H5VL_log_obj.cpp +++ b/src/H5VL_log_obj.cpp @@ -299,7 +299,7 @@ herr_t H5VL_log_object_specific (void *obj, H5VL_LOGI_EXP_CATCH_ERR err_out:; - if (ctx) { free (ctx); } + free (ctx); if (iname && iname != original_name) { free (iname); } // Restore name in loc_param if (original_name) { diff --git a/src/H5VL_log_req.cpp b/src/H5VL_log_req.cpp index 89a8d6fc..43110736 100644 --- a/src/H5VL_log_req.cpp +++ b/src/H5VL_log_req.cpp @@ -23,15 +23,15 @@ /********************* */ /* Function prototypes */ /********************* */ -const H5VL_request_class_t H5VL_log_request_g { - H5VL_log_request_wait, /* wait */ - H5VL_log_request_notify, /* notify */ - H5VL_log_request_cancel, /* cancel */ - // H5VL_log_request_specific_reissue, /* specific_reissue */ - H5VL_log_request_specific, /* specific */ - H5VL_log_request_optional, /* optional */ - H5VL_log_request_free /* free */ -}; +//const H5VL_request_class_t H5VL_log_request_g { +// H5VL_log_request_wait, /* wait */ +// H5VL_log_request_notify, /* notify */ +// H5VL_log_request_cancel, /* cancel */ +// // H5VL_log_request_specific_reissue, /* specific_reissue */ +// H5VL_log_request_specific, /* specific */ +// H5VL_log_request_optional, /* optional */ +// H5VL_log_request_free /* free */ +//}; /*------------------------------------------------------------------------- * Function: H5VL_log_request_wait diff --git a/src/H5VL_logi_dataspace.cpp b/src/H5VL_logi_dataspace.cpp index 058ac940..5b7292ad 100644 --- a/src/H5VL_logi_dataspace.cpp +++ b/src/H5VL_logi_dataspace.cpp @@ -431,13 +431,13 @@ H5VL_log_selections::H5VL_log_selections (hid_t dsid) { free (hstarts[0]); free (hstarts); } - if (group) { free (group); } + free (group); if (err) { throw "Can not retrieve selections"; } } H5VL_log_selections::~H5VL_log_selections () { - if (dims) { free (dims); } + free (dims); if (sels_arr) { if (starts[0]) { free (starts[0]); } free (starts); diff --git a/src/H5VL_logi_idx_compact.cpp b/src/H5VL_logi_idx_compact.cpp index 6bbd8c4c..121ab4f9 100644 --- a/src/H5VL_logi_idx_compact.cpp +++ b/src/H5VL_logi_idx_compact.cpp @@ -68,7 +68,7 @@ H5VL_logi_compact_idx_t::H5VL_logi_compact_idx_entry_t::H5VL_logi_compact_idx_en } H5VL_logi_compact_idx_t::H5VL_logi_compact_idx_entry_t::~H5VL_logi_compact_idx_entry_t () { - if (nsel >= 0 && (this->blocks)) { free (this->blocks); } + if (nsel >= 0) { free (this->blocks); } } H5VL_logi_compact_idx_t::H5VL_logi_compact_idx_t (H5VL_log_file_t *fp) : H5VL_logi_idx_t (fp) {} diff --git a/src/H5VL_logi_nb.cpp b/src/H5VL_logi_nb.cpp index bae1077e..79906985 100644 --- a/src/H5VL_logi_nb.cpp +++ b/src/H5VL_logi_nb.cpp @@ -166,7 +166,7 @@ H5VL_log_wreq_t::H5VL_log_wreq_t (void *dset, H5VL_log_selections *sels) { } H5VL_log_wreq_t::~H5VL_log_wreq_t () { - if (meta_buf) { free (meta_buf); } + free (meta_buf); } void H5VL_log_wreq_t::resize (size_t size) { @@ -829,9 +829,10 @@ void H5VL_log_nb_flush_write_reqs (void *file) { // mem space char *mbuff = (char *)malloc (mbsize); - for (int i = 0, mstart = 0; i < cnt; i++) { - memcpy (mbuff + mstart, (void *)moffs[i], mlens[i]); - mstart += mlens[i]; + hsize_t copy_offset; + for (int j = 0, copy_offset = 0; j < cnt; j++) { + memcpy (mbuff + copy_offset, (void *)moffs[j], mlens[j]); + copy_offset += mlens[j]; } hid_t mspace_id = H5Screate_simple (1, &mbsize, &mbsize); From 3c799d7b329759fdf382cd6bac2bc37a3cbb7fb8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 17 Feb 2025 12:06:35 -0600 Subject: [PATCH 19/47] misc fixes --- src/H5VL_logi_nb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/H5VL_logi_nb.cpp b/src/H5VL_logi_nb.cpp index 79906985..05adfce6 100644 --- a/src/H5VL_logi_nb.cpp +++ b/src/H5VL_logi_nb.cpp @@ -829,10 +829,10 @@ void H5VL_log_nb_flush_write_reqs (void *file) { // mem space char *mbuff = (char *)malloc (mbsize); - hsize_t copy_offset; - for (int j = 0, copy_offset = 0; j < cnt; j++) { - memcpy (mbuff + copy_offset, (void *)moffs[j], mlens[j]); - copy_offset += mlens[j]; + hsize_t copy_offset = 0; + for (int k = 0; k < cnt; k++) { + memcpy (mbuff + copy_offset, (void *)moffs[k], mlens[k]); + copy_offset += mlens[k]; } hid_t mspace_id = H5Screate_simple (1, &mbsize, &mbsize); From 8ecb6949c0d4f6dace83eae29e33dbd61a1e5804 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 17 Feb 2025 15:42:27 -0600 Subject: [PATCH 20/47] codeql fix --- src/H5VL_log_filei_meta.cpp | 4 ++-- src/H5VL_logi_nb.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/H5VL_log_filei_meta.cpp b/src/H5VL_log_filei_meta.cpp index 0c9ca9c9..c4aef518 100644 --- a/src/H5VL_log_filei_meta.cpp +++ b/src/H5VL_log_filei_meta.cpp @@ -259,8 +259,8 @@ void H5VL_log_filei_metaflush (H5VL_log_file_t *fp) { // mem space char *mbuff = (char *)malloc (mdsize); - hsize_t copy_pos; - for (int j = 0, copy_pos = 0; j < nentry; j++) { + hsize_t copy_pos = 0; + for (int j = 0; j < nentry; j++) { memcpy (mbuff + copy_pos, (void *)offs[j], lens[j]); copy_pos += lens[j]; } diff --git a/src/H5VL_logi_nb.cpp b/src/H5VL_logi_nb.cpp index 05adfce6..1a1fe26a 100644 --- a/src/H5VL_logi_nb.cpp +++ b/src/H5VL_logi_nb.cpp @@ -829,10 +829,10 @@ void H5VL_log_nb_flush_write_reqs (void *file) { // mem space char *mbuff = (char *)malloc (mbsize); - hsize_t copy_offset = 0; + hsize_t copy_pos = 0; for (int k = 0; k < cnt; k++) { - memcpy (mbuff + copy_offset, (void *)moffs[k], mlens[k]); - copy_offset += mlens[k]; + memcpy (mbuff + copy_pos, (void *)moffs[k], mlens[k]); + copy_pos += mlens[k]; } hid_t mspace_id = H5Screate_simple (1, &mbsize, &mbsize); From f6bfa51811b5746cbf129d595cc2f39f1af70c08 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 17 Feb 2025 16:28:40 -0600 Subject: [PATCH 21/47] enable tesrt --- .github/workflows/ubuntu_mpich.yml | 2 +- .github/workflows/ubuntu_openmpi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index fa475cdd..b22e88a7 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -104,7 +104,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --disable-test-hdf5-iotest \ + --enable-test-hdf5-iotest \ --with-mpi=${GITHUB_WORKSPACE}/MPICH # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 81e1b210..4cb75cd5 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -99,7 +99,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --disable-test-hdf5-iotest \ + --enable-test-hdf5-iotest \ TESTMPIRUN="mpiexec --oversubscribe -n NP" # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error From 86b5b7ff10a14c698bbaa18ddd4f9e7a5c3ff803 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 19 Feb 2025 16:35:22 -0600 Subject: [PATCH 22/47] changed to consistant use of nullptr, added check for allocation failure --- src/H5VL_log_dataset.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/H5VL_log_dataset.cpp b/src/H5VL_log_dataset.cpp index b07154b2..8e8ecfa7 100644 --- a/src/H5VL_log_dataset.cpp +++ b/src/H5VL_log_dataset.cpp @@ -64,19 +64,19 @@ void *H5VL_log_dataset_create (void *obj, herr_t err = 0; int i; H5VL_log_obj_t *op = (H5VL_log_obj_t *)obj; - H5VL_log_dset_t *dp = NULL; + H5VL_log_dset_t *dp = nullptr; H5VL_log_dset_info_t *dip = nullptr; // Dataset info // H5VL_link_create_args_t args; // H5VL_loc_params_t loc; hid_t zero_space = -1; int ndim; htri_t is_var_type; - char *iname = NULL; // Internal name of object + char *iname = nullptr; // Internal name of object H5VL_log_req_t *rp; void **ureqp, *ureq; H5D_fill_value_t stat; - void *lib_state = NULL; - void *lib_context = NULL; + void *lib_state = nullptr; + void *lib_context = nullptr; // char lname[1024]; H5VL_logi_err_finally finally ( [&dcpl_id, &lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); @@ -96,7 +96,7 @@ void *H5VL_log_dataset_create (void *obj, rp = new H5VL_log_req_t (); ureqp = &ureq; } else { - ureqp = NULL; + ureqp = nullptr; } dp = new H5VL_log_dset_t (op, H5I_DATASET); @@ -150,7 +150,7 @@ void *H5VL_log_dataset_create (void *obj, err = H5Pget_fill_value (dcpl_id, type_id, dip->fill); CHECK_ERR } else { - dip->fill = NULL; + dip->fill = nullptr; } // NOTE: I don't know if it work for scalar dataset, can we create zero sized attr? @@ -192,7 +192,7 @@ void *H5VL_log_dataset_create (void *obj, dp->fp->ndset++; dp->fp->dsets_info.push_back (dip); // Dataset info dp->fp->idx->reserve (dp->fp->ndset); // Index for H5Dread - dp->fp->mreqs.resize (dp->fp->ndset, NULL); // Merged requests + dp->fp->mreqs.resize (dp->fp->ndset, nullptr); // Merged requests // Create soft link to aid dataset visiting on file opening // Broken, not used anymore @@ -223,7 +223,7 @@ err_out:; if (dp) { if (dip) { delete dip; } delete dp; - dp = NULL; + dp = nullptr; } fn_exit:; if (iname && iname != name) { free (iname); } @@ -342,9 +342,9 @@ static herr_t H5VL_log_dataset_write_elements (void *dset, herr_t err = 0; H5VL_log_dset_t *dp = (H5VL_log_dset_t *)dset; - H5VL_log_dset_info_t *dip = NULL; // Dataset info + H5VL_log_dset_info_t *dip = nullptr; // Dataset info hid_t dsid = H5I_INVALID_HID; // Dataset space id - H5VL_log_selections *dsel = NULL; // Selection blocks + H5VL_log_selections *dsel = nullptr; // Selection blocks try { if (!dp->fp->is_log_based_file) { @@ -359,7 +359,13 @@ static herr_t H5VL_log_dataset_write_elements (void *dset, } else { dsid = file_space_id; } - dsel = new H5VL_log_selections (dsid); + try { + dsel = new H5VL_log_selections (dsid); + } + catch (const std::bad_alloc&) { + err = -1; + ERR_OUT ("Memory allocation failed") + } H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOGI_GET_DATASPACE_SELECTION); // H5S_All means using file space From 8b2f683967b1e7f0d06b4530c1982fd4570eddf5 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 4 Mar 2025 13:40:20 -0600 Subject: [PATCH 23/47] CI HDF5 cmake build updates --- .github/workflows/alone.yml | 25 ++-- .github/workflows/codeql.yml | 27 ++-- .github/workflows/mac_mpich.yml | 27 ++-- .github/workflows/ubuntu_mpich.yml | 159 +++++++++++++++++++++--- .github/workflows/ubuntu_openmpi.yml | 32 ++--- .github/workflows/ubuntu_stack_vols.yml | 25 ++-- 6 files changed, 189 insertions(+), 106 deletions(-) diff --git a/.github/workflows/alone.yml b/.github/workflows/alone.yml index 4a8828a9..b7ac5eeb 100644 --- a/.github/workflows/alone.yml +++ b/.github/workflows/alone.yml @@ -68,22 +68,15 @@ jobs: cd ${GITHUB_WORKSPACE}/HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 - make -s -j 8 distclean >> qout 2>&1 + ln -sf hdf5-* hdf5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j4 install - name: Install Argobots if: ${{ success() }} run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ea167fbc..22f3ecb4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -110,24 +110,15 @@ jobs: rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 - + ln -sf hdf5-* hdf5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} diff --git a/.github/workflows/mac_mpich.yml b/.github/workflows/mac_mpich.yml index 6f5fc22c..d92364de 100644 --- a/.github/workflows/mac_mpich.yml +++ b/.github/workflows/mac_mpich.yml @@ -32,29 +32,22 @@ jobs: - uses: actions/checkout@v4.1.1 - name: Set up dependencies run: | - brew install automake autoconf libtool m4 open-mpi zlib + brew install automake autoconf libtool m4 open-mpi zlib cmake - name: Install HDF5 run: | cd ${GITHUB_WORKSPACE} rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - CC=mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 - make -s -j 8 distclean >> qout 2>&1 + ln -sf hdf5-* hdf5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index b22e88a7..d13a0f1d 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -25,15 +25,21 @@ env: NETCDF_VERSION: 4.9.2 jobs: - build: + +################################################# +# Testing with the latest HDF5 release +################################################# + + vol-log-based-hdf5-lastest: runs-on: ubuntu-latest timeout-minutes: 60 + steps: - uses: actions/checkout@v4.1.1 - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake # The MPICH installed on github actions is too slow # sudo apt-get install mpich # mpicc -v @@ -61,23 +67,143 @@ jobs: rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + ln -sf hdf5-* hdf5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j2 install + - name: Install NetCDF + run: | + cd ${GITHUB_WORKSPACE} + rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF + wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz + tar -zxf v${NETCDF_VERSION}.tar.gz + cd netcdf-c-${NETCDF_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ + --silent \ + --disable-dap \ + --disable-nczarr \ + --disable-nczarr-filters \ + --disable-filter-testing \ + --disable-byterange \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ + CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ + LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ + LIBS="-lhdf5" + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + - name: Configure Log VOL connector + run: | + cd ${GITHUB_WORKSPACE} + autoreconf -i + ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ + --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ + --enable-test-hdf5-iotest \ + --with-mpi=${GITHUB_WORKSPACE}/MPICH + # Do NOT test QMCPACK, as it requires FFTW which fails to build + - name: Print config.log if error + if: ${{ failure() }} + run: | + cd ${GITHUB_WORKSPACE} + cat config.log + - name: Build Log VOL connector + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j 4 + # Do NOT parallel build, cmake for external tests can fail + make tests + - name: Serial-run test - make check + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make check + - name: Print test log files + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + fname=`find tests utils examples -type f -name "*.log"` + for f in $fname ; do \ + bname=`basename $f` ; \ + if test "x$bname" != xconfig.log ; then \ + echo "-------- dump $f ----------------------------" ; \ + cat $f ; \ + fi ; \ + done + - name: Parallel-run test - make ptest + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make ptest + - name: Test distribution - make distcheck + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" + - name: make distclean + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + make -s distclean + +####################################### +# Testing using HDF5's "develop" branch +####################################### + + vol-log-based-hdf5-develop: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + + - name: Checkout HDF5 develop + uses: actions/checkout@v4.1.1 + with: + repository: HDFGroup/hdf5 + path: hdf5 + + - uses: actions/checkout@v4.1.1 + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake + # The MPICH installed on github actions is too slow + # sudo apt-get install mpich + # mpicc -v + # zlib + sudo apt-get install zlib1g-dev + - name: Build MPICH + run: | + cd ${GITHUB_WORKSPACE} + rm -rf MPICH ; mkdir MPICH ; cd MPICH + wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz + gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf - + cd mpich-${MPICH_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ + --enable-romio \ + --with-file-system=ufs \ + --with-device=ch3:sock \ --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + CC=gcc make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 + - name: Install HDF5 develop + run: | + cd ${GITHUB_WORKSPACE} + rm -rf HDF5 ; mkdir HDF5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} @@ -150,5 +276,4 @@ jobs: if: ${{ always() }} run: | cd ${GITHUB_WORKSPACE} - make -s distclean - + make -s distclean \ No newline at end of file diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 4cb75cd5..a75ec654 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -32,7 +32,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake # zlib sudo apt-get install zlib1g-dev # mpi @@ -46,27 +46,15 @@ jobs: rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 - - name: Dump config.log if HDF5 fails to build - if: ${{ failure() }} - run: | - cat ${GITHUB_WORKSPACE}/HDF5/hdf5-${HDF5_VERSION}/config.log + ln -sf hdf5-* hdf5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} diff --git a/.github/workflows/ubuntu_stack_vols.yml b/.github/workflows/ubuntu_stack_vols.yml index 76a89879..fbf8bbbe 100644 --- a/.github/workflows/ubuntu_stack_vols.yml +++ b/.github/workflows/ubuntu_stack_vols.yml @@ -68,22 +68,15 @@ jobs: cd ${GITHUB_WORKSPACE}/HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 - make -s -j 8 distclean >> qout 2>&1 + ln -sf hdf5-* hdf5 + cd hdf5 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ + -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ + -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j4 install - name: Install Argobots if: ${{ success() }} run: | From dc0019fa5661d271c31517e787e25e6209496fc8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 4 Mar 2025 13:43:38 -0600 Subject: [PATCH 24/47] CI HDF5 cmake build updates --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 22f3ecb4..97cb7f1f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -80,7 +80,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake # The MPICH installed on github actions is too slow # sudo apt-get install mpich # mpicc -v From 662254a833e918d35c33547279f5359aeb99f708 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 6 Mar 2025 09:54:24 -0600 Subject: [PATCH 25/47] test1 --- .github/workflows/mac_mpich.yml | 2 +- .github/workflows/ubuntu_mpich.yml | 3 ++- .github/workflows/ubuntu_openmpi.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mac_mpich.yml b/.github/workflows/mac_mpich.yml index d92364de..57f754b4 100644 --- a/.github/workflows/mac_mpich.yml +++ b/.github/workflows/mac_mpich.yml @@ -46,7 +46,7 @@ jobs: cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=mpicc .. make -j2 install - name: Install NetCDF run: | diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index d13a0f1d..a5720d5f 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -211,6 +211,7 @@ jobs: wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz tar -zxf v${NETCDF_VERSION}.tar.gz cd netcdf-c-${NETCDF_VERSION} + ls -aolF ${GITHUB_WORKSPACE}/HDF5/* ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ --silent \ --disable-dap \ @@ -220,7 +221,7 @@ jobs: --disable-byterange \ CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ - LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ + LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" \ LIBS="-lhdf5" make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index a75ec654..cd556cb3 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -53,7 +53,7 @@ jobs: cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=mpicc .. make -j2 install - name: Install NetCDF run: | From c8144592a14f2048961f530b888967296517afc9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 09:37:13 -0500 Subject: [PATCH 26/47] test6 --- .github/workflows/ubuntu_mpich.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index a5720d5f..96911dfe 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -23,6 +23,7 @@ on: env: MPICH_VERSION: 4.1.2 NETCDF_VERSION: 4.9.2 + LD_LIBRARY_PATH: ${GITHUB_WORKSPACE}/HDF5/lib/ jobs: @@ -75,7 +76,10 @@ jobs: -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j2 install + make -j2 installecho "OS_NAME=linux" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + echo "F77=mpif90" >> $GITHUB_ENV + - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} @@ -92,7 +96,7 @@ jobs: --disable-byterange \ CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ - LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ + LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" \ LIBS="-lhdf5" make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 @@ -164,7 +168,7 @@ jobs: uses: actions/checkout@v4.1.1 with: repository: HDFGroup/hdf5 - path: hdf5 + path: ${GITHUB_WORKSPACE}/hdf5 - uses: actions/checkout@v4.1.1 - name: Set up dependencies From a7beb395a2e97a0655ac4664651a9c6cb141d9e1 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 09:41:30 -0500 Subject: [PATCH 27/47] test7 --- .github/workflows/ubuntu_mpich.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 96911dfe..2c81a7dd 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -23,7 +23,7 @@ on: env: MPICH_VERSION: 4.1.2 NETCDF_VERSION: 4.9.2 - LD_LIBRARY_PATH: ${GITHUB_WORKSPACE}/HDF5/lib/ + LD_LIBRARY_PATH: ${{ github.workspace }}/HDF5/lib/ jobs: From f82871f9a7f0ee63b159a2d80552cbffea437797 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 09:53:13 -0500 Subject: [PATCH 28/47] test8 --- .github/workflows/ubuntu_mpich.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 2c81a7dd..e2c953de 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -23,7 +23,6 @@ on: env: MPICH_VERSION: 4.1.2 NETCDF_VERSION: 4.9.2 - LD_LIBRARY_PATH: ${{ github.workspace }}/HDF5/lib/ jobs: @@ -79,6 +78,7 @@ jobs: make -j2 installecho "OS_NAME=linux" >> $GITHUB_ENV echo "FC=mpif90" >> $GITHUB_ENV echo "F77=mpif90" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=${{ github.workspace }}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Install NetCDF run: | From 283b2e2c0bff14d16751f0cc10e291a28cb7fa44 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 10:03:41 -0500 Subject: [PATCH 29/47] test9 --- .github/workflows/ubuntu_mpich.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index e2c953de..02743460 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -82,6 +82,8 @@ jobs: - name: Install NetCDF run: | + echo $LD_LIBRARY_PATH + ls -R ${GITHUB_WORKSPACE}/HDF5 cd ${GITHUB_WORKSPACE} rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz From e7491fc611ab519731e06531198d08baf106a823 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 10:11:24 -0500 Subject: [PATCH 30/47] test10 --- .github/workflows/ubuntu_mpich.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 02743460..db3eacdd 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -75,7 +75,7 @@ jobs: -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j2 installecho "OS_NAME=linux" >> $GITHUB_ENV + make -j2 install echo "OS_NAME=linux" >> $GITHUB_ENV echo "FC=mpif90" >> $GITHUB_ENV echo "F77=mpif90" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${{ github.workspace }}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV From 0ffb8c152f0acc50dab9125b33e2656da3de55bf Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 10:28:30 -0500 Subject: [PATCH 31/47] test11 --- .github/workflows/ubuntu_mpich.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index db3eacdd..7be0207e 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -75,7 +75,8 @@ jobs: -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j2 install echo "OS_NAME=linux" >> $GITHUB_ENV + make -j2 install + echo "OS_NAME=linux" >> $GITHUB_ENV echo "FC=mpif90" >> $GITHUB_ENV echo "F77=mpif90" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${{ github.workspace }}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV From 078ad66de8a3a2945285858bcd50078fca257107 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 10 Mar 2025 11:05:44 -0500 Subject: [PATCH 32/47] test12 --- .github/workflows/ubuntu_mpich.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 7be0207e..6913c9eb 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -83,24 +83,27 @@ jobs: - name: Install NetCDF run: | + echo "LD_LIBRARY_PATH=${{ github.workspace }}/HDF5/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "END" echo $LD_LIBRARY_PATH - ls -R ${GITHUB_WORKSPACE}/HDF5 + echo "END2" cd ${GITHUB_WORKSPACE} rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz tar -zxf v${NETCDF_VERSION}.tar.gz cd netcdf-c-${NETCDF_VERSION} - ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ + export LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/HDF5/lib:$LD_LIBRARY_PATH + echo "END3" + echo $LD_LIBRARY_PATH + echo "END4" + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ + LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" LIBS="-lhdf5" ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ --silent \ --disable-dap \ --disable-nczarr \ --disable-nczarr-filters \ --disable-filter-testing \ - --disable-byterange \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ - CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ - LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" \ - LIBS="-lhdf5" + --disable-byterange make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 - name: Configure Log VOL connector From 77cda4f3a3a26f0e4757142bd45bbaa43fd540bd Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 09:31:52 -0500 Subject: [PATCH 33/47] test13 --- .github/workflows/ubuntu_mpich.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 6913c9eb..55144d4f 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -77,8 +77,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -j2 install echo "OS_NAME=linux" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - echo "F77=mpif90" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${{ github.workspace }}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Install NetCDF @@ -93,6 +91,7 @@ jobs: tar -zxf v${NETCDF_VERSION}.tar.gz cd netcdf-c-${NETCDF_VERSION} export LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/HDF5/lib:$LD_LIBRARY_PATH + ls -aolF ${GITHUB_WORKSPACE}/HDF5/lib echo "END3" echo $LD_LIBRARY_PATH echo "END4" From a9d048a9cc9b5941910ed52282c0b96a32878290 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 09:46:18 -0500 Subject: [PATCH 34/47] test14 --- .github/workflows/ubuntu_mpich.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 55144d4f..93d03a66 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -74,6 +74,7 @@ jobs: cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + -DBUILD_STATIC_LIBS=OFF \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -j2 install echo "OS_NAME=linux" >> $GITHUB_ENV From 0a116e201ef8519352f92c3e43f1d84a0a6a345c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 09:54:22 -0500 Subject: [PATCH 35/47] reset --- .github/workflows/alone.yml | 25 ++-- .github/workflows/codeql.yml | 29 ++-- .github/workflows/mac_mpich.yml | 27 ++-- .github/workflows/ubuntu_mpich.yml | 172 +++--------------------- .github/workflows/ubuntu_openmpi.yml | 32 +++-- .github/workflows/ubuntu_stack_vols.yml | 25 ++-- 6 files changed, 108 insertions(+), 202 deletions(-) diff --git a/.github/workflows/alone.yml b/.github/workflows/alone.yml index b7ac5eeb..4a8828a9 100644 --- a/.github/workflows/alone.yml +++ b/.github/workflows/alone.yml @@ -68,15 +68,22 @@ jobs: cd ${GITHUB_WORKSPACE}/HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - ln -sf hdf5-* hdf5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j4 install + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 + make -s -j 8 distclean >> qout 2>&1 - name: Install Argobots if: ${{ success() }} run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 97cb7f1f..ea167fbc 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -80,7 +80,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev # The MPICH installed on github actions is too slow # sudo apt-get install mpich # mpicc -v @@ -110,15 +110,24 @@ jobs: rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - ln -sf hdf5-* hdf5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j2 install + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + --enable-shared --disable-static \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} diff --git a/.github/workflows/mac_mpich.yml b/.github/workflows/mac_mpich.yml index 57f754b4..6f5fc22c 100644 --- a/.github/workflows/mac_mpich.yml +++ b/.github/workflows/mac_mpich.yml @@ -32,22 +32,29 @@ jobs: - uses: actions/checkout@v4.1.1 - name: Set up dependencies run: | - brew install automake autoconf libtool m4 open-mpi zlib cmake + brew install automake autoconf libtool m4 open-mpi zlib - name: Install HDF5 run: | cd ${GITHUB_WORKSPACE} rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - ln -sf hdf5-* hdf5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=mpicc .. - make -j2 install + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + CC=mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 + make -s -j 8 distclean >> qout 2>&1 - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 93d03a66..b22e88a7 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -25,21 +25,15 @@ env: NETCDF_VERSION: 4.9.2 jobs: - -################################################# -# Testing with the latest HDF5 release -################################################# - - vol-log-based-hdf5-lastest: + build: runs-on: ubuntu-latest timeout-minutes: 60 - steps: - uses: actions/checkout@v4.1.1 - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev # The MPICH installed on github actions is too slow # sudo apt-get install mpich # mpicc -v @@ -67,153 +61,23 @@ jobs: rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - ln -sf hdf5-* hdf5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j2 install - echo "OS_NAME=linux" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=${{ github.workspace }}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - - - name: Install NetCDF - run: | - echo "LD_LIBRARY_PATH=${{ github.workspace }}/HDF5/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - echo "END" - echo $LD_LIBRARY_PATH - echo "END2" - cd ${GITHUB_WORKSPACE} - rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF - wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz - tar -zxf v${NETCDF_VERSION}.tar.gz - cd netcdf-c-${NETCDF_VERSION} - export LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/HDF5/lib:$LD_LIBRARY_PATH - ls -aolF ${GITHUB_WORKSPACE}/HDF5/lib - echo "END3" - echo $LD_LIBRARY_PATH - echo "END4" - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ - LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" LIBS="-lhdf5" ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ --silent \ - --disable-dap \ - --disable-nczarr \ - --disable-nczarr-filters \ - --disable-filter-testing \ - --disable-byterange - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 - - name: Configure Log VOL connector - run: | - cd ${GITHUB_WORKSPACE} - autoreconf -i - ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ - --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --enable-test-hdf5-iotest \ - --with-mpi=${GITHUB_WORKSPACE}/MPICH - # Do NOT test QMCPACK, as it requires FFTW which fails to build - - name: Print config.log if error - if: ${{ failure() }} - run: | - cd ${GITHUB_WORKSPACE} - cat config.log - - name: Build Log VOL connector - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make -j 4 - # Do NOT parallel build, cmake for external tests can fail - make tests - - name: Serial-run test - make check - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make check - - name: Print test log files - if: ${{ always() }} - run: | - cd ${GITHUB_WORKSPACE} - fname=`find tests utils examples -type f -name "*.log"` - for f in $fname ; do \ - bname=`basename $f` ; \ - if test "x$bname" != xconfig.log ; then \ - echo "-------- dump $f ----------------------------" ; \ - cat $f ; \ - fi ; \ - done - - name: Parallel-run test - make ptest - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make ptest - - name: Test distribution - make distcheck - if: ${{ success() }} - run: | - cd ${GITHUB_WORKSPACE} - make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" - - name: make distclean - if: ${{ always() }} - run: | - cd ${GITHUB_WORKSPACE} - make -s distclean - -####################################### -# Testing using HDF5's "develop" branch -####################################### - - vol-log-based-hdf5-develop: - runs-on: ubuntu-latest - timeout-minutes: 60 - - steps: - - - name: Checkout HDF5 develop - uses: actions/checkout@v4.1.1 - with: - repository: HDFGroup/hdf5 - path: ${GITHUB_WORKSPACE}/hdf5 - - - uses: actions/checkout@v4.1.1 - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake - # The MPICH installed on github actions is too slow - # sudo apt-get install mpich - # mpicc -v - # zlib - sudo apt-get install zlib1g-dev - - name: Build MPICH - run: | - cd ${GITHUB_WORKSPACE} - rm -rf MPICH ; mkdir MPICH ; cd MPICH - wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz - gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf - - cd mpich-${MPICH_VERSION} - ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ - --silent \ - --enable-romio \ - --with-file-system=ufs \ - --with-device=ch3:sock \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ --disable-fortran \ - CC=gcc + --disable-cxx \ + --enable-shared --disable-static \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 - - name: Install HDF5 develop - run: | - cd ${GITHUB_WORKSPACE} - rm -rf HDF5 ; mkdir HDF5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} @@ -221,7 +85,6 @@ jobs: wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz tar -zxf v${NETCDF_VERSION}.tar.gz cd netcdf-c-${NETCDF_VERSION} - ls -aolF ${GITHUB_WORKSPACE}/HDF5/* ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ --silent \ --disable-dap \ @@ -231,7 +94,7 @@ jobs: --disable-byterange \ CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ - LDFLAGS="-L${GITHUB_WORKSPACE}/HDF5/lib" \ + LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ LIBS="-lhdf5" make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 @@ -287,4 +150,5 @@ jobs: if: ${{ always() }} run: | cd ${GITHUB_WORKSPACE} - make -s distclean \ No newline at end of file + make -s distclean + diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index cd556cb3..4cb75cd5 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -32,7 +32,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev cmake + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev # zlib sudo apt-get install zlib1g-dev # mpi @@ -46,15 +46,27 @@ jobs: rm -rf HDF5 ; mkdir HDF5 ; cd HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - ln -sf hdf5-* hdf5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=mpicc .. - make -j2 install + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + --enable-shared --disable-static \ + CC=mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + - name: Dump config.log if HDF5 fails to build + if: ${{ failure() }} + run: | + cat ${GITHUB_WORKSPACE}/HDF5/hdf5-${HDF5_VERSION}/config.log - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} diff --git a/.github/workflows/ubuntu_stack_vols.yml b/.github/workflows/ubuntu_stack_vols.yml index fbf8bbbe..76a89879 100644 --- a/.github/workflows/ubuntu_stack_vols.yml +++ b/.github/workflows/ubuntu_stack_vols.yml @@ -68,15 +68,22 @@ jobs: cd ${GITHUB_WORKSPACE}/HDF5 wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz - ln -sf hdf5-* hdf5 - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \ - -DHDF5_ALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \ - -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -j4 install + cd hdf5-* + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 + make -s -j 8 distclean >> qout 2>&1 - name: Install Argobots if: ${{ success() }} run: | From 5a3975065247fa2e71762edf3c7b0723eaf3517c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 10:05:29 -0500 Subject: [PATCH 36/47] reset2 --- .github/workflows/ubuntu_mpich.yml | 140 ++++++++++++++++++++++++++++- 1 file changed, 139 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index b22e88a7..d56d2754 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -25,9 +25,15 @@ env: NETCDF_VERSION: 4.9.2 jobs: - build: + +################################################# +# Testing with the latest HDF5 release +################################################# + + vol-log-based-hdf5-lastest: runs-on: ubuntu-latest timeout-minutes: 60 + steps: - uses: actions/checkout@v4.1.1 - name: Set up dependencies @@ -152,3 +158,135 @@ jobs: cd ${GITHUB_WORKSPACE} make -s distclean +####################################### +# Testing using HDF5's "develop" branch +####################################### + + vol-log-based-hdf5-develop: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + + - uses: actions/checkout@v4.1.1 + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + # The MPICH installed on github actions is too slow + # sudo apt-get install mpich + # mpicc -v + # zlib + sudo apt-get install zlib1g-dev + - name: Build MPICH + run: | + cd ${GITHUB_WORKSPACE} + rm -rf MPICH ; mkdir MPICH ; cd MPICH + wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz + gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf - + cd mpich-${MPICH_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/MPICH \ + --silent \ + --enable-romio \ + --with-file-system=ufs \ + --with-device=ch3:sock \ + --disable-fortran \ + CC=gcc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + - name: Install HDF5 + run: | + cd ${GITHUB_WORKSPACE} + rm -rf HDF5 ; mkdir HDF5 + git clone --single-branch --branch develop https://github.com/HDFGroup/hdf5.git + cd hdf5 + ./autogen.sh + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + --enable-shared --disable-static \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + - name: Install NetCDF + run: | + cd ${GITHUB_WORKSPACE} + rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF + wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz + tar -zxf v${NETCDF_VERSION}.tar.gz + cd netcdf-c-${NETCDF_VERSION} + ./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \ + --silent \ + --disable-dap \ + --disable-nczarr \ + --disable-nczarr-filters \ + --disable-filter-testing \ + --disable-byterange \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \ + CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \ + LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \ + LIBS="-lhdf5" + make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 + make -s -j 4 distclean >> qout 2>&1 + - name: Configure Log VOL connector + run: | + cd ${GITHUB_WORKSPACE} + autoreconf -i + ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ + --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ + --enable-test-hdf5-iotest \ + --with-mpi=${GITHUB_WORKSPACE}/MPICH + # Do NOT test QMCPACK, as it requires FFTW which fails to build + - name: Print config.log if error + if: ${{ failure() }} + run: | + cd ${GITHUB_WORKSPACE} + cat config.log + - name: Build Log VOL connector + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j 4 + # Do NOT parallel build, cmake for external tests can fail + make tests + - name: Serial-run test - make check + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make check + - name: Print test log files + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + fname=`find tests utils examples -type f -name "*.log"` + for f in $fname ; do \ + bname=`basename $f` ; \ + if test "x$bname" != xconfig.log ; then \ + echo "-------- dump $f ----------------------------" ; \ + cat $f ; \ + fi ; \ + done + - name: Parallel-run test - make ptest + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make ptest + - name: Test distribution - make distcheck + if: ${{ success() }} + run: | + cd ${GITHUB_WORKSPACE} + make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH" + - name: make distclean + if: ${{ always() }} + run: | + cd ${GITHUB_WORKSPACE} + make -s distclean From ad0680d8a2a6f12a3619b2d6523ece1fd5755d1f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 10:06:22 -0500 Subject: [PATCH 37/47] reset3 --- .github/workflows/ubuntu_mpich.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index d56d2754..8f51254b 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -174,7 +174,7 @@ jobs: sudo apt-get update sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev # The MPICH installed on github actions is too slow - # sudo apt-get install mpich + # sudo apt-get install mpich cmake automake autoconf libtool libtool-bin m4 uuid-dev # mpicc -v # zlib sudo apt-get install zlib1g-dev From 24782185b6313f373a21075ad9eb2282b64bf1d9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 10:26:37 -0500 Subject: [PATCH 38/47] reset4 --- .github/workflows/ubuntu_mpich.yml | 45 ++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 8f51254b..5ba0046b 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -20,6 +20,11 @@ on: - 'docs/*' - 'case_studies/*' +# Using concurrency to cancel any in-progress job or run +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} + cancel-in-progress: true + env: MPICH_VERSION: 4.1.2 NETCDF_VERSION: 4.9.2 @@ -68,20 +73,32 @@ jobs: wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ + -DHDF5_ENABLE_PARALLEL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DHDF5_ALLOW_UNSUPPORTED=ON \ + -DHDF5_ENABLE_THREADSAFE=ON \ + -DBUILD_TESTING=OFF \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc . +# -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ + + +# ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ +# --silent \ +# --enable-parallel \ +# --enable-build-mode=production \ +# --enable-unsupported \ +# --enable-threadsafe \ +# --disable-doxygen-doc \ +# --disable-doxygen-man \ +# --disable-doxygen-html \ +# --disable-tests \ +# --disable-fortran \ +# --disable-cxx \ +# --enable-shared --disable-static \ +# CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 - name: Install NetCDF From 0609eb8684d71bfbb95a872cda930e9e2852fca7 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 10:31:15 -0500 Subject: [PATCH 39/47] reset5 --- .github/workflows/ubuntu_mpich.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 5ba0046b..dc9ad747 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -73,7 +73,6 @@ jobs: wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz cd hdf5-* - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ -DHDF5_ENABLE_PARALLEL=ON \ -DCMAKE_BUILD_TYPE=Release \ @@ -83,8 +82,6 @@ jobs: -DBUILD_STATIC_LIBS=OFF \ -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc . # -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ - - # ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ # --silent \ # --enable-parallel \ From cce7059e46b059b961bdd2fe26e518ef0a163fbf Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 12:40:38 -0500 Subject: [PATCH 40/47] reset6 --- .github/workflows/ubuntu_mpich.yml | 37 +++++++++++------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index dc9ad747..a3fa78e9 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -73,29 +73,20 @@ jobs: wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz cd hdf5-* - cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ - -DHDF5_ENABLE_PARALLEL=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DHDF5_ALLOW_UNSUPPORTED=ON \ - -DHDF5_ENABLE_THREADSAFE=ON \ - -DBUILD_TESTING=OFF \ - -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc . -# -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF \ -# ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ -# --silent \ -# --enable-parallel \ -# --enable-build-mode=production \ -# --enable-unsupported \ -# --enable-threadsafe \ -# --disable-doxygen-doc \ -# --disable-doxygen-man \ -# --disable-doxygen-html \ -# --disable-tests \ -# --disable-fortran \ -# --disable-cxx \ -# --enable-shared --disable-static \ -# CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ + --silent \ + --enable-parallel \ + --enable-build-mode=production \ + --enable-unsupported \ + --enable-threadsafe \ + --disable-doxygen-doc \ + --disable-doxygen-man \ + --disable-doxygen-html \ + --disable-tests \ + --disable-fortran \ + --disable-cxx \ + --enable-shared --disable-static \ + CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 - name: Install NetCDF From cc363a13fc0b500f8621c138493e0220949f3def Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 13:06:35 -0500 Subject: [PATCH 41/47] reset7 --- .github/workflows/ubuntu_mpich.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index a3fa78e9..4f3a0167 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -73,20 +73,14 @@ jobs: wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz cd hdf5-* - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ + -DHDF5_ENABLE_PARALLEL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DHDF5_ALLOW_UNSUPPORTED=ON \ + -DHDF5_ENABLE_THREADSAFE=ON \ + -DBUILD_TESTING=OFF \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc . make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 - name: Install NetCDF From 448b02a0896a6cdfb3c9c50b49d98a65691bfea1 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 13:54:51 -0500 Subject: [PATCH 42/47] reset8 --- .github/workflows/ubuntu_mpich.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 4f3a0167..bb1c68c9 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -73,6 +73,7 @@ jobs: wget -cq https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz tar -zxf hdf5.tar.gz cd hdf5-* + mkdir build; cd build cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ -DHDF5_ENABLE_PARALLEL=ON \ -DCMAKE_BUILD_TYPE=Release \ @@ -80,7 +81,7 @@ jobs: -DHDF5_ENABLE_THREADSAFE=ON \ -DBUILD_TESTING=OFF \ -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc . + -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 - name: Install NetCDF From f8b3e59e8a50b92cd8e0dcd2fa3761a833d1f445 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 14:08:53 -0500 Subject: [PATCH 43/47] reset9 --- .github/workflows/ubuntu_mpich.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index bb1c68c9..93590c10 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -82,8 +82,7 @@ jobs: -DBUILD_TESTING=OFF \ -DBUILD_STATIC_LIBS=OFF \ -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 + make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} From 0b0be19b9cc78531dac6d00be13791954b3e07cd Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 14:22:43 -0500 Subject: [PATCH 44/47] reset10 --- .github/workflows/ubuntu_mpich.yml | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 93590c10..27fc7a56 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -77,7 +77,7 @@ jobs: cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ -DHDF5_ENABLE_PARALLEL=ON \ -DCMAKE_BUILD_TYPE=Release \ - -DHDF5_ALLOW_UNSUPPORTED=ON \ + -DALLOW_UNSUPPORTED=ON \ -DHDF5_ENABLE_THREADSAFE=ON \ -DBUILD_TESTING=OFF \ -DBUILD_STATIC_LIBS=OFF \ @@ -199,23 +199,16 @@ jobs: rm -rf HDF5 ; mkdir HDF5 git clone --single-branch --branch develop https://github.com/HDFGroup/hdf5.git cd hdf5 - ./autogen.sh - ./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \ - --silent \ - --enable-parallel \ - --enable-build-mode=production \ - --enable-unsupported \ - --enable-threadsafe \ - --disable-doxygen-doc \ - --disable-doxygen-man \ - --disable-doxygen-html \ - --disable-tests \ - --disable-fortran \ - --disable-cxx \ - --enable-shared --disable-static \ - CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc - make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 - make -s -j 4 distclean >> qout 2>&1 + mkdir build; cd build + cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/HDF5 \ + -DHDF5_ENABLE_PARALLEL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DALLOW_UNSUPPORTED=ON \ + -DHDF5_ENABLE_THREADSAFE=ON \ + -DBUILD_TESTING=OFF \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. + make -j2 install - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} From 11c6e0d6baa6abbd5e4b32cfcb0e9709a8dacc3d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 15:41:05 -0500 Subject: [PATCH 45/47] reset11 --- .github/workflows/ubuntu_mpich.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 27fc7a56..f0fcb897 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -81,6 +81,7 @@ jobs: -DHDF5_ENABLE_THREADSAFE=ON \ -DBUILD_TESTING=OFF \ -DBUILD_STATIC_LIBS=OFF \ + -DHDF5_ENABLE_ZLIB_SUPPORT=ON \ -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -j2 install - name: Install NetCDF @@ -207,6 +208,7 @@ jobs: -DHDF5_ENABLE_THREADSAFE=ON \ -DBUILD_TESTING=OFF \ -DBUILD_STATIC_LIBS=OFF \ + -DHDF5_ENABLE_ZLIB_SUPPORT=ON \ -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -j2 install - name: Install NetCDF From 6456d9f6e385d36bde3498436479dcc26e7067cc Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 16:05:23 -0500 Subject: [PATCH 46/47] reset12 --- .github/workflows/ubuntu_mpich.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index f0fcb897..382f8656 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -44,7 +44,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + sudo apt-get install cmake automake autoconf libtool libtool-bin m4 uuid-dev # The MPICH installed on github actions is too slow # sudo apt-get install mpich # mpicc -v @@ -172,7 +172,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev + sudo apt-get install cmake automake autoconf libtool libtool-bin m4 uuid-dev # The MPICH installed on github actions is too slow # sudo apt-get install mpich cmake automake autoconf libtool libtool-bin m4 uuid-dev # mpicc -v From 3ac3810783036c7e5fdfbac4c02e01595eec4b3e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 12 Mar 2025 16:46:43 -0500 Subject: [PATCH 47/47] ld path --- .github/workflows/ubuntu_mpich.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 382f8656..e20ad63d 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -84,6 +84,7 @@ jobs: -DHDF5_ENABLE_ZLIB_SUPPORT=ON \ -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -j2 install + echo "LD_LIBRARY_PATH=${{ github.workspace }}/HDF5/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE} @@ -211,6 +212,7 @@ jobs: -DHDF5_ENABLE_ZLIB_SUPPORT=ON \ -DCMAKE_C_COMPILER=${GITHUB_WORKSPACE}/MPICH/bin/mpicc .. make -j2 install + echo "LD_LIBRARY_PATH=${{ github.workspace }}/HDF5/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Install NetCDF run: | cd ${GITHUB_WORKSPACE}