program frank5_sample_dd use ddcommunication_s, only : eigen_init & , eigen_free implicit double precision (a-h,o-v,x-z) double precision, allocatable :: ah(:,:), al(:,:) double precision, pointer :: bh(:), bl(:) double precision, pointer :: zh(:), zl(:) double precision, pointer :: wh(:), wl(:) logical iexist ! include 'mpif.h' include 'trd.h' ! call mpi_init(ierr) call mpi_comm_rank(mpi_comm_world,i$inod,ierr) call mpi_comm_size(mpi_comm_world,i$nnod,ierr) n=5 allocate(ah(n,n),al(n,n)) call eigen_init(2) NPROW = size_of_col NPCOL = size_of_row nx = ((n-1)/NPROW+1) call CSTAB_get_optdim(nx, 2, 1, 2, nm) ! call CSTAB_get_optdim(nx, 6, 16*4, 16*4*2, nm) call eigen_free(0) NB = 32 ! NB = 64+32 nmz = ((n-1)/NPROW+1) nmz = ((nmz-1)/NB+1)*NB+1 nmw = ((n-1)/NPCOL+1) nmw = ((nmw-1)/NB+1)*NB+1 larray = MAX(nmz,nm)*nmw allocate( bh(larray), bl(larray),zh(larray),zl(larray), & wh(n),wl(n), stat=istat) if(istat.ne.0) then print*,"Memory exhausted" call flush(6) stop endif ah(1,1:5) = (/ 5.0d0, 4.0d0, 3.0d0, 2.0d0, 1.0d0 /) ah(2,1:5) = (/ 4.0d0, 4.0d0, 3.0d0, 2.0d0, 1.0d0 /) ah(3,1:5) = (/ 3.0d0, 3.0d0, 3.0d0, 2.0d0, 1.0d0 /) ah(4,1:5) = (/ 2.0d0, 2.0d0, 2.0d0, 2.0d0, 1.0d0 /) ah(5,1:5) = (/ 1.0d0, 1.0d0, 1.0d0, 1.0d0, 1.0d0 /) al(1,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /) al(2,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /) al(3,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /) al(4,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /) al(5,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /) call ddmatrix_adjust_s(n, ah, al, bh, bl, nm) call ddeigen_s(n, bh, bl, nm, wh, wl, zh, zl, nm, m, 1) write(*,*) 'EigenValue=', wh deallocate(ah,al) deallocate(bh,bl) deallocate(zh,zl) deallocate(wh,wl) * call MPI_Finalize(ierr) end