From b3f221185e1d4c56bbb38c8b7669beec2885bb06 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 2 Aug 2022 13:02:00 -0700 Subject: [PATCH] butterflypack %oneapi: patch CMakeLists to solve issue #31818 (#31848) * butterflypack %oneapi: patch CMakeLists to solve issue #31818 * uncomment builds affected by failing butterflypack Co-authored-by: e --- .../cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 5 ++--- .../repos/builtin/packages/butterflypack/package.py | 3 +++ .../packages/butterflypack/qopenmp-for-oneapi.patch | 12 ++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/butterflypack/qopenmp-for-oneapi.patch diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 6a83073585..3690add102 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -102,6 +102,7 @@ spack: - argobots - bolt - bricks + - butterflypack - cabana - caliper - chai ~benchmarks ~tests @@ -158,6 +159,7 @@ spack: - slate ~cuda - slepc - stc + - strumpack ~slate - sundials - superlu-dist - superlu @@ -188,7 +190,6 @@ spack: #- archer@2.0.0 # binutils #- ascent@0.8.0 # vtk-m #- axom@0.6.1 # axom - #- butterflypack@2.1.1 # butterflypack #- charliecloud@0.26 # charliecloud #- dyninst@12.1.0 # intel-tbb #- exaworks@0.1.0 # rust, flux-sched @@ -207,7 +208,6 @@ spack: #- py-warpx@22.05 ^warpx dims=2 # adios2 #- py-warpx@22.05 ^warpx dims=3 # adios2 #- py-warpx@22.05 ^warpx dims=rz # adios2 - #- strumpack@6.3.1 ~slate # butterflypack #- tau@2.31 +mpi +python # binutils #- unifyfs@0.9.2 # unifyfs #- variorum@0.4.1 # variorum @@ -218,7 +218,6 @@ spack: # axom: /usr/bin/ld: /lib/x86_64-linux-gnu/crt1.o: in function `_start': (.text+0x24): undefined reference to `main' # binutils: gold/powerpc.cc:3590: undefined reference to `gold::Sized_symbol<64>::Value_type gold::Symbol_table::compute_final_value<64>(gold::Sized_symbol<64> const*, gold::Symbol_table::Compute_final_value_status*) const' # boost@1.79.0 cxxstd=17: clang++: error: unsupported argument 'h-create' to option '-pc'; clang++: error: no such file or directory: 'bin.v2/libs/math/build/intel-linux-2022.1.0/release/cxxstd-17-iso/threading-multi/visibility-hidden/pch.pchi' - # butterflypack: SRC_COMPLEX/cMAGMA_utilities.f90(353): error #5192: Lead underscore not allowed # charliecloud: autoreconf phase: RuntimeError: configure script not found in ... # flux-sched: include/yaml-cpp/emitter.h:164:9: error: comparison with NaN always evaluates to false in fast floating point modes [-Werror,-Wtautological-constant-compare] # flux-sched: include/yaml-cpp/emitter.h:171:24: error: comparison with infinity always evaluates to false in fast floating point modes [-Werror,-Wtautological-constant-compare] diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py index 6459f6ed50..624be61b2f 100644 --- a/var/spack/repos/builtin/packages/butterflypack/package.py +++ b/var/spack/repos/builtin/packages/butterflypack/package.py @@ -44,6 +44,9 @@ class Butterflypack(CMakePackage): depends_on("scalapack") depends_on("arpack-ng") + # https://github.com/spack/spack/issues/31818 + patch("qopenmp-for-oneapi.patch", when="@2.1.1 %oneapi") + patch("longline.patch", when="%fj") patch("fjfortran.patch", when="%fj") patch("isnan.patch", when="%fj") diff --git a/var/spack/repos/builtin/packages/butterflypack/qopenmp-for-oneapi.patch b/var/spack/repos/builtin/packages/butterflypack/qopenmp-for-oneapi.patch new file mode 100644 index 0000000000..30272afce3 --- /dev/null +++ b/var/spack/repos/builtin/packages/butterflypack/qopenmp-for-oneapi.patch @@ -0,0 +1,12 @@ +diff -ruN spack-src/CMakeLists.txt spack-src-patched/CMakeLists.txt +--- spack-src/CMakeLists.txt 2022-03-04 09:05:03.000000000 -0800 ++++ spack-src-patched/CMakeLists.txt 2022-08-01 13:04:11.771748644 -0700 +@@ -99,7 +99,7 @@ + set(CMAKE_Fortran_FLAGS "-fno-range-check -fbacktrace -fbounds-check -Wconversion ${CMAKE_Fortran_FLAGS}") + endif() + endif() +-check_fortran_compiler_flag("-no-prec-div" COMPILER_Intel) ++check_fortran_compiler_flag("-qopenmp" COMPILER_Intel) + if (COMPILER_Intel) + set(CMAKE_Fortran_FLAGS "-cpp -DIntel ${CMAKE_Fortran_FLAGS}") + if(CMAKE_BUILD_TYPE STREQUAL "Debug")