Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IntelLLVM support #536

Merged
merged 34 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1f7bb78
Add IntelLLVM support
AlexanderRichert-NOAA Nov 10, 2023
4dbd728
Add 'int()' to some input params in bufr_c2f_interface
AlexanderRichert-NOAA Nov 13, 2023
d5c9af6
r8val needs kind=8
AlexanderRichert-NOAA Nov 13, 2023
0e49791
Use f2py directly through cmake (no distutils/setuptools/etc.)
AlexanderRichert-NOAA Nov 14, 2023
66745b5
remove unneeded python installs in CI
AlexanderRichert-NOAA Nov 14, 2023
e358182
fix intel compiler versions
AlexanderRichert-NOAA Nov 22, 2023
c48aaeb
Update macOS CI (use Python 3.11)
AlexanderRichert-NOAA Nov 24, 2023
da38188
ibfms is real, not int
AlexanderRichert-NOAA Nov 28, 2023
aae48dd
Merge branch 'develop' into ci_updates_nov2023
AlexanderRichert-NOAA Nov 28, 2023
3efa055
Update MacOS.yml
AlexanderRichert-NOAA Nov 28, 2023
2472e68
debug
AlexanderRichert-NOAA Nov 28, 2023
9be0555
Update MacOS.yml
AlexanderRichert-NOAA Nov 28, 2023
5198f15
Update MacOS.yml (debug)
AlexanderRichert-NOAA Nov 28, 2023
faf983c
Update CMakeLists.txt (debug)
AlexanderRichert-NOAA Nov 28, 2023
b10f532
Update MacOS.yml (debug)
AlexanderRichert-NOAA Nov 28, 2023
9521376
Update CMakeLists.txt
AlexanderRichert-NOAA Nov 28, 2023
db6c2c1
Update MacOS.yml debug
AlexanderRichert-NOAA Nov 28, 2023
c9685ef
Update MacOS.yml debug
AlexanderRichert-NOAA Nov 28, 2023
554f3b7
Update CMakeLists.txt
AlexanderRichert-NOAA Nov 28, 2023
1ffbfd5
Update CMakeLists.txt
AlexanderRichert-NOAA Nov 28, 2023
5c30faa
Update CMakeLists.txt
AlexanderRichert-NOAA Nov 28, 2023
331fbdb
Update CMakeLists.txt
AlexanderRichert-NOAA Nov 28, 2023
b1727ed
Merge branch 'develop' into ci_updates_nov2023
AlexanderRichert-NOAA Dec 5, 2023
60a7abb
Merge branch 'develop' into ci_updates_nov2023
AlexanderRichert-NOAA Jun 25, 2024
6b1b156
Update Intel.yml to use 2024.2.0
AlexanderRichert-NOAA Jun 25, 2024
9891eb7
Intel.yml: set oneapi and classic versions separately
AlexanderRichert-NOAA Jun 25, 2024
8c9f20f
revert bufr_c2f_interface.F90 changes
AlexanderRichert-NOAA Jun 25, 2024
5fc3a86
Update bufr_c2f_interface.F90
AlexanderRichert-NOAA Jun 25, 2024
20384af
Update bufr_c2f_interface.F90
AlexanderRichert-NOAA Jun 25, 2024
ea21591
Update MacOS.yml
AlexanderRichert-NOAA Jun 25, 2024
13b5264
try reverting python changes
AlexanderRichert-NOAA Jun 25, 2024
84821b6
require >=2024.2 for IntelLLVM
AlexanderRichert-NOAA Jun 25, 2024
123a79e
revert MacOS.yml changes
AlexanderRichert-NOAA Jun 25, 2024
4a7a40c
update spack recipe for oneapi conflict
AlexanderRichert-NOAA Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/Intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,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 @@ -36,7 +36,11 @@ jobs:
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-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1
if [ "${{ matrix.compilers }}" == "CC=icx FC=ifx" ]; then
sudo apt-get install intel-oneapi-compiler-fortran-2024.2 intel-oneapi-dpcpp-cpp-2024.2
else
sudo apt-get install intel-oneapi-openmp intel-oneapi-compiler-fortran-2023.2.1 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1
fi
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile

- name: checkout
Expand All @@ -57,7 +61,7 @@ jobs:
cd bufr
mkdir build
cd build
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_INSTALL_PREFIX=./install -DENABLE_PYTHON=OFF ..
${{ matrix.compilers }} cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_INSTALL_PREFIX=./install -DENABLE_PYTHON=OFF ..
make -j2 VERBOSE=1
make install

Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ project(
VERSION ${pVersion}
LANGUAGES C Fortran)

if(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM")
message(STATUS ${CMAKE_Fortran_COMPILER_VERSION})
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 2024.2)
message(FATAL_ERROR "IntelLLVM (OneAPI) version must be 2024.2 or greater")
endif()
endif()

# Handle user options.
option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF)
option(ENABLE_PYTHON "Enable building python module 'ncepbufr'" OFF)
Expand Down Expand Up @@ -81,7 +88,7 @@ endif()
list(APPEND kinds "4")

# Set common to the package compiler flags
if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_C_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -traceback")
set(CMAKE_C_FLAGS_DEBUG "-O0")
set(CMAKE_C_FLAGS_RELEASE "-O3")
Expand All @@ -92,7 +99,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU)$")
endif()

# Even if we only build _4 version of the library, we still need the _8 and _d flags when building the test codes
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(fortran_8_flags "-r8 -i8")
set(fortran_d_flags "-r8")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
Expand Down
2 changes: 2 additions & 0 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class Bufr(CMakePackage):
depends_on("py-pip", type="build", when="+python")
depends_on("py-wheel", type="build", when="+python")

conflicts("%oneapi@:2024.1", msg="Requires oneapi 2024.2 or later")

def url_for_version(self, version):
pre = "bufr_" if version < Version("12.0.1") else ""
return (
Expand Down
Loading