psblas3-cbind:

base/modules/psb_realloc_mod.F90
 cbind/base/Makefile
 cbind/prec/Makefile
 cbind/prec/psb_dprec_cbind_mod.mod
 configure.ac
 configure
 util/psb_c_renum_impl.F90
 util/psb_d_renum_impl.F90
 util/psb_s_renum_impl.F90
 util/psb_z_renum_impl.F90

Merged changes for MOVE_ALLOC and ISO_C_BINDING made mandatory, no #ifdef
psblas3-mcbind
Salvatore Filippone 8 years ago
commit f98fe637b5

@ -2743,20 +2743,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_smove_alloc1d
Subroutine psb_smove_alloc2d(vin,vout,info)
@ -2766,22 +2755,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_smove_alloc2d
Subroutine psb_dmove_alloc1d(vin,vout,info)
@ -2791,20 +2767,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_dmove_alloc1d
Subroutine psb_dmove_alloc2d(vin,vout,info)
@ -2814,22 +2779,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_dmove_alloc2d
Subroutine psb_cmove_alloc1d(vin,vout,info)
@ -2839,20 +2791,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_cmove_alloc1d
Subroutine psb_cmove_alloc2d(vin,vout,info)
@ -2862,22 +2803,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_cmove_alloc2d
Subroutine psb_zmove_alloc1d(vin,vout,info)
@ -2887,20 +2815,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_zmove_alloc1d
Subroutine psb_zmove_alloc2d(vin,vout,info)
@ -2910,22 +2827,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_zmove_alloc2d
Subroutine psb_imove_alloc1d(vin,vout,info)
@ -2935,20 +2839,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_imove_alloc1d
Subroutine psb_imove_alloc2d(vin,vout,info)
@ -2958,22 +2851,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_imove_alloc2d
#if !defined(LONG_INTEGERS)
@ -2984,20 +2864,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_i8move_alloc1d
Subroutine psb_i8move_alloc2d(vin,vout,info)
@ -3007,22 +2876,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_i8move_alloc2d
#else
@ -3034,20 +2890,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_i4move_alloc1d
Subroutine psb_i4move_alloc1d_i8(vin,vout,info)
@ -3057,20 +2902,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_i4move_alloc1d_i8
Subroutine psb_i4move_alloc2d(vin,vout,info)
@ -3080,22 +2914,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_i4move_alloc2d
Subroutine psb_i4move_alloc2d_i8(vin,vout,info)
@ -3105,22 +2926,9 @@ Contains
!
!
info=psb_success_
#ifdef HAVE_MOVE_ALLOC
call move_alloc(vin,vout)
#else
if (allocated(vout)) then
deallocate(vout,stat=info)
end if
if (.not.allocated(vin) ) return
allocate(vout(lbound(vin,1):ubound(vin,1),&
& lbound(vin,2):ubound(vin,2)),stat=info)
if (info /= psb_success_) return
vout = vin
deallocate(vin,stat=info)
#endif
end Subroutine psb_i4move_alloc2d_i8
#endif

@ -4,8 +4,8 @@ LIBDIR=$(TOP)lib
INCLUDEDIR=$(TOP)/include
HERE=..
FINCLUDES=$(FMFLAG). $(FMFLAG)$(INCLUDEDIR)
CINCLUDES=-I. -I$(INCLUDEDIR)
FINCLUDES=$(FMFLAG). $(FMFLAG)$(HERE) $(FMFLAG)$(INCLUDEDIR)
CINCLUDES=-I. -I$(HERE) -I$(INCLUDEDIR)
FOBJS= psb_objhandle_mod.o psb_base_cbind_mod.o psb_cpenv_mod.o \
psb_base_tools_cbind_mod.o psb_base_string_cbind_mod.o \

@ -4,8 +4,8 @@ LIBDIR=$(TOP)/lib
INCLUDEDIR=$(TOP)/include
HERE=..
FINCLUDES=$(FMFLAG). $(FMFLAG)$(INCLUDEDIR)
CINCLUDES=-I. -I$(INCLUDEDIR)
FINCLUDES=$(FMFLAG). $(FMFLAG)$(HERE) $(FMFLAG)$(INCLUDEDIR)
CINCLUDES=-I. -I$(HERE) -I$(INCLUDEDIR)
OBJS=psb_prec_cbind_mod.o psb_dprec_cbind_mod.o psb_c_dprec.o
CMOD=psb_prec_cbind.h psb_c_dprec.h

2
configure vendored

@ -8752,7 +8752,7 @@ $as_echo "$ac_try_echo") >&5
} && test -s conftest.$ac_objext; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_C_BINDING $FDEFINES"
:
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

@ -576,7 +576,7 @@ PAC_FORTRAN_HAVE_MOVE_ALLOC(
)
PAC_FORTRAN_TEST_ISO_C_BIND(
[FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_C_BINDING $FDEFINES"],
[],
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for ISO_C_BINDING.
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8.])]
)

@ -232,7 +232,7 @@ contains
subroutine psb_mat_renum_amd(a,info,operm)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
use iso_c_binding
#endif
use psb_base_mod
@ -242,7 +242,7 @@ contains
integer(psb_ipk_), allocatable, optional, intent(out) :: operm(:)
!
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
interface
function psb_amd_order(n,ap,ai,p)&
& result(res) bind(c,name='psb_amd_order')
@ -267,7 +267,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
info = psb_success_
nr = a%get_nrows()

@ -232,7 +232,7 @@ contains
subroutine psb_mat_renum_amd(a,info,operm)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
use iso_c_binding
#endif
use psb_base_mod
@ -242,7 +242,7 @@ contains
integer(psb_ipk_), allocatable, optional, intent(out) :: operm(:)
!
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
interface
function psb_amd_order(n,ap,ai,p)&
& result(res) bind(c,name='psb_amd_order')
@ -267,7 +267,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
info = psb_success_
nr = a%get_nrows()

@ -233,7 +233,7 @@ contains
subroutine psb_mat_renum_amd(a,info,operm)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
use iso_c_binding
#endif
use psb_base_mod
@ -243,7 +243,7 @@ contains
integer(psb_ipk_), allocatable, optional, intent(out) :: operm(:)
!
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
interface
function psb_amd_order(n,ap,ai,p)&
& result(res) bind(c,name='psb_amd_order')
@ -268,7 +268,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
info = psb_success_
nr = a%get_nrows()

@ -232,7 +232,7 @@ contains
subroutine psb_mat_renum_amd(a,info,operm)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
use iso_c_binding
#endif
use psb_base_mod
@ -242,7 +242,7 @@ contains
integer(psb_ipk_), allocatable, optional, intent(out) :: operm(:)
!
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
interface
function psb_amd_order(n,ap,ai,p)&
& result(res) bind(c,name='psb_amd_order')
@ -267,7 +267,7 @@ contains
name = 'mat_renum_amd'
call psb_erractionsave(err_act)
#if defined(HAVE_AMD) && defined(HAVE_ISO_C_BINDING)
#if defined(HAVE_AMD)
info = psb_success_
nr = a%get_nrows()

Loading…
Cancel
Save