mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-19 20:32:12 +00:00
psblas3:
base/modules/psb_error_impl.F90 config/pac.m4 configure.ac configure Only use the F2003 FLUSH statement. Check for it in configure.
This commit is contained in:
@@ -39,6 +39,10 @@ subroutine psb_serror()
|
||||
end do
|
||||
end if
|
||||
end if
|
||||
#if defined(HAVE_FLUSH_STMT)
|
||||
flush(0)
|
||||
#endif
|
||||
|
||||
|
||||
end subroutine psb_serror
|
||||
|
||||
@@ -72,9 +76,6 @@ subroutine psb_perror(ictxt)
|
||||
call psb_errmsg(err_c, r_name, i_e_d, a_e_d,iam)
|
||||
! write(0,'(50("="))')
|
||||
end do
|
||||
#if defined(HAVE_FLUSH_SUB)
|
||||
call flush(0)
|
||||
#endif
|
||||
#if defined(HAVE_FLUSH_STMT)
|
||||
flush(0)
|
||||
#endif
|
||||
@@ -90,9 +91,6 @@ subroutine psb_perror(ictxt)
|
||||
do while (psb_get_numerr() > 0)
|
||||
call psb_errpop(err_c, r_name, i_e_d, a_e_d)
|
||||
end do
|
||||
#if defined(HAVE_FLUSH_SUB)
|
||||
call flush(0)
|
||||
#endif
|
||||
#if defined(HAVE_FLUSH_STMT)
|
||||
flush(0)
|
||||
#endif
|
||||
|
||||
@@ -1264,3 +1264,53 @@ else
|
||||
$2
|
||||
fi
|
||||
])dnl PAC_LAPACK
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_TEST_FLUSH( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile and link a program checking the FLUSH Fortran support.
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
AC_DEFUN(PAC_FORTRAN_TEST_FLUSH,
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[AC_MSG_CHECKING([support for Fortran FLUSH statement])
|
||||
i=0
|
||||
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
mkdir tmpdir_$i
|
||||
cd tmpdir_$i
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program conftest
|
||||
integer :: iunit=10
|
||||
open(10)
|
||||
write(10,*) 'Test '
|
||||
flush(10)
|
||||
close(10)
|
||||
end program conftest
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$1], , :, [
|
||||
$1])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
ifelse([$2], , , [
|
||||
$2
|
||||
])dnl
|
||||
fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i])
|
||||
|
||||
@@ -7427,9 +7427,9 @@ $as_echo "no" >&6; }
|
||||
cat conftest.$ac_ext >&5
|
||||
|
||||
{ { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for TR15581.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5." >&5
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5
|
||||
$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for TR15581.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5." >&2;}
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
fi
|
||||
@@ -7473,9 +7473,9 @@ $as_echo "no" >&6; }
|
||||
cat conftest.$ac_ext >&5
|
||||
|
||||
{ { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for EXTENDS.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5." >&5
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5
|
||||
$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for EXTENDS.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5." >&2;}
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
fi
|
||||
@@ -7538,9 +7538,9 @@ $as_echo "no" >&6; }
|
||||
cat conftest.$ac_ext >&5
|
||||
|
||||
{ { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures.
|
||||
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.5." >&5
|
||||
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.6." >&5
|
||||
$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures.
|
||||
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.5." >&2;}
|
||||
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.6." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
fi
|
||||
@@ -7575,10 +7575,10 @@ $as_echo "no" >&6; }
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
{ { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for EXTENDS.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5." >&5
|
||||
$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for EXTENDS.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5." >&2;}
|
||||
{ { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5
|
||||
$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
fi
|
||||
@@ -7622,6 +7622,44 @@ fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i
|
||||
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
{ $as_echo "$as_me:$LINENO: checking support for Fortran FLUSH statement" >&5
|
||||
$as_echo_n "checking support for Fortran FLUSH statement... " >&6; }
|
||||
i=0
|
||||
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
mkdir tmpdir_$i
|
||||
cd tmpdir_$i
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program conftest
|
||||
integer :: iunit=10
|
||||
open(10)
|
||||
write(10,*) 'Test '
|
||||
flush(10)
|
||||
close(10)
|
||||
end program conftest
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && test -s conftest${ac_exeext}; then
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES"
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i
|
||||
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
|
||||
+9
-5
@@ -508,24 +508,24 @@ fi
|
||||
PAC_FORTRAN_TEST_TR15581(
|
||||
[],
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for TR15581.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5.])]
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_EXTENDS(
|
||||
[],
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for EXTENDS.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5.])]
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_CLASS_TBP(
|
||||
[],
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for CLASS and type bound procedures.
|
||||
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.5.])]
|
||||
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.6.])]
|
||||
)
|
||||
PAC_FORTRAN_HAVE_MOVE_ALLOC(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_MOVE_ALLOC $FDEFINES"],
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for EXTENDS.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.5.])]
|
||||
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for MOVE_ALLOC.
|
||||
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
||||
)
|
||||
|
||||
#
|
||||
@@ -536,6 +536,10 @@ PAC_FORTRAN_TEST_VOLATILE(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES"],
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_FLUSH(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES"],
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_FINAL(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_FINAL $FDEFINES"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user