Name: libocca Version: 2.0.0 Release: 0.1%{?dist} Summary: Portable and vendor neutral framework for parallel programming on heterogeneous platforms License: MIT URL: https://github.com/libocca/occa Source0: https://github.com/libocca/occa/archive/v%{version}/occa-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: ocl-icd-devel %description OCCA is an open source, portable, and vendor neutral framework for parallel programming on heterogeneous platforms. The OCCA API provides unified models for heterogeneous programming concepts—such as a device, memory, or kernel—while the OCCA Kernel Language (OKL) enables the creation of portable device kernels using a directive-based extension to the C-language. Mission critical computational science and engineering applications from the public and private sectors rely on OCCA. Notable users include the U.S. Department of Energy and Shell. Key Features: - Multiple backends—including CUDA, HIP, Data Parallel C++, OpenCL, OpenMP (CPU), and Metal - JIT compilation and caching of kernels - C, C++, and Fortran language support - Interoperability with backend API and kernels - Transparency—easy to understand how your code is mapped to each platform %package devel Summary: Development package for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Files for development with %{name}. %prep %autosetup -p1 -n occa-%{version} %build cmake -S . -B redhat-linux-build \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr/ \ -DCMAKE_C_COMPILER="gcc" \ -DCMAKE_CXX_COMPILER="g++" \ -DCMAKE_Fortran_COMPILER="gfortran" \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ -DCMAKE_C_FLAGS="${CFLAGS}" \ -DCMAKE_Fortran_FLAGS="${FFLAGS}" \ -DOCCA_ENABLE_OPENMP:BOOL=ON \ -DOCCA_ENABLE_OPENCL:BOOL=ON \ -DOCCA_ENABLE_DPCPP:BOOL=OFF \ -DOCCA_ENABLE_CUDA:BOOL=OFF \ -DOCCA_ENABLE_HIP:BOOL=OFF \ -DOCCA_ENABLE_METAL:BOOL=OFF \ -DOCCA_ENABLE_FORTRAN:BOOL=OFF \ -DOCCA_ENABLE_TESTS:BOOL=OFF \ -DOCCA_ENABLE_EXAMPLES:BOOL=OFF %cmake_build %install mkdir -p %{buildroot}/%{_bindir}/ mkdir -p %{buildroot}/%{_libdir}/ mkdir -p %{buildroot}/%{_includedir}/ mkdir -p %{buildroot}/%{_includedir}/occa/defines/ mkdir -p %{buildroot}/%{_includedir}/codegen/ install -p redhat-linux-build/bin/occa %{buildroot}/%{_bindir}/ install -p redhat-linux-build/lib/libocca.so %{buildroot}/%{_libdir}/ # install -p include/occa.* %{buildroot}/%{_includedir}/ install -p include/occa/defines/* %{buildroot}/%{_includedir}/occa/defines/ #install -p include/codegen/* %{buildroot}/%{_includedir}/codegen/ %ldconfig_scriptlets %files %license LICENSE %{_bindir}/occa %{_libdir}/libocca.so %files devel %{_includedir}/occa/ #%{_includedir}/occa.* %changelog * Wed May 29 2024 Peter Robinson 0.12.0-1 - Initial package