Skip to content

Commit

Permalink
Add IntelLLVM support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Nov 9, 2023
1 parent 377b967 commit fe26f33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/Intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ defaults:
jobs:
Intel:
runs-on: ubuntu-latest
env:
CC: icc
FC: ifort
strategy:
matrix:
compilers: ["CC=icc FC=ifort", "CC=icx FC=ifx"]

steps:

Expand All @@ -34,24 +34,18 @@ jobs:
# See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libmpich-dev
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
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
sudo apt-get install intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
- name: build_wrf_io
run: |
set -x
cd wrf_io
mkdir build
cd build
cmake ..
make VERBOSE=1
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
"MinSizeRel" "RelWithDebInfo")
endif()

if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU)$")
if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM|GNU)$")
message(WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}")
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NetCDF_VERSION VERSION_GREATER_EQUAL 4)
USE_NETCDF4_FEATURES)
endif()

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "-fpp -g -traceback -fp-model source -ftz -assume byterecl -convert big_endian -heap-arrays -nostdinc ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -w")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0")
Expand Down

0 comments on commit fe26f33

Please sign in to comment.