Skip to content

Commit

Permalink
Make everything gnu14 ready
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <areber@redhat.com>
  • Loading branch information
adrianreber committed Sep 13, 2024
1 parent 147db24 commit 840bd35
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion components/io-libs/phdf5/SPECS/hdf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,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

Expand Down Expand Up @@ -108,7 +108,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/mpi-families/mvapich2/SPECS/mvapich2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ across multiple networks.

%build
%ohpc_setup_compiler
%if "%{compiler_family}" == "gnu12" || "%{compiler_family}" == "gnu13"
%if "%{compiler_family}" == "gnu14" || "%{compiler_family}" == "gnu13"
# configure fails with:
# The Fortran compiler gfortran does not accept programs that
# call the same routine with arguments of different types without
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
2 changes: 1 addition & 1 deletion components/parallel-libs/scalapack/SPECS/scalapack.spec
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export CFLAGS="${CFLAGS} -fsimdmath"
export CFLAGS="${CFLAGS} -Wno-implicit-function-declaration"
export CFLAGS="${CFLAGS} -Wno-implicit-int"
%endif
%if "%{compiler_family}" == "gnu13"
%if "%{compiler_family}" == "gnu14"
module load openblas
# configure fails with:
# The Fortran compiler gfortran does not accept programs that
Expand Down
4 changes: 2 additions & 2 deletions components/perf-tools/geopm/SPECS/geopm.spec
Original file line number Diff line number Diff line change
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

0 comments on commit 840bd35

Please sign in to comment.