mirror of https://gitlab.com/QEF/q-e.git
Some cleanup, tentative update for crays
This commit is contained in:
parent
373290209b
commit
696eaee3a5
|
@ -2875,8 +2875,8 @@ try_f90="gfortran f90"
|
|||
# candidate compilers and flags based on architecture
|
||||
case $arch in
|
||||
ia32 | ia64 | x86_64 )
|
||||
try_f90="ifort nvfortran pgf90 nagfor $try_f90"
|
||||
try_mpif90="mpiifort $try_mpif90"
|
||||
try_f90="ifort nvfortran pgf90 nagfor ftn $try_f90"
|
||||
try_mpif90="mpiifort ftn $try_mpif90"
|
||||
;;
|
||||
arm )
|
||||
try_f90="nvfortran pgf90 armflang $try_f90"
|
||||
|
@ -3184,82 +3184,84 @@ mpif90=$FC
|
|||
|
||||
# check which compiler does mpif90 wrap
|
||||
|
||||
case "$arch" in
|
||||
* )
|
||||
echo $ECHO_N "checking version of $mpif90... $ECHO_C"
|
||||
ifort_version=`$mpif90 -V 2>&1 | grep "Intel(R)"`
|
||||
pgf_version=`$mpif90 -V 2>&1 | grep "^pgf"`
|
||||
nvfortran_version=`$mpif90 -V 2>&1 | grep "^nvfortran"`
|
||||
gfortran_version=`$mpif90 -v 2>&1 | grep "gcc version"`
|
||||
nagfor_version=`$mpif90 -v 2>&1 | grep "NAG Fortran"`
|
||||
xlf_version=`$mpif90 -v 2>&1 | grep "xlf"`
|
||||
armflang_version=`$mpif90 -v 2>&1 | grep "Arm C/C++/Fortran Compiler version"`
|
||||
frt_version=`$mpif90 -v 2>&1 | grep "Fujitsu Fortran Compiler"`
|
||||
#
|
||||
if test "$ifort_version" != ""
|
||||
then
|
||||
version=`$mpif90 --version 2>&1 | grep "IFORT" | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}ifort $f90_major_version"
|
||||
f90_in_mpif90="ifort"
|
||||
elif test "$nvfortran_version" != ""
|
||||
then
|
||||
version=`echo $nvfortran_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2 | cut -d- -f1`
|
||||
echo "${ECHO_T}nvfortran $version"
|
||||
f90_in_mpif90="nvfortran"
|
||||
elif test "$pgf_version" != ""
|
||||
then
|
||||
version=`echo $pgf_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}pgf90 $version"
|
||||
f90_in_mpif90="pgf90"
|
||||
elif test "$gfortran_version" != ""
|
||||
then
|
||||
version=`echo $gfortran_version | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
echo "${ECHO_T}gfortran $f90_major_version.$f90_minor_version"
|
||||
f90_in_mpif90="gfortran"
|
||||
elif test "$nagfor_version" != ""
|
||||
then
|
||||
# NAG 6.0 has the codename attached to version number... annoying
|
||||
version=`echo $nagfor_version | cut -d ' ' -f5`
|
||||
echo "${ECHO_T}nagfor $version"
|
||||
f90_in_mpif90="nagfor"
|
||||
elif test "$xlf_version" != ""
|
||||
then
|
||||
echo "${ECHO_T}xlf (version unknonw)"
|
||||
f90_in_mpif90="xlf90_r"
|
||||
try_dflags="-D__XLF"
|
||||
elif test "$armflang_version" != ""
|
||||
then
|
||||
version=`echo $armflang_version | cut -d" " -f 5`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
f90_in_mpif90="armflang"
|
||||
try_foxflags="-D__PGI"
|
||||
elif test "$frt_version" != ""
|
||||
then
|
||||
version=`echo $frt_version | cut -d" " -f 5`
|
||||
echo "${ECHO_T}frt $version"
|
||||
f90_in_mpif90="frt"
|
||||
try_foxflags="-D__FUJITSU"
|
||||
else
|
||||
echo "${ECHO_T}unknown, assuming gfortran"
|
||||
f90_in_mpif90="gfortran"
|
||||
fi
|
||||
# notify if serial and parallel compiler are the same
|
||||
if test "$set_use_parallel" -eq 1 ; then
|
||||
if test "$mpif90" = "$f90_in_mpif90"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: parallel and serial compiler are the same" >&5
|
||||
echo $ECHO_N "checking version of $mpif90... $ECHO_C"
|
||||
ifort_version=`$mpif90 -V 2>&1 | grep "Intel(R)"`
|
||||
pgf_version=`$mpif90 -V 2>&1 | grep "^pgf"`
|
||||
nvfortran_version=`$mpif90 -V 2>&1 | grep "^nvfortran"`
|
||||
gfortran_version=`$mpif90 -v 2>&1 | grep "gcc version"`
|
||||
nagfor_version=`$mpif90 -v 2>&1 | grep "NAG Fortran"`
|
||||
xlf_version=`$mpif90 -v 2>&1 | grep "xlf"`
|
||||
armflang_version=`$mpif90 -v 2>&1 | grep "Arm C/C++/Fortran Compiler version"`
|
||||
frt_version=`$mpif90 -v 2>&1 | grep "Fujitsu Fortran Compiler"`
|
||||
ftn_version=`$mpif90 --version 2>&1 | grep "Cray Fortran"`
|
||||
#
|
||||
if test "$ifort_version" != ""
|
||||
then
|
||||
version=`$mpif90 --version 2>&1 | grep "IFORT" | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}ifort $f90_major_version"
|
||||
f90_in_mpif90="ifort"
|
||||
elif test "$nvfortran_version" != ""
|
||||
then
|
||||
version=`echo $nvfortran_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2 | cut -d- -f1`
|
||||
echo "${ECHO_T}nvfortran $version"
|
||||
f90_in_mpif90="nvfortran"
|
||||
elif test "$pgf_version" != ""
|
||||
then
|
||||
version=`echo $pgf_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}pgf90 $version"
|
||||
f90_in_mpif90="pgf90"
|
||||
elif test "$gfortran_version" != ""
|
||||
then
|
||||
version=`echo $gfortran_version | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
echo "${ECHO_T}gfortran $f90_major_version.$f90_minor_version"
|
||||
f90_in_mpif90="gfortran"
|
||||
elif test "$nagfor_version" != ""
|
||||
then
|
||||
# NAG 6.0 has the codename attached to version number... annoying
|
||||
version=`echo $nagfor_version | cut -d ' ' -f5`
|
||||
echo "${ECHO_T}nagfor $version"
|
||||
f90_in_mpif90="nagfor"
|
||||
elif test "$xlf_version" != ""
|
||||
then
|
||||
echo "${ECHO_T}xlf (version unknonw)"
|
||||
f90_in_mpif90="xlf90_r"
|
||||
try_dflags="-D__XLF"
|
||||
elif test "$armflang_version" != ""
|
||||
then
|
||||
version=`echo $armflang_version | cut -d" " -f 5`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
f90_in_mpif90="armflang"
|
||||
try_foxflags="-D__PGI"
|
||||
elif test "$frt_version" != ""
|
||||
then
|
||||
version=`echo $frt_version | cut -d" " -f 5`
|
||||
echo "${ECHO_T}frt $version"
|
||||
f90_in_mpif90="frt"
|
||||
try_foxflags="-D__FUJITSU"
|
||||
elif test "$ftn_version" != ""
|
||||
then
|
||||
version=`echo $fnt_version | cut -d" " -f 5`
|
||||
echo "${ECHO_T}ftn $version"
|
||||
f90_in_mpif90="ftn"
|
||||
else
|
||||
echo "${ECHO_T}unknown, assuming gfortran"
|
||||
f90_in_mpif90="gfortran"
|
||||
fi
|
||||
# notify if serial and parallel compiler are the same
|
||||
if test "$set_use_parallel" -eq 1 ; then
|
||||
if test "$mpif90" = "$f90_in_mpif90" && test "$mpif90" != "ftn"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: parallel and serial compiler are the same" >&5
|
||||
$as_echo "$as_me: WARNING: parallel and serial compiler are the same" >&2;}
|
||||
fi
|
||||
fi
|
||||
f90=$f90_in_mpif90
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
f90=$f90_in_mpif90
|
||||
ac_ext=${ac_fc_srcext-f}
|
||||
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
|
||||
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
|
||||
|
@ -3381,7 +3383,7 @@ try_cc="cc gcc"
|
|||
|
||||
case "$arch:$f90_flavor" in
|
||||
*:ifort* )
|
||||
try_cc="icc ecc $try_cc"
|
||||
try_cc="icc $try_cc"
|
||||
;;
|
||||
*:pgf90 | *:nvfortran )
|
||||
try_cc="pgcc $try_cc"
|
||||
|
@ -3899,6 +3901,42 @@ arm:armflang )
|
|||
try_ldflags_static="-static -static-flang-libs"
|
||||
|
||||
;;
|
||||
*:pgf* | *:nvfortran )
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags="-fast"
|
||||
try_fflags_openmp="-mp"
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_f90flags="-g -C -Ktrap=fp -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
else
|
||||
try_f90flags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
fi
|
||||
try_foxflags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
try_fflags_noopt="-O0"
|
||||
try_ldflags=""
|
||||
try_ldflags_openmp="-mp"
|
||||
try_ldflags_static="-Bstatic"
|
||||
try_dflags="$try_dflags -D__PGI"
|
||||
have_cpp=1
|
||||
;;
|
||||
*:*gfortran )
|
||||
try_fflags="-O3 -g"
|
||||
if test "$f90_major_version" -ge "10"; then
|
||||
try_fflags="$try_fflags -fallow-argument-mismatch"
|
||||
fi
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_fflags="-O3 -g -Wall -fbounds-check -frange-check -finit-integer=987654321 -finit-real=nan -finit-logical=true -finit-character=64"
|
||||
fi
|
||||
if test "$use_pedantic" -eq 1; then
|
||||
try_fflags="-O2 -g -pedantic -Wall -Wextra -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all"
|
||||
fi
|
||||
try_fflags_openmp="-fopenmp"
|
||||
try_f90flags="\$(FFLAGS) -cpp"
|
||||
try_fflags_noopt="-O0 -g"
|
||||
try_ldflags="-g"
|
||||
try_ldflags_openmp="-pthread -fopenmp"
|
||||
try_ldflags_static="-static"
|
||||
;;
|
||||
# from now on: likely obsolete cases
|
||||
x86_64:nagfor* )
|
||||
try_fflags="-O3 -kind=byte -dcfuns -mismatch"
|
||||
if test "$use_debug" -eq 1; then
|
||||
|
@ -3932,14 +3970,14 @@ crayxt*:cray* )
|
|||
;;
|
||||
crayxt*:pgf* )
|
||||
# see comment above for pgf*
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags_openmp="-mp"
|
||||
try_fflags="-O3"
|
||||
try_f90flags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
try_fflags_noopt="-O0"
|
||||
try_ldflags_openmp="-mp"
|
||||
try_ldflags="-v"
|
||||
try_dflags="$try_dflags -D__PGI -D__IOTK_WORKAROUND1"
|
||||
try_dflags="$try_dflags -D__PGI"
|
||||
have_cpp=1
|
||||
;;
|
||||
necsx:* )
|
||||
|
@ -4015,41 +4053,6 @@ ppc64-bgq:*xlf* )
|
|||
pre_fdflags="-WF,"
|
||||
xlf_flags=1
|
||||
;;
|
||||
*:pgf* | *:nvfortran )
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags="-fast"
|
||||
try_fflags_openmp="-mp"
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_f90flags="-g -C -Ktrap=fp -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
else
|
||||
try_f90flags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
fi
|
||||
try_foxflags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
try_fflags_noopt="-O0"
|
||||
try_ldflags=""
|
||||
try_ldflags_openmp="-mp"
|
||||
try_ldflags_static="-Bstatic"
|
||||
try_dflags="$try_dflags -D__PGI"
|
||||
have_cpp=1
|
||||
;;
|
||||
*:*gfortran )
|
||||
try_fflags="-O3 -g"
|
||||
if test "$f90_major_version" -ge "10"; then
|
||||
try_fflags="$try_fflags -fallow-argument-mismatch"
|
||||
fi
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_fflags="-O3 -g -Wall -fbounds-check -frange-check -finit-integer=987654321 -finit-real=nan -finit-logical=true -finit-character=64"
|
||||
fi
|
||||
if test "$use_pedantic" -eq 1; then
|
||||
try_fflags="-O2 -g -pedantic -Wall -Wextra -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all"
|
||||
fi
|
||||
try_fflags_openmp="-fopenmp"
|
||||
try_f90flags="\$(FFLAGS) -cpp"
|
||||
try_fflags_noopt="-O0 -g"
|
||||
try_ldflags="-g"
|
||||
try_ldflags_openmp="-pthread -fopenmp"
|
||||
try_ldflags_static="-static"
|
||||
;;
|
||||
|
||||
* )
|
||||
# unknown, try these
|
||||
|
|
|
@ -7,7 +7,7 @@ try_cc="cc gcc"
|
|||
|
||||
case "$arch:$f90_flavor" in
|
||||
*:ifort* )
|
||||
try_cc="icc ecc $try_cc"
|
||||
try_cc="icc $try_cc"
|
||||
;;
|
||||
*:pgf90 | *:nvfortran )
|
||||
try_cc="pgcc $try_cc"
|
||||
|
|
|
@ -88,6 +88,42 @@ arm:armflang )
|
|||
try_ldflags_static="-static -static-flang-libs"
|
||||
|
||||
;;
|
||||
*:pgf* | *:nvfortran )
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags="-fast"
|
||||
try_fflags_openmp="-mp"
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_f90flags="-g -C -Ktrap=fp -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
else
|
||||
try_f90flags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
fi
|
||||
try_foxflags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
try_fflags_noopt="-O0"
|
||||
try_ldflags=""
|
||||
try_ldflags_openmp="-mp"
|
||||
try_ldflags_static="-Bstatic"
|
||||
try_dflags="$try_dflags -D__PGI"
|
||||
have_cpp=1
|
||||
;;
|
||||
*:*gfortran )
|
||||
try_fflags="-O3 -g"
|
||||
if test "$f90_major_version" -ge "10"; then
|
||||
try_fflags="$try_fflags -fallow-argument-mismatch"
|
||||
fi
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_fflags="-O3 -g -Wall -fbounds-check -frange-check -finit-integer=987654321 -finit-real=nan -finit-logical=true -finit-character=64"
|
||||
fi
|
||||
if test "$use_pedantic" -eq 1; then
|
||||
try_fflags="-O2 -g -pedantic -Wall -Wextra -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all"
|
||||
fi
|
||||
try_fflags_openmp="-fopenmp"
|
||||
try_f90flags="\$(FFLAGS) -cpp"
|
||||
try_fflags_noopt="-O0 -g"
|
||||
try_ldflags="-g"
|
||||
try_ldflags_openmp="-pthread -fopenmp"
|
||||
try_ldflags_static="-static"
|
||||
;;
|
||||
# from now on: likely obsolete cases
|
||||
x86_64:nagfor* )
|
||||
try_fflags="-O3 -kind=byte -dcfuns -mismatch"
|
||||
if test "$use_debug" -eq 1; then
|
||||
|
@ -121,14 +157,14 @@ crayxt*:cray* )
|
|||
;;
|
||||
crayxt*:pgf* )
|
||||
# see comment above for pgf*
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags_openmp="-mp"
|
||||
try_fflags="-O3"
|
||||
try_f90flags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
try_fflags_noopt="-O0"
|
||||
try_ldflags_openmp="-mp"
|
||||
try_ldflags="-v"
|
||||
try_dflags="$try_dflags -D__PGI -D__IOTK_WORKAROUND1"
|
||||
try_dflags="$try_dflags -D__PGI"
|
||||
have_cpp=1
|
||||
;;
|
||||
necsx:* )
|
||||
|
@ -204,41 +240,6 @@ ppc64-bgq:*xlf* )
|
|||
pre_fdflags="-WF,"
|
||||
xlf_flags=1
|
||||
;;
|
||||
*:pgf* | *:nvfortran )
|
||||
try_fflags_nomain="-Mnomain"
|
||||
try_fflags="-fast"
|
||||
try_fflags_openmp="-mp"
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_f90flags="-g -C -Ktrap=fp -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
else
|
||||
try_f90flags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
fi
|
||||
try_foxflags="-fast -Mcache_align -Mpreprocess -Mlarge_arrays"
|
||||
try_fflags_noopt="-O0"
|
||||
try_ldflags=""
|
||||
try_ldflags_openmp="-mp"
|
||||
try_ldflags_static="-Bstatic"
|
||||
try_dflags="$try_dflags -D__PGI"
|
||||
have_cpp=1
|
||||
;;
|
||||
*:*gfortran )
|
||||
try_fflags="-O3 -g"
|
||||
if test "$f90_major_version" -ge "10"; then
|
||||
try_fflags="$try_fflags -fallow-argument-mismatch"
|
||||
fi
|
||||
if test "$use_debug" -eq 1; then
|
||||
try_fflags="-O3 -g -Wall -fbounds-check -frange-check -finit-integer=987654321 -finit-real=nan -finit-logical=true -finit-character=64"
|
||||
fi
|
||||
if test "$use_pedantic" -eq 1; then
|
||||
try_fflags="-O2 -g -pedantic -Wall -Wextra -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all"
|
||||
fi
|
||||
try_fflags_openmp="-fopenmp"
|
||||
try_f90flags="\$(FFLAGS) -cpp"
|
||||
try_fflags_noopt="-O0 -g"
|
||||
try_ldflags="-g"
|
||||
try_ldflags_openmp="-pthread -fopenmp"
|
||||
try_ldflags_static="-static"
|
||||
;;
|
||||
|
||||
* )
|
||||
# unknown, try these
|
||||
|
|
|
@ -20,8 +20,8 @@ try_f90="gfortran f90"
|
|||
# candidate compilers and flags based on architecture
|
||||
case $arch in
|
||||
ia32 | ia64 | x86_64 )
|
||||
try_f90="ifort nvfortran pgf90 nagfor $try_f90"
|
||||
try_mpif90="mpiifort $try_mpif90"
|
||||
try_f90="ifort nvfortran pgf90 nagfor ftn $try_f90"
|
||||
try_mpif90="mpiifort ftn $try_mpif90"
|
||||
;;
|
||||
arm )
|
||||
try_f90="nvfortran pgf90 armflang $try_f90"
|
||||
|
@ -116,81 +116,83 @@ mpif90=$FC
|
|||
|
||||
# check which compiler does mpif90 wrap
|
||||
|
||||
case "$arch" in
|
||||
* )
|
||||
echo $ECHO_N "checking version of $mpif90... $ECHO_C"
|
||||
ifort_version=`$mpif90 -V 2>&1 | grep "Intel(R)"`
|
||||
pgf_version=`$mpif90 -V 2>&1 | grep "^pgf"`
|
||||
nvfortran_version=`$mpif90 -V 2>&1 | grep "^nvfortran"`
|
||||
gfortran_version=`$mpif90 -v 2>&1 | grep "gcc version"`
|
||||
nagfor_version=`$mpif90 -v 2>&1 | grep "NAG Fortran"`
|
||||
xlf_version=`$mpif90 -v 2>&1 | grep "xlf"`
|
||||
armflang_version=`$mpif90 -v 2>&1 | grep "Arm C/C++/Fortran Compiler version"`
|
||||
frt_version=`$mpif90 -v 2>&1 | grep "Fujitsu Fortran Compiler"`
|
||||
#
|
||||
if test "$ifort_version" != ""
|
||||
then
|
||||
version=`$mpif90 --version 2>&1 | grep "IFORT" | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}ifort $f90_major_version"
|
||||
f90_in_mpif90="ifort"
|
||||
elif test "$nvfortran_version" != ""
|
||||
then
|
||||
version=`echo $nvfortran_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2 | cut -d- -f1`
|
||||
echo "${ECHO_T}nvfortran $version"
|
||||
f90_in_mpif90="nvfortran"
|
||||
elif test "$pgf_version" != ""
|
||||
then
|
||||
version=`echo $pgf_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}pgf90 $version"
|
||||
f90_in_mpif90="pgf90"
|
||||
elif test "$gfortran_version" != ""
|
||||
then
|
||||
version=`echo $gfortran_version | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
echo "${ECHO_T}gfortran $f90_major_version.$f90_minor_version"
|
||||
f90_in_mpif90="gfortran"
|
||||
elif test "$nagfor_version" != ""
|
||||
then
|
||||
# NAG 6.0 has the codename attached to version number... annoying
|
||||
version=`echo $nagfor_version | cut -d ' ' -f5`
|
||||
echo "${ECHO_T}nagfor $version"
|
||||
f90_in_mpif90="nagfor"
|
||||
elif test "$xlf_version" != ""
|
||||
then
|
||||
echo "${ECHO_T}xlf (version unknonw)"
|
||||
f90_in_mpif90="xlf90_r"
|
||||
try_dflags="-D__XLF"
|
||||
elif test "$armflang_version" != ""
|
||||
then
|
||||
version=`echo $armflang_version | cut -d" " -f 5`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
f90_in_mpif90="armflang"
|
||||
try_foxflags="-D__PGI"
|
||||
elif test "$frt_version" != ""
|
||||
then
|
||||
version=`echo $frt_version | cut -d" " -f 5`
|
||||
echo "${ECHO_T}frt $version"
|
||||
f90_in_mpif90="frt"
|
||||
try_foxflags="-D__FUJITSU"
|
||||
else
|
||||
echo "${ECHO_T}unknown, assuming gfortran"
|
||||
f90_in_mpif90="gfortran"
|
||||
fi
|
||||
# notify if serial and parallel compiler are the same
|
||||
if test "$set_use_parallel" -eq 1 ; then
|
||||
if test "$mpif90" = "$f90_in_mpif90"; then
|
||||
AC_MSG_WARN([parallel and serial compiler are the same])
|
||||
fi
|
||||
fi
|
||||
f90=$f90_in_mpif90
|
||||
;;
|
||||
esac
|
||||
echo $ECHO_N "checking version of $mpif90... $ECHO_C"
|
||||
ifort_version=`$mpif90 -V 2>&1 | grep "Intel(R)"`
|
||||
pgf_version=`$mpif90 -V 2>&1 | grep "^pgf"`
|
||||
nvfortran_version=`$mpif90 -V 2>&1 | grep "^nvfortran"`
|
||||
gfortran_version=`$mpif90 -v 2>&1 | grep "gcc version"`
|
||||
nagfor_version=`$mpif90 -v 2>&1 | grep "NAG Fortran"`
|
||||
xlf_version=`$mpif90 -v 2>&1 | grep "xlf"`
|
||||
armflang_version=`$mpif90 -v 2>&1 | grep "Arm C/C++/Fortran Compiler version"`
|
||||
frt_version=`$mpif90 -v 2>&1 | grep "Fujitsu Fortran Compiler"`
|
||||
ftn_version=`$mpif90 --version 2>&1 | grep "Cray Fortran"`
|
||||
#
|
||||
if test "$ifort_version" != ""
|
||||
then
|
||||
version=`$mpif90 --version 2>&1 | grep "IFORT" | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}ifort $f90_major_version"
|
||||
f90_in_mpif90="ifort"
|
||||
elif test "$nvfortran_version" != ""
|
||||
then
|
||||
version=`echo $nvfortran_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2 | cut -d- -f1`
|
||||
echo "${ECHO_T}nvfortran $version"
|
||||
f90_in_mpif90="nvfortran"
|
||||
elif test "$pgf_version" != ""
|
||||
then
|
||||
version=`echo $pgf_version | cut -d ' ' -f2`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
echo "${ECHO_T}pgf90 $version"
|
||||
f90_in_mpif90="pgf90"
|
||||
elif test "$gfortran_version" != ""
|
||||
then
|
||||
version=`echo $gfortran_version | cut -d ' ' -f3`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
echo "${ECHO_T}gfortran $f90_major_version.$f90_minor_version"
|
||||
f90_in_mpif90="gfortran"
|
||||
elif test "$nagfor_version" != ""
|
||||
then
|
||||
# NAG 6.0 has the codename attached to version number... annoying
|
||||
version=`echo $nagfor_version | cut -d ' ' -f5`
|
||||
echo "${ECHO_T}nagfor $version"
|
||||
f90_in_mpif90="nagfor"
|
||||
elif test "$xlf_version" != ""
|
||||
then
|
||||
echo "${ECHO_T}xlf (version unknonw)"
|
||||
f90_in_mpif90="xlf90_r"
|
||||
try_dflags="-D__XLF"
|
||||
elif test "$armflang_version" != ""
|
||||
then
|
||||
version=`echo $armflang_version | cut -d" " -f 5`
|
||||
f90_major_version=`echo $version | cut -d. -f1`
|
||||
f90_minor_version=`echo $version | cut -d. -f2`
|
||||
f90_in_mpif90="armflang"
|
||||
try_foxflags="-D__PGI"
|
||||
elif test "$frt_version" != ""
|
||||
then
|
||||
version=`echo $frt_version | cut -d" " -f 5`
|
||||
echo "${ECHO_T}frt $version"
|
||||
f90_in_mpif90="frt"
|
||||
try_foxflags="-D__FUJITSU"
|
||||
elif test "$ftn_version" != ""
|
||||
then
|
||||
version=`echo $fnt_version | cut -d" " -f 5`
|
||||
echo "${ECHO_T}ftn $version"
|
||||
f90_in_mpif90="ftn"
|
||||
else
|
||||
echo "${ECHO_T}unknown, assuming gfortran"
|
||||
f90_in_mpif90="gfortran"
|
||||
fi
|
||||
# notify if serial and parallel compiler are the same
|
||||
if test "$set_use_parallel" -eq 1 ; then
|
||||
if test "$mpif90" = "$f90_in_mpif90" && test "$mpif90" != "ftn"; then
|
||||
AC_MSG_WARN([parallel and serial compiler are the same])
|
||||
fi
|
||||
fi
|
||||
f90=$f90_in_mpif90
|
||||
AC_FC_SRCEXT(f90)
|
||||
|
||||
echo setting F90... $f90
|
||||
|
|
Loading…
Reference in New Issue