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

Update Autotools to correctly configure oneAPI #3751

Merged
merged 4 commits into from
Oct 23, 2023
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
42 changes: 26 additions & 16 deletions config/apple
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,19 @@ fi
# Figure out C compiler flags
. $srcdir/config/gnu-flags
. $srcdir/config/clang-flags
. $srcdir/config/oneapi-flags
. $srcdir/config/intel-flags

# temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not
# use -O option as it causes failures in test/dt_arith.
case "$host_os" in
darwin1[12].*) # lion & mountain lion
#echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
case "$cc_vendor-$cc_version" in
gcc-4.2.1)
# Remove any -O flags
#echo PROD_CFLAGS=$PROD_CFLAGS
PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`"
#echo new PROD_CFLAGS=$PROD_CFLAGS
;;
esac
;;
esac
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only is this ancient, we recently fixed the underlying problem.


if test "X-" = "X-$FC"; then
case $CC_BASENAME in
gcc*)
FC=gfortran
FC_BASENAME=gfortran
;;
icx*)
FC=ifx
FC_BASENAME=ifx
;;
icc*)
FC=ifort
FC_BASENAME=ifort
Expand All @@ -97,6 +86,7 @@ fi

# Figure out FORTRAN compiler flags
. $srcdir/config/gnu-fflags
. $srcdir/config/oneapi-fflags
. $srcdir/config/intel-fflags


Expand All @@ -107,6 +97,10 @@ if test "X-" = "X-$CXX"; then
CXX=g++
CXX_BASENAME=g++
;;
icx)
CXX=icpx
CXX_BASENAME=icpx
;;
icc)
CXX=icpc
CXX_BASENAME=icpc
Expand All @@ -123,6 +117,7 @@ if test "X-" = "X-$CXX"; then
fi

# Figure out C++ compiler flags
. $srcdir/config/oneapi-cxxflags
. $srcdir/config/intel-cxxflags # Do this ahead of GNU to avoid icpc being detected as g++
. $srcdir/config/gnu-cxxflags
. $srcdir/config/clang-cxxflags
Expand All @@ -139,6 +134,11 @@ case $CC in
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
;;

*icx*)
cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;

*icc*)
cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
Expand All @@ -156,6 +156,11 @@ case $FC in
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
;;

*ifx*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;

*ifc*|*ifort*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
Expand All @@ -179,6 +184,11 @@ case $CXX in
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
;;

*icpx*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;

*icpc*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
Expand Down
16 changes: 13 additions & 3 deletions config/freebsd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ fi
# Figure out GNU C compiler flags
. $srcdir/config/gnu-flags

# Figure out Intel C compiler flags
# Figure out Intel oneAPI C compiler flags
. $srcdir/config/oneapi-flags

# Figure out Intel classic C compiler flags
. $srcdir/config/intel-flags

# The default Fortran 90 compiler
Expand All @@ -43,6 +46,10 @@ if test "X-" = "X-$FC"; then
FC=gfortran
FC_BASENAME=gfortran
;;
icx*)
FC=ifx
FC_BASENAME=ifx
;;
icc*)
FC=ifort
FC_BASENAME=ifort
Expand All @@ -57,8 +64,11 @@ fi
# Figure out FORTRAN compiler flags
. $srcdir/config/gnu-fflags

# Figure out Intel F90 compiler flags
. $srcdir/config/intel-fflags
# Figure out Intel oneAPI FC compiler flags
. $srcdir/config/oneapi-fflags

# Figure out Intel classic FC compiler flags
. $srcdir/config/classic-fflags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file doesn't exist in repo

balay@pj01:~/tmp/hdf5$ git co -q a6d1bda6d2d 
balay@pj01:~/tmp/hdf5$ git ls-files |grep classic-fflags
balay@pj01:~/tmp/hdf5$ 

On fbsd with hdf5-1.14.3

checking for config freebsd12.1... no
checking for config freebsd... found
compiler '/home/svcpetsc/petsc-hash-pkgs/39f577/bin/mpicc' is GNU gcc-9.2.0
compiler '/home/svcpetsc/petsc-hash-pkgs/39f577/bin/mpif90' is GNU gfortran-9.2.0.: cannot open ./config/classic-fflags: No such file or directory

                    Output in config.log for HDF5: This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the following fix?

#3883


# The default C++ compiler

Expand Down
33 changes: 30 additions & 3 deletions config/linux-gnulibc1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ fi
# Figure out CCE C compiler flags
. $srcdir/config/cce-flags

# Figure out Intel C compiler flags
# Figure out Intel oneAPI C compiler flags
. $srcdir/config/oneapi-flags

# Figure out Intel classic C compiler flags
. $srcdir/config/intel-flags

# Figure out Clang C compiler flags
Expand All @@ -55,6 +58,10 @@ if test "X-" = "X-$FC"; then
FC=pgf90
FC_BASENAME=pgf90
;;
icx*)
FC=ifx
FC_BASENAME=ifx
;;
icc*)
FC=ifort
FC_BASENAME=ifort
Expand Down Expand Up @@ -119,7 +126,10 @@ fi
# Figure out CCE FC compiler flags
. $srcdir/config/cce-fflags

# Figure out Intel FC compiler flags
# Figure out Intel oneAPI FC compiler flags
. $srcdir/config/oneapi-fflags

# Figure out Intel classic FC compiler flags
. $srcdir/config/intel-fflags

# Figure out Clang FC compiler flags
Expand Down Expand Up @@ -200,7 +210,10 @@ if test -z "$CXX"; then
CXX_BASENAME=g++
fi

# Figure out Intel CXX compiler flags
# Figure out Intel oneAPI CXX compiler flags
. $srcdir/config/oneapi-cxxflags

# Figure out Intel classic CXX compiler flags
# Do this ahead of GNU to avoid icpc being detected as g++
. $srcdir/config/intel-cxxflags

Expand Down Expand Up @@ -237,6 +250,11 @@ case $CC in
cc_version_info=`echo $cc_version_info`
;;

*icx*)
cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;

*icc*)
cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
Expand Down Expand Up @@ -271,6 +289,11 @@ case $FC in
fc_version_info=`echo $fc_version_info`
;;

*ifx*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;

*ifc*|*ifort*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
Expand Down Expand Up @@ -333,6 +356,10 @@ case $CXX in
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
;;
*icpx*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;
*icpc*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
Expand Down
13 changes: 11 additions & 2 deletions config/netbsd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ fi
# Figure out C compiler flags
. $srcdir/config/gnu-flags

# Figure out Intel C compiler flags
# Figure out Intel oneAPI C compiler flags
. $srcdir/config/oneapi-flags

# Figure out Intel classic C compiler flags
. $srcdir/config/intel-flags

# The default Fortran 90 compiler
Expand All @@ -36,6 +39,10 @@ if test "X-" = "X-$FC"; then
FC=gfortran
FC_BASENAME=gfortran
;;
icx*)
FC=ifx
FC_BASENAME=ifx
;;
icc*)
FC=ifort
FC_BASENAME=ifort
Expand All @@ -50,6 +57,8 @@ fi
# Figure out FORTRAN compiler flags
. $srcdir/config/gnu-fflags

# Figure out Intel F90 compiler flags
# Figure out Intel oneAPI FC compiler flags
. $srcdir/config/intel-fflags

# Figure out Intel classic FC compiler flags
. $srcdir/config/oneapi-fflags
Loading