diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e231eab..937f7b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,23 +15,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12] - compiler: [gfortran-9, gfortran-10, gfortran-11, gfortran-12] + os: [ubuntu-22.04, macos-11, macos-12] + compiler: [gfortran-10, gfortran-11, gfortran-12, gfortran-13] exclude: - - os: ubuntu-20.04 - compiler: gfortran-11 - - os: ubuntu-20.04 - compiler: gfortran-12 - - os: ubuntu-22.04 - compiler: gfortran-9 - os: macos-11 - compiler: gfortran-12 - - os: macos-12 - compiler: gfortran-9 + compiler: gfortran-13 - os: macos-12 compiler: gfortran-10 - - os: macos-12 - compiler: gfortran-12 # fail-fast if set to 'true' here is good for production, but when # debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails @@ -52,37 +42,43 @@ jobs: name: ${{ matrix.os }} / ${{ matrix.compiler }} steps: - - name: Install GCC 12 on Ubuntu 22.04 - if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'gfortran-12' - run: | - sudo apt-get install gfortran-12 -y - name: Compiler Versions run: | ${FC} --version cmake --version + - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 1 + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + - name: Build GFE Prereqs run: | bash ./tools/ci-install-gfe.bash + - name: Build pFlogger run: | mkdir -p build cd build cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/pFlogger -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE make -j$(nproc) + - name: Build Tests run: | cd build make -j$(nproc) tests + - name: Run Tests run: | cd build ctest -j1 --output-on-failure --repeat until-pass:4 + - name: Archive log files on failure - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: logfiles @@ -93,49 +89,72 @@ jobs: runs-on: ubuntu-20.04 env: - FC: ifort - CC: icc + FC: ifx + CC: icx name: Intel Fortran steps: - - name: Install Intel compilers + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Setup Intel oneAPI repository run: | - cd /tmp wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" - sudo apt install --no-install-recommends intel-oneapi-compiler-fortran intel-oneapi-mpi \ - intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi-devel + sudo apt-get update + + - name: Install Intel oneAPI compilers + timeout-minutes: 5 + run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp + + # optional + - name: Install Intel MPI + timeout-minutes: 5 + run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel + + - name: Setup Intel oneAPI environment + run: | source /opt/intel/oneapi/setvars.sh printenv >> $GITHUB_ENV - - name: Compiler Versions + printenv | grep intel + + - name: Versions run: | ${FC} --version + ${CC} --version + mpirun --version cmake --version - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 + - name: Build GFE Prereqs run: | bash ./tools/ci-install-gfe.bash + - name: Build pFlogger run: | mkdir -p build cd build - cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/yaFyaml -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/pFlogger -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE make -j$(nproc) + - name: Build Tests run: | cd build make -j$(nproc) tests + - name: Run Tests run: | cd build ctest -j1 --output-on-failure --repeat until-pass:4 + - name: Archive log files on failure - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: logfiles diff --git a/CMakeLists.txt b/CMakeLists.txt index ef08395..20c7d17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ # ------------------------------------------------------------------------ # cmake_minimum_required (VERSION 3.12) project (PFLOGGER - VERSION 1.11.0 + VERSION 1.12.0 LANGUAGES Fortran) set (CMAKE_MODULE_PATH @@ -43,7 +43,10 @@ if (NOT TARGET YAFYAML::yafyaml) find_package (YAFYAML REQUIRED VERSION 1.1.0) endif () -find_package (MPI QUIET) +option (ENABLE_MPI "Enable MPI support" ON) +if (ENABLE_MPI) + find_package (MPI QUIET) +endif () find_package (PFUNIT QUIET) #----------------------------------- diff --git a/ChangeLog.md b/ChangeLog.md index a6b6ad1..f6fd87b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.12.0] - 2024-01-25 + +### Changed + +- Add new `ENABLE_MPI` option to allow disabling MPI support (#106). By default, MPI is enabled to maintain backward compatibility. + ## [1.11.0] - 2023-11-29 ### Fixed