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

Make everything gnu14 ready #2009

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions components/dev-tools/scipy/SPECS/python-scipy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion components/io-libs/phdf5/SPECS/hdf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions components/io-libs/sionlib/SPECS/sionlib.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/parallel-libs/mumps/SPECS/mumps.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions components/perf-tools/geopm/SPECS/geopm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -87,15 +87,15 @@ 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"
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
Expand Down
10 changes: 5 additions & 5 deletions components/perf-tools/scorep/SPECS/scorep.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion tests/perf-tools/geopm/tests/rm_execution
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading