mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-16 19:02:09 +00:00
psblas2-dev
base/internals/psi_dswapdata.F90 base/internals/psi_dswaptran.F90 base/internals/psi_iswapdata.F90 base/internals/psi_iswaptran.F90 base/internals/psi_zswapdata.F90 base/internals/psi_zswaptran.F90 config/pac.m4 configure.ac configure Added detection and use of VOLATILE.
This commit is contained in:
@@ -188,6 +188,9 @@ subroutine psi_dswapidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
real(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
@@ -676,6 +679,9 @@ subroutine psi_dswapidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
real(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
|
||||
@@ -192,6 +192,9 @@ subroutine psi_dtranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
real(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
|
||||
@@ -187,6 +187,9 @@ subroutine psi_iswapidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
integer, pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
@@ -676,6 +679,9 @@ subroutine psi_iswapidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
integer, pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
|
||||
@@ -192,6 +192,9 @@ subroutine psi_itranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
integer, pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
@@ -679,6 +682,9 @@ subroutine psi_itranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
integer, pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
|
||||
@@ -187,6 +187,9 @@ subroutine psi_zswapidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
complex(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
@@ -676,6 +679,9 @@ subroutine psi_zswapidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
complex(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
|
||||
@@ -192,6 +192,9 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
complex(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
@@ -679,6 +682,9 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
||||
logical, parameter :: usersend=.false.
|
||||
|
||||
complex(kind(1.d0)), pointer, dimension(:) :: sndbuf, rcvbuf
|
||||
#ifdef HAVE_VOLATILE
|
||||
volatile :: sndbuf, rcvbuf
|
||||
#endif
|
||||
character(len=20) :: name
|
||||
|
||||
info = 0
|
||||
|
||||
+50
-2
@@ -69,7 +69,7 @@ ac_exeext=''
|
||||
ac_ext='f'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
dnl Warning : square brackets are EVIL!
|
||||
[AC_MSG_CHECKING([for MOVE_ALLOC intrinsic])
|
||||
[AC_MSG_CHECKING([for Fortran MOVE_ALLOC intrinsic])
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test_move_alloc
|
||||
integer, allocatable :: a(:), b(:)
|
||||
@@ -328,7 +328,7 @@ dnl Depending on the compiler flags, this could cause a conftest.mod file to app
|
||||
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
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
AC_DEFUN(PAC_FORTRAN_TEST_TR15581,
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
@@ -393,9 +393,56 @@ program testtr15581
|
||||
end program testtr15581
|
||||
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])
|
||||
dnl @synopsis PAC_FORTRAN_TEST_VOLATILE( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile and link a program checking the VOLATILE 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_VOLATILE,
|
||||
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 VOLATILE])
|
||||
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, volatile :: i, j
|
||||
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], , , [
|
||||
@@ -418,6 +465,7 @@ dnl Depending on the compiler flags, this could cause a conftest.mod file to app
|
||||
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>
|
||||
dnl
|
||||
AC_DEFUN(PAC_CHECK_BLACS,
|
||||
[AC_ARG_WITH(blacs, AC_HELP_STRING([--with-blacs=LIB], [Specify BLACSLIBNAME or -lBLACSLIBNAME or the absolute library filename.]),
|
||||
|
||||
@@ -5369,18 +5369,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && test -s conftest${ac_exeext}; then
|
||||
|
||||
{ echo "$as_me:$LINENO: result: yes." >&5
|
||||
echo "${ECHO_T}yes." >&6; }
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
:
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
|
||||
{ { echo "$as_me:$LINENO: error: no.
|
||||
Sorry, cannot build PSBLAS without support for TR15581.
|
||||
{ { 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.2." >&5
|
||||
echo "$as_me: error: no.
|
||||
Sorry, cannot build PSBLAS without support for TR15581.
|
||||
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.2." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
|
||||
@@ -5388,6 +5388,7 @@ fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i
|
||||
|
||||
|
||||
if test x"$psblas_cv_fc" == "x" ; then
|
||||
if eval "$MPIFC -qversion | grep XL 2>/dev/null" ; then
|
||||
psblas_cv_fc="xlf"
|
||||
@@ -7132,8 +7133,8 @@ rm -f conftest*
|
||||
ac_exeext=''
|
||||
ac_ext='f'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
{ echo "$as_me:$LINENO: checking for MOVE_ALLOC intrinsic" >&5
|
||||
echo $ECHO_N "checking for MOVE_ALLOC intrinsic... $ECHO_C" >&6; }
|
||||
{ echo "$as_me:$LINENO: checking for Fortran MOVE_ALLOC intrinsic" >&5
|
||||
echo $ECHO_N "checking for Fortran MOVE_ALLOC intrinsic... $ECHO_C" >&6; }
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
program test_move_alloc
|
||||
integer, allocatable :: a(:), b(:)
|
||||
@@ -7160,6 +7161,40 @@ echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
{ echo "$as_me:$LINENO: checking support for Fortran VOLATILE" >&5
|
||||
echo $ECHO_N "checking support for Fortran VOLATILE... $ECHO_C" >&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, volatile :: i, j
|
||||
end program conftest
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && test -s conftest${ac_exeext}; then
|
||||
{ echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6; }
|
||||
|
||||
FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES"
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i
|
||||
|
||||
###############################################################################
|
||||
# Additional pathname stuff (yes, it is redundant and confusing...)
|
||||
###############################################################################
|
||||
|
||||
+7
-3
@@ -189,12 +189,12 @@ PAC_CHECK_HAVE_GFORTRAN(
|
||||
# Test for TR 15581, aka allocatables extensions.
|
||||
#
|
||||
PAC_FORTRAN_TEST_TR15581(
|
||||
[AC_MSG_RESULT([yes.])],
|
||||
[AC_MSG_ERROR([no.
|
||||
Sorry, cannot build PSBLAS without support for 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.2.])]
|
||||
)
|
||||
|
||||
|
||||
if test x"$psblas_cv_fc" == "x" ; then
|
||||
if eval "$MPIFC -qversion | grep XL 2>/dev/null" ; then
|
||||
psblas_cv_fc="xlf"
|
||||
@@ -473,6 +473,10 @@ PAC_FORTRAN_HAVE_MOVE_ALLOC(
|
||||
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_VOLATILE(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES"],
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Additional pathname stuff (yes, it is redundant and confusing...)
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user