From 5cb5374fc03fbdbe804dc58a8e9eaf0f2b10f4a1 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Fri, 13 Sep 2024 12:46:40 +0000 Subject: [PATCH] Make everything gnu14 ready Signed-off-by: Adrian Reber --- .github/workflows/validate.yml | 2 ++ components/dev-tools/scipy/SPECS/python-scipy.spec | 9 +++++++-- components/io-libs/phdf5/SPECS/hdf5.spec | 4 +++- components/io-libs/sionlib/SPECS/sionlib.spec | 4 ++-- components/parallel-libs/mumps/SPECS/mumps.spec | 2 +- components/perf-tools/geopm/SPECS/geopm.spec | 6 +++--- components/perf-tools/scorep/SPECS/scorep.spec | 10 +++++----- tests/perf-tools/geopm/tests/rm_execution | 9 ++++++++- 8 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index c545506aa0..0d7765b231 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -89,6 +89,7 @@ jobs: run: | if [ "${{ matrix.compiler }}" == "intel" ]; then export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }} components/serial-libs/openblas/SPECS/openblas.spec" + export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/dev-tools/scipy/SPECS/python-scipy.spec" fi . /etc/profile.d/lmod.sh tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }} --compiler-family ${{ matrix.compiler }} @@ -139,6 +140,7 @@ jobs: export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}" if [ "${{ matrix.compiler }}" == "intel" ]; then export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/serial-libs/openblas/SPECS/openblas.spec" + export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/dev-tools/scipy/SPECS/python-scipy.spec" fi . /etc/profile.d/lmod.sh chown ohpc -R tests diff --git a/components/dev-tools/scipy/SPECS/python-scipy.spec b/components/dev-tools/scipy/SPECS/python-scipy.spec index d63a14b74f..9f65307e39 100644 --- a/components/dev-tools/scipy/SPECS/python-scipy.spec +++ b/components/dev-tools/scipy/SPECS/python-scipy.spec @@ -14,7 +14,7 @@ %define ohpc_python_dependent 1 %include %{_sourcedir}/OHPC_macros -%global gnu_family gnu13 +%global gnu_family gnu14 %if "%{compiler_family}" != "intel" && "%{compiler_family}" != "arm" BuildRequires: openblas-%{compiler_family}%{PROJ_DELIM} @@ -79,9 +79,13 @@ find . -type f -name "*.py" -exec sed -i "s|#!/usr/bin/env python3||" {} \; # OpenHPC compiler/mpi designation %ohpc_setup_compiler +export CFLAGS="${CFLAGS} -fno-strict-aliasing" + %if "%{compiler_family}" != "intel" && "%{compiler_family}" != "arm" module load openblas module load fftw +export CFLAGS="${CFLAGS} -Wno-implicit-int" +export CFLAGS="${CFLAGS} -Wno-incompatible-pointer-types" %endif module load %{python_module_prefix}numpy @@ -114,7 +118,6 @@ include_dirs = $OPENBLAS_INC EOF %endif -CFLAGS="%{optflags} -fno-strict-aliasing" \ %if "%{compiler_family}" == "intel" LDSHARED="icc -shared" \ %__python setup.py config --compiler=intelm --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem build @@ -140,6 +143,8 @@ LDFLAGS="-shared -rtlib=compiler-rt -lm" \ %if "%{compiler_family}" == "%{gnu_family}" module load openblas +export CFLAGS="${CFLAGS} -Wno-implicit-int" +export CFLAGS="${CFLAGS} -Wno-incompatible-pointer-types" %endif module load %{python_module_prefix}numpy diff --git a/components/io-libs/phdf5/SPECS/hdf5.spec b/components/io-libs/phdf5/SPECS/hdf5.spec index 8d243e933e..d8b2030148 100644 --- a/components/io-libs/phdf5/SPECS/hdf5.spec +++ b/components/io-libs/phdf5/SPECS/hdf5.spec @@ -27,6 +27,8 @@ URL: http://www.hdfgroup.org/HDF5 Source0: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/%{pname}-%{version}/src/%{pname}-%{version}.tar.bz2 BuildRequires: zlib-devel make +BuildRequires: perl(File::Compare) +BuildRequires: perl(File::Copy) %if "%{compiler_family}" == "intel" BuildRequires: libtool%{PROJ_DELIM} @@ -70,7 +72,7 @@ export MPICC=mpicc export MPIFC=mpifc export MPICXX=mpicxx -%if "%{mpi_family}" == "impi" && "%{compiler_family}" == "gnu13" +%if "%{mpi_family}" == "impi" && "%{compiler_family}" == "gnu14" # This is not really the perfect solution, but impi does not have # the necessary files for gfortran 12. It seems to work with # the files from gfortran 11.1.0. diff --git a/components/io-libs/sionlib/SPECS/sionlib.spec b/components/io-libs/sionlib/SPECS/sionlib.spec index 4b741c5c2b..9a60d252d4 100644 --- a/components/io-libs/sionlib/SPECS/sionlib.spec +++ b/components/io-libs/sionlib/SPECS/sionlib.spec @@ -64,7 +64,7 @@ CONFIGURE_OPTIONS="--compiler=arm " %if "%{compiler_family}" == "llvm" CONFIGURE_OPTIONS="--compiler=llvm " %endif -%if "%{compiler_family}" == "gnu13" +%if "%{compiler_family}" == "gnu14" CONFIGURE_OPTIONS="--compiler=gnu " %endif %if "%{compiler_family}" == "gnu14" @@ -111,7 +111,7 @@ sed -i "s/-mieee-fp//g;s/-wd161//g;" build-*/Makefile.defs sed -i 's/$(CPP)/ifx/g' src/fortraninterface/Makefile %endif -%if "%{compiler_family}" == "gnu13" +%if "%{compiler_family}" == "gnu14" sed -i 's/FFLAGS.*/& -fallow-argument-mismatch/g' build-*/Makefile.defs sed -i 's/F90FLAGS.*/& -fallow-argument-mismatch/g' build-*/Makefile.defs sed -i 's/F90 .*/& -fallow-argument-mismatch/g' build-*/Makefile.defs diff --git a/components/parallel-libs/mumps/SPECS/mumps.spec b/components/parallel-libs/mumps/SPECS/mumps.spec index cc8803bd8c..31ea9df37d 100644 --- a/components/parallel-libs/mumps/SPECS/mumps.spec +++ b/components/parallel-libs/mumps/SPECS/mumps.spec @@ -13,7 +13,7 @@ %define ohpc_mpi_dependent 1 %include %{_sourcedir}/OHPC_macros -%global gnu_family gnu13 +%global gnu_family gnu14 # Base package name %define pname mumps diff --git a/components/perf-tools/geopm/SPECS/geopm.spec b/components/perf-tools/geopm/SPECS/geopm.spec index e581712c2a..d916225262 100644 --- a/components/perf-tools/geopm/SPECS/geopm.spec +++ b/components/perf-tools/geopm/SPECS/geopm.spec @@ -27,7 +27,7 @@ Release: 1 License: BSD-3-Clause Group: %{PROJ_NAME}/perf-tools URL: https://geopm.github.io -Source0: https://github.com/geopm/geopm/releases/download/v%{version}/geopm-%{version}.tar.gz +Source0: https://github.com/geopm/geopm/archive/refs/tags/v%{version}.tar.gz # Based on https://patch-diff.githubusercontent.com/raw/geopm/geopm/pull/1141.patch Patch0: gnu12.patch Patch1: https://github.com/geopm/geopm/commit/4b70c27c058fc826270a487778226f4719a1df8a.patch @@ -87,7 +87,7 @@ including support for static control. %build %ohpc_setup_compiler -%if "%{compiler_family}" == "gnu13" +%if "%{compiler_family}" == "gnu14" export CFLAGS="$CFLAGS -Wno-error=stringop-truncation" %endif %if "%{compiler_family}" == "intel" @@ -95,7 +95,7 @@ export CXXFLAGS="${CXXFLAGS} -Wno-error" %endif ./autogen.sh -%if "%{mpi_family}" == "impi" && "%{compiler_family}" == "gnu13" +%if "%{mpi_family}" == "impi" && "%{compiler_family}" == "gnu14" # The combination of impi and GCC 12 does not work as # expected and needs these additional fixes. sed -e 's,\sFFLAGS=$MPI_F77FLAGS,FFLAGS="-I$MPI_DIR/include $MPI_F77FLAGS",g' -i configure diff --git a/components/perf-tools/scorep/SPECS/scorep.spec b/components/perf-tools/scorep/SPECS/scorep.spec index 1161055194..adf9e2333f 100644 --- a/components/perf-tools/scorep/SPECS/scorep.spec +++ b/components/perf-tools/scorep/SPECS/scorep.spec @@ -151,14 +151,14 @@ make V=1 %{?_smp_mflags} # GNU compilers bring their own libstdc++, which is required for C++ # code to work correctly. Due to rpathing issues however, Score-P # causes the wrong libstdc++ to be linked (the system one instead of -# the gnu13 installation). This causes issues when running code. +# the gnu14 installation). This causes issues when running code. # This will be fixed in Score-P v9.0. Until then, fix the paths # manually be replacing the added /usr/lib64 and /lib64 library paths -# by the gnu13 ones. We need to do this after make, since it is +# by the gnu14 ones. We need to do this after make, since it is # generated during the build process. -%if "%{compiler_family}" == "gnu13" -%{__sed} -i -e 's#"/lib64"#"/opt/ohpc/pub/compiler/gcc/13.2.0/lib64"#g' src/scorep_config_library_dependencies_backend_inc.hpp -%{__sed} -i -e 's#"/usr/lib64"#"/opt/ohpc/pub/compiler/gcc/13.2.0/lib/../lib64"#g' src/scorep_config_library_dependencies_backend_inc.hpp +%if "%{compiler_family}" == "gnu14" +%{__sed} -i -e 's#"/lib64"#"/opt/ohpc/pub/compiler/gcc/14.2.0/lib64"#g' src/scorep_config_library_dependencies_backend_inc.hpp +%{__sed} -i -e 's#"/usr/lib64"#"/opt/ohpc/pub/compiler/gcc/14.2.0/lib/../lib64"#g' src/scorep_config_library_dependencies_backend_inc.hpp make V=1 %{?_smp_mflags} %endif diff --git a/tests/perf-tools/geopm/tests/rm_execution b/tests/perf-tools/geopm/tests/rm_execution index 67dfbd1328..a9abe57736 100755 --- a/tests/perf-tools/geopm/tests/rm_execution +++ b/tests/perf-tools/geopm/tests/rm_execution @@ -8,7 +8,14 @@ if [ -s ./common/TEST_ENV ];then source ./common/TEST_ENV fi -check_rms +setup() { + if [ -n "$SIMPLE_CI" ]; then + skip "Not supported in simple CI setup" + fi + + check_rms +} + rm=$RESOURCE_MANAGER testname="perf-tools/geopm"