Fix test/hello programs

pizdaint-runs
Salvatore Filippone 5 years ago
parent 1a442ec7d0
commit b8f66ef607

@ -4,7 +4,7 @@ MODDIR=$(BASEDIR)/modules/
include $(INCDIR)/Make.inc.psblas include $(INCDIR)/Make.inc.psblas
# #
# Libraries used # Libraries used
LIBDIR=$(INSTALLDIR)/lib LIBDIR=$(BASEDIR)/lib
PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base
LDLIBS=$(PSBLDLIBS) LDLIBS=$(PSBLDLIBS)
# #

@ -1,7 +1,7 @@
program hello program hello
use psb_base_mod use psb_base_mod
implicit none implicit none
integer iam, np, icontxt, ip, jp, idummy integer(psb_ipk_) :: iam, np, icontxt, ip, jp, idummy
call psb_init(icontxt) call psb_init(icontxt)
call psb_info(icontxt,iam,np) call psb_info(icontxt,iam,np)
@ -14,7 +14,8 @@ program hello
write(*,*) 'Hello, world: all ',np, & write(*,*) 'Hello, world: all ',np, &
& ' processes checked in!' & ' processes checked in!'
else else
call psb_snd(icontxt,idummy,0) ip = 0
call psb_snd(icontxt,idummy,ip)
endif endif
end if end if
call psb_exit(icontxt) call psb_exit(icontxt)

@ -19,7 +19,8 @@ program pingpong
write(*,*) 'Hello, world: all ',np, & write(*,*) 'Hello, world: all ',np, &
& ' processes checked in!' & ' processes checked in!'
else else
call psb_snd(icontxt,idummy,0) ip = 0
call psb_snd(icontxt,idummy,ip)
endif endif
end if end if
@ -27,9 +28,10 @@ program pingpong
call psb_barrier(icontxt) call psb_barrier(icontxt)
if (iam == 0) then if (iam == 0) then
do i=1, 16 do i=1, 16
ip = 1
t0 = psb_wtime() t0 = psb_wtime()
call psb_snd(icontxt,v(1:n),1) call psb_snd(icontxt,v(1:n),ip)
call psb_rcv(icontxt,v(1:n),1) call psb_rcv(icontxt,v(1:n),ip)
t1 = psb_wtime() t1 = psb_wtime()
bytes = done*n*psb_sizeof_dp bytes = done*n*psb_sizeof_dp
mbs = 2.d0*(bytes/(t1-t0))*1.d-6 mbs = 2.d0*(bytes/(t1-t0))*1.d-6
@ -38,8 +40,9 @@ program pingpong
end do end do
else if (iam == 1) then else if (iam == 1) then
do i=1, 16 do i=1, 16
call psb_rcv(icontxt,v(1:n),0) ip = 0
call psb_snd(icontxt,v(1:n),0) call psb_rcv(icontxt,v(1:n),ip)
call psb_snd(icontxt,v(1:n),ip)
n = n * 2 n = n * 2
end do end do
end if end if

@ -1,4 +1,4 @@
PRESSMAT1.mtx pde100.mtx
MM MM
0 0

Loading…
Cancel
Save