From 56e15d880369af911ca8100a227bbe35191540b2 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sat, 5 Dec 2020 13:14:07 +0100 Subject: [PATCH 1/2] Improve check for F18 error stop - ifort 21.1 BETA 20200827 compiles F18 error stop syntax but does not propagate the error code correctly --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6143b5ab5..989b40c6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ endif() # --- compiler feature checks include(CheckFortranSourceCompiles) include(CheckFortranSourceRuns) -check_fortran_source_compiles("error stop i; end" f18errorstop SRC_EXT f90) +check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90) check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90) check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128) From fd60ef01bf3c347ca79da6385beeefafd8e2ffa5 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sun, 22 Nov 2020 21:55:22 +0100 Subject: [PATCH 2/2] Add CI for Intel oneAPI compiler --- .github/workflows/CI.yml | 56 ++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 4 ++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index eeac03544..587fb5762 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -85,3 +85,59 @@ jobs: make -f Makefile.manual FYPPFLAGS="-DMAXRANK=4" make -f Makefile.manual test make -f Makefile.manual clean + + intel-build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04] + fc: [ifort] + env: + FC: ${{ matrix.fc }} + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Set up Python 3.x + uses: actions/setup-python@v1 + with: + python-version: 3.x + + - name: Install CMake Linux + if: contains(matrix.os, 'ubuntu') + run: ci/install_cmake.sh + + - name: Add Intel repository + if: contains(matrix.os, 'ubuntu') + run: | + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update + + - name: Install Intel oneAPI compiler + if: contains(matrix.os, 'ubuntu') + run: | + sudo apt-get install intel-oneapi-ifort + source /opt/intel/oneapi/setvars.sh + printenv >> $GITHUB_ENV + + - name: Install fypp + run: pip install --upgrade fypp + + - name: Configure with CMake + run: cmake -Wdev -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAXIMUM_RANK=4 -S . -B build + + - name: Build and compile + run: cmake --build build + + - name: catch build fail + run: cmake --build build --verbose --parallel 1 + if: failure() + + - name: test + run: ctest --parallel --output-on-failure + working-directory: build diff --git a/CMakeLists.txt b/CMakeLists.txt index 989b40c6c..d62689913 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) endif() elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) add_compile_options(-warn declarations,general,usage,interfaces,unused) - add_compile_options(-standard-semantics) + if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 20.2.1.20200827) + add_compile_options(-standard-semantics) + endif() if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) add_compile_options(-stand f15) else()