Fixes for handling IBM SP build process.

psblas3-type-indexed
Salvatore Filippone 20 years ago
parent 0b428f4c7d
commit db4312151f

@ -17,8 +17,9 @@ CCOPT=-O3
# Define your linker and linker flags here # # Define your linker and linker flags here #
########################################################## ##########################################################
F90LINK=/usr/local/mpich-g95/bin/mpif90 F90LINK=/usr/local/mpich-g95/bin/mpif90
FLINK=/usr/local/mpich-g95/mpif77 FLINK=/usr/local/mpich-g95/bin/mpif77
MPF90=/usr/local/mpich-g95/bin/mpif90 MPF90=/usr/local/mpich-g95/bin/mpif90
MPF77=/usr/local/mpich-g95/bin/mpif77
MPCC=/usr/local/mpich-g95/bin/mpicc MPCC=/usr/local/mpich-g95/bin/mpicc
####################### Section 3 ####################### ####################### Section 3 #######################
@ -26,6 +27,7 @@ MPCC=/usr/local/mpich-g95/bin/mpicc
########################################################## ##########################################################
BLAS=-lblas -L$(HOME)/LIB BLAS=-lblas -L$(HOME)/LIB
BLACS=-lmpiblacsg95 -L$(HOME)/LIB BLACS=-lmpiblacsg95 -L$(HOME)/LIB
EXTRA_BLACS_ENV_OBJS=extra_env.o
####################### Section 4 ####################### ####################### Section 4 #######################

@ -18,8 +18,9 @@ CCOPT=-O3 -ffast-math -march=pentium4 -msse2 -mfpmath=sse
# Define your linker and linker flags here # # Define your linker and linker flags here #
########################################################## ##########################################################
F90LINK=/usr/local/mpich-gfortran/bin/mpif90 F90LINK=/usr/local/mpich-gfortran/bin/mpif90
FLINK=/usr/local/mpich-gfortran/mpif77 FLINK=/usr/local/mpich-gfortran/bin/mpif77
MPF90=/usr/local/mpich-gfortran/bin/mpif90 MPF90=/usr/local/mpich-gfortran/bin/mpif90
MPF77=/usr/local/mpich-gfortran/bin/mpif77
MPCC=/usr/local/mpich-gfortran/bin/mpicc MPCC=/usr/local/mpich-gfortran/bin/mpicc
####################### Section 3 ####################### ####################### Section 3 #######################
@ -27,6 +28,7 @@ MPCC=/usr/local/mpich-gfortran/bin/mpicc
########################################################## ##########################################################
BLAS=-lblas-gcc41 -L$(HOME)/LIB BLAS=-lblas-gcc41 -L$(HOME)/LIB
BLACS=-lmpiblacs-gfortran -L$(HOME)/LIB BLACS=-lmpiblacs-gfortran -L$(HOME)/LIB
EXTRA_BLACS_ENV_OBJS=extra_env.o
####################### Section 4 ####################### ####################### Section 4 #######################

@ -18,8 +18,9 @@ CCOPT=-O3
# Define your linker and linker flags here # # Define your linker and linker flags here #
########################################################## ##########################################################
F90LINK=/usr/local/mpich-ifc71/bin/mpif90 F90LINK=/usr/local/mpich-ifc71/bin/mpif90
FLINK=/usr/local/mpich-ifc71/mpif77 FLINK=/usr/local/mpich-ifc71/bin/mpif77
MPF90=/usr/local/mpich-ifc71/bin/mpif90 MPF90=/usr/local/mpich-ifc71/bin/mpif90
MPF77=/usr/local/mpich-ifc71/bin/mpif77
MPCC=/usr/local/mpich-ifc71/bin/mpicc MPCC=/usr/local/mpich-ifc71/bin/mpicc
####################### Section 3 ####################### ####################### Section 3 #######################
@ -27,6 +28,7 @@ MPCC=/usr/local/mpich-ifc71/bin/mpicc
########################################################## ##########################################################
BLAS=-lblasintel -L$(HOME)/LIB BLAS=-lblasintel -L$(HOME)/LIB
BLACS=-lmpiblacsifc71 -L$(HOME)/LIB BLACS=-lmpiblacsifc71 -L$(HOME)/LIB
EXTRA_BLACS_ENV_OBJS=extra_env.o
####################### Section 4 ####################### ####################### Section 4 #######################

@ -18,8 +18,9 @@ CCOPT=-O3
# Define your linker and linker flags here # # Define your linker and linker flags here #
########################################################## ##########################################################
F90LINK=/usr/local/mpich-ifc80/bin/mpif90 -g -CB -no_cpprt F90LINK=/usr/local/mpich-ifc80/bin/mpif90 -g -CB -no_cpprt
FLINK=/usr/local/mpich-ifc80/mpif77 -g -CB -no_cpprt FLINK=/usr/local/mpich-ifc80/bin/mpif77 -g -CB -no_cpprt
MPF90=/usr/local/mpich-ifc80/bin/mpif90 -g -CB -no_cpprt MPF90=/usr/local/mpich-ifc80/bin/mpif90 -g -CB -no_cpprt
MPF77=/usr/local/mpich-ifc80/bin/mpif77 -g -CB -no_cpprt
MPCC=/usr/local/mpich-ifc80/bin/mpicc -g -CB -no_cpprt MPCC=/usr/local/mpich-ifc80/bin/mpicc -g -CB -no_cpprt
####################### Section 3 ####################### ####################### Section 3 #######################
@ -27,6 +28,7 @@ MPCC=/usr/local/mpich-ifc80/bin/mpicc -g -CB -no_cpprt
########################################################## ##########################################################
BLAS=-lblas-intel -L$(HOME)/NUMERICAL/LIB BLAS=-lblas-intel -L$(HOME)/NUMERICAL/LIB
BLACS=-lmpiblacs-intel -L$(HOME)/NUMERICAL/LIB BLACS=-lmpiblacs-intel -L$(HOME)/NUMERICAL/LIB
EXTRA_BLACS_ENV_OBJS=extra_env.o
####################### Section 4 ####################### ####################### Section 4 #######################

@ -18,8 +18,9 @@ CCOPT=-O2 -g -ggdb -pg
# Define your linker and linker flags here # # Define your linker and linker flags here #
########################################################## ##########################################################
F90LINK=/usr/local/mpich-pgi/bin/mpif90 F90LINK=/usr/local/mpich-pgi/bin/mpif90
FLINK=/usr/local/mpich-pgi/mpif77 FLINK=/usr/local/mpich-pgi/bin/mpif77
MPF90=/usr/local/mpich-pgi/bin/mpif90 MPF90=/usr/local/mpich-pgi/bin/mpif90
MPF77=/usr/local/mpich-pgi/bin/mpif77
MPCC=/usr/local/mpich-pgi/bin/mpicc MPCC=/usr/local/mpich-pgi/bin/mpicc
####################### Section 3 ####################### ####################### Section 3 #######################
@ -27,6 +28,7 @@ MPCC=/usr/local/mpich-pgi/bin/mpicc
########################################################## ##########################################################
BLAS=-lblas-pgi -L$(HOME)/LIB BLAS=-lblas-pgi -L$(HOME)/LIB
BLACS=-lmpiblacs-pgi -L$(HOME)/LIB BLACS=-lmpiblacs-pgi -L$(HOME)/LIB
EXTRA_BLACS_ENV_OBJS=extra_env.o
####################### Section 4 ####################### ####################### Section 4 #######################

@ -20,6 +20,7 @@ CCOPT=-O3
MPF90=mpxlf95 -qsuffix=f=f90 MPF90=mpxlf95 -qsuffix=f=f90
F90LINK=$(MPF90) F90LINK=$(MPF90)
FLINK=$(MPF90) FLINK=$(MPF90)
MPF77=mpxlf77
MPCC=mpxlc MPCC=mpxlc
####################### Section 3 ####################### ####################### Section 3 #######################
@ -27,6 +28,9 @@ MPCC=mpxlc
########################################################## ##########################################################
BLAS=-lessl BLAS=-lessl
BLACS=-lmpiblacs BLACS=-lmpiblacs
#These should be uncommented when using the ESSL BLACS library
#EXTRA_BLACS_P2P_OBJS= krecvid.o ksendid.o
EXTRA_BLACS_ENV_OBJS=extra_env_essl.o
####################### Section 4 ####################### ####################### Section 4 #######################

@ -2,26 +2,29 @@ include ../../Make.inc
FOBJS = psi_compute_size.o psi_crea_bnd_elem.o psi_crea_index.o \ FOBJS = psi_compute_size.o psi_crea_bnd_elem.o psi_crea_index.o \
psi_crea_ovr_elem.o psi_dl_check.o \ psi_crea_ovr_elem.o psi_dl_check.o \
psi_exist_ovr_elem.o psi_gthsct.o \ psi_gthsct.o \
psi_list_search.o psi_sort_dl.o srtlist.o psi_sort_dl.o $(EXTRA_BLACS_P2P_OBJS)
FOBJS2 = psi_exist_ovr_elem.o psi_list_search.o srtlist.o
COBJS = avltree.o srcht.o COBJS = avltree.o srcht.o
MPFOBJS = psi_dswapdata.o psi_dswaptran.o psi_iswapdata.o \ MPFOBJS = psi_dswapdata.o psi_dswaptran.o psi_iswapdata.o \
psi_iswaptran.o psi_extrct_dl.o psi_desc_index.o\ psi_iswaptran.o psi_desc_index.o \
psi_zswapdata.o psi_zswaptran.o psi_zswapdata.o psi_zswaptran.o
MPFOBJS2 = psi_extrct_dl.o
INCDIRS = -I ../../lib -I . INCDIRS = -I ../../lib -I .
LIBDIR = ../../lib LIBDIR = ../../lib
lib: mpfobjs $(FOBJS) $(COBJS) lib: mpfobjs $(FOBJS) $(FOBJS2) $(COBJS) $(MPFOBJS2)
$(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(FOBJS) $(COBJS) $(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(MPFOBJS2) $(FOBJS) $(FOBJS2) \
$(COBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME) $(RANLIB) $(LIBDIR)/$(LIBNAME)
mpfobjs: mpfobjs:
(make $(MPFOBJS) F90="$(MPF90)" FC="$(MPF90)" FCOPT="$(F90COPT)") (make $(MPFOBJS) F90="$(MPF90)" FC="$(MPF90)" FCOPT="$(F90COPT)")
(make $(MPFOBJS2) F90="$(MPF77)" FC="$(MPF77)" FCOPT="$(FCOPT)")
(make $(FOBJS2) F90="$(MPF77)" FC="$(MPF77)" FCOPT="$(FCOPT)")
clean: clean:
/bin/rm -f $(MPFOBJS) $(FOBJS) $(COBJS) /bin/rm -f $(MPFOBJS) $(FOBJS) $(COBJS) $(FOBJS2) $(MPFOBJS2)
veryclean: clean veryclean: clean

@ -0,0 +1,7 @@
integer function krecvid(contxt,proc_to_comm,myrow)
integer contxt,proc_to_comm,myrow
krecvid=32766
return
end

@ -0,0 +1,7 @@
integer function ksendid(contxt,proc_to_comm,myrow)
integer contxt,proc_to_comm,myrow
ksendid=32766
return
end

@ -6,7 +6,7 @@ LIBDIR=../../lib
HERE=. HERE=.
OBJS= psb_dcgstab.o psb_dcg.o psb_dcgs.o \ OBJS= psb_dcgstab.o psb_dcg.o psb_dcgs.o \
psb_dbicg.o psb_dcgstabl.o psb_dgmresr.o\ psb_dbicg.o psb_dcgstabl.o psb_dgmresr.o\
psb_zcgstab.o psb_zcgs.o psb_zcgstab.o psb_zcgs.o $(EXTRA_BLACS_ENV_OBJS)
INCDIRS=-I. -I.. -I$(LIBDIR) INCDIRS=-I. -I.. -I$(LIBDIR)

@ -0,0 +1,11 @@
subroutine psb_set_coher(icontxt,isvch)
integer :: icontxt, isvch
! Ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch)
Call blacs_set(icontxt,16,1)
end subroutine psb_set_coher
subroutine psb_restore_coher(icontxt,isvch)
integer :: icontxt, isvch
! Ensure global coherence for convergence checks.
Call blacs_set(icontxt,16,isvch)
end subroutine psb_restore_coher

@ -0,0 +1,13 @@
subroutine psb_set_coher(icontxt,isvch)
integer :: icontxt, isvch
! Ensure global coherence for convergence checks.
! Do nothing: ESSL does coherence by default,
! and does not handle req=16
!!$ Call blacs_get(icontxt,16,isvch)
!!$ Call blacs_set(icontxt,16,1)
end subroutine psb_set_coher
subroutine psb_restore_coher(icontxt,isvch)
integer :: icontxt, isvch
! Ensure global coherence for convergence checks.
!!$ Call blacs_set(icontxt,16,isvch)
end subroutine psb_restore_coher

@ -127,10 +127,8 @@ subroutine psb_dbicg(a,prec,b,x,eps,desc_a,info,&
n_row = desc_a%matrix_data(psb_n_row_) n_row = desc_a%matrix_data(psb_n_row_)
n_col = desc_a%matrix_data(psb_n_col_) n_col = desc_a%matrix_data(psb_n_col_)
! ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
call blacs_set(icontxt,16,ich)
if (present(istop)) then if (present(istop)) then
@ -344,8 +342,9 @@ subroutine psb_dbicg(a,prec,b,x,eps,desc_a,info,&
deallocate(aux) deallocate(aux)
call psb_gefree(wwrk,desc_a,info) call psb_gefree(wwrk,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
if(info/=0) then if(info/=0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -178,9 +178,7 @@ Subroutine psb_dcg(a,prec,b,x,eps,desc_a,info,&
itx=0 itx=0
! Ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
call blacs_set(icontxt,16,ich)
restart: do restart: do
!!$ !!$
@ -273,8 +271,9 @@ Subroutine psb_dcg(a,prec,b,x,eps,desc_a,info,&
deallocate(aux) deallocate(aux)
call psb_gefree(wwrk,desc_a,info) call psb_gefree(wwrk,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
if (info.ne.0) then if (info.ne.0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -186,10 +186,8 @@ Subroutine psb_dcgs(a,prec,b,x,eps,desc_a,info,&
itrac = -1 itrac = -1
End If End If
! ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
Call blacs_set(icontxt,16,ich)
diagl = 'u' diagl = 'u'
diagu = 'u' diagu = 'u'
@ -336,8 +334,9 @@ Subroutine psb_dcgs(a,prec,b,x,eps,desc_a,info,&
Deallocate(aux) Deallocate(aux)
Call psb_gefree(wwrk,desc_a,info) Call psb_gefree(wwrk,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
Call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
if(info/=0) then if(info/=0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -191,9 +191,7 @@ Subroutine psb_dcgstab(a,prec,b,x,eps,desc_a,info,&
diagu = 'U' diagu = 'U'
! Ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
Call blacs_set(icontxt,16,ich)
itx = 0 itx = 0
@ -391,7 +389,7 @@ Subroutine psb_dcgstab(a,prec,b,x,eps,desc_a,info,&
Deallocate(aux) Deallocate(aux)
Call psb_gefree(wwrk,desc_a,info) Call psb_gefree(wwrk,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
Call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
!!$ imerr = MPE_Log_event( istpe, 0, "ed CGSTAB" ) !!$ imerr = MPE_Log_event( istpe, 0, "ed CGSTAB" )
if(info/=0) then if(info/=0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -206,10 +206,8 @@ Subroutine psb_dcgstabl(a,prec,b,x,eps,desc_a,info,&
ww => wwrk(:,9) ww => wwrk(:,9)
rt0 => wwrk(:,10) rt0 => wwrk(:,10)
! ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
Call blacs_set(icontxt,16,ich)
if (istop_ == 1) then if (istop_ == 1) then
ani = psb_spnrmi(a,desc_a,info) ani = psb_spnrmi(a,desc_a,info)
@ -400,8 +398,9 @@ Subroutine psb_dcgstabl(a,prec,b,x,eps,desc_a,info,&
Call psb_gefree(wwrk,desc_a,info) Call psb_gefree(wwrk,desc_a,info)
Call psb_gefree(uh,desc_a,info) Call psb_gefree(uh,desc_a,info)
Call psb_gefree(rh,desc_a,info) Call psb_gefree(rh,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
Call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
if(info/=0) then if(info/=0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -199,10 +199,9 @@ Subroutine psb_dgmresr(a,prec,b,x,eps,desc_a,info,&
End If End If
if (debug) write(0,*) 'Size of V,W ',size(v),size(v,1),& if (debug) write(0,*) 'Size of V,W ',size(v),size(v,1),&
&size(w),size(w,1), size(v(:,1)) &size(w),size(w,1), size(v(:,1))
! ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch) ! Ensure global coherence for convergence checks.
ich = 1 call psb_set_coher(icontxt,isvch)
Call blacs_set(icontxt,16,ich)
if (istop_ == 1) then if (istop_ == 1) then
ani = psb_spnrmi(a,desc_a,info) ani = psb_spnrmi(a,desc_a,info)
@ -348,8 +347,9 @@ Subroutine psb_dgmresr(a,prec,b,x,eps,desc_a,info,&
Deallocate(aux,h,c,s,rs,rr, stat=info) Deallocate(aux,h,c,s,rs,rr, stat=info)
Call psb_gefree(v,desc_a,info) Call psb_gefree(v,desc_a,info)
Call psb_gefree(w,desc_a,info) Call psb_gefree(w,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
Call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
if (info /= 0) then if (info /= 0) then
info=4011 info=4011

@ -186,10 +186,8 @@ Subroutine psb_zcgs(a,prec,b,x,eps,desc_a,info,&
itrac = -1 itrac = -1
End If End If
! ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
Call blacs_set(icontxt,16,ich)
diagl = 'u' diagl = 'u'
diagu = 'u' diagu = 'u'
@ -336,8 +334,9 @@ Subroutine psb_zcgs(a,prec,b,x,eps,desc_a,info,&
Deallocate(aux) Deallocate(aux)
Call psb_gefree(wwrk,desc_a,info) Call psb_gefree(wwrk,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
Call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
if(info/=0) then if(info/=0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -191,9 +191,7 @@ Subroutine psb_zcgstab(a,prec,b,x,eps,desc_a,info,&
diagu = 'U' diagu = 'U'
! Ensure global coherence for convergence checks. ! Ensure global coherence for convergence checks.
Call blacs_get(icontxt,16,isvch) call psb_set_coher(icontxt,isvch)
ich = 1
Call blacs_set(icontxt,16,ich)
itx = 0 itx = 0
@ -389,8 +387,10 @@ Subroutine psb_zcgstab(a,prec,b,x,eps,desc_a,info,&
Deallocate(aux) Deallocate(aux)
Call psb_gefree(wwrk,desc_a,info) Call psb_gefree(wwrk,desc_a,info)
! restore external global coherence behaviour ! restore external global coherence behaviour
Call blacs_set(icontxt,16,isvch) call psb_restore_coher(icontxt,isvch)
!!$ imerr = MPE_Log_event( istpe, 0, "ed CGSTAB" ) !!$ imerr = MPE_Log_event( istpe, 0, "ed CGSTAB" )
if(info/=0) then if(info/=0) then
call psb_errpush(info,name) call psb_errpush(info,name)

@ -69,7 +69,7 @@ Contains
if(psb_get_errstatus().ne.0) return if(psb_get_errstatus().ne.0) return
info=0 info=0
if (debug) write(0,*) 'reallocate I',len if (debug) write(0,*) 'reallocate I',len
if (associated(rrax)) then a if (associated(rrax)) then
dim=size(rrax) dim=size(rrax)
If (dim /= len) Then If (dim /= len) Then
Allocate(tmp(len),stat=info) Allocate(tmp(len),stat=info)

@ -21,7 +21,7 @@ F90OBJS=psb_dasmatbld.o psb_dslu_bld.o psb_dumf_bld.o psb_dilu_fct.o\
COBJS=psb_slu_impl.o psb_umf_impl.o psb_zslu_impl.o psb_zumf_impl.o COBJS=psb_slu_impl.o psb_umf_impl.o psb_zslu_impl.o psb_zumf_impl.o
INCDIRS=-I. -I.. -I$(LIBDIR) INCDIRS=-I. -I.. -I$(LIBDIR)
OBJS=$(F90OBJS) $(COBJS) OBJS=$(F90OBJS) $(COBJS) $(MPFOBJS)
lib: mpobjs $(OBJS) lib: mpobjs $(OBJS)
$(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(OBJS) $(AR) $(LIBDIR)/$(LIBNAME) $(MPFOBJS) $(OBJS)

@ -348,7 +348,7 @@ contains
type(psb_zspmat_type) :: am3,am4 type(psb_zspmat_type) :: am3,am4
logical :: ml_global_nmb logical :: ml_global_nmb
logical, parameter :: test_dump=.false. logical, parameter :: test_dump=.false., debug=.false.
integer, parameter :: ncmax=16 integer, parameter :: ncmax=16
real(kind(1.d0)) :: omega, anorm, tmp, dg real(kind(1.d0)) :: omega, anorm, tmp, dg
character(len=20) :: name, ch_err character(len=20) :: name, ch_err

Loading…
Cancel
Save