module my_data implicit none INTEGER, ALLOCATABLE:: IAP(:), JA(:) Double precision, ALLOCATABLE:: A(:), DA(:,:), ax(:), ss0(:), cc0(:), sx(:) Integer mode integer, allocatable:: start_row(:) Integer m, n Double precision s0,s1 end module my_data program dpca_file Use my_data use omp_lib IMPLICIT NONE integer ldv, ldu, iparam(11), ipntr(11) Double precision t1 Double precision, ALLOCATABLE:: & v(:,:), u(:,:), workl(:), workd(:), & s(:,:), resid(:) logical, ALLOCATABLE:: select(:) ! ! %---------------% ! | Local Scalars | ! %---------------% ! CHARACTER*1000 ARG1, ARG2, ARG3, ARG4 character bmat*1, which*2 integer ido, nev, ncv, lworkl, info, ierr, & accuracy, j, ishfts, maxitr, mode1, nconv, i, k, w, y integer maxthreads, n0, t, k1, k0, l0, l1 logical rvec Double precision tol, sigma, temp, temp2, sum0, sum1, alpha ! ! %------------% ! | Parameters | ! %------------% ! Double precision two, one, zero parameter (two = 2.0D+0, one = 1.0D+0, zero = 0.0D+0) ! ! %-----------------------------% ! | BLAS & LAPACK routines used | ! %-----------------------------% ! Double precision dnrm2 external dnrm2, daxpy, dcopy, dscal ! ! %-----------------------% ! | Executable Statements | ! %-----------------------% ! ! %-------------------------------------------------% ! | The following include statement and assignments | ! | initiate trace output from the internal | ! | actions of ARPACK. See debug.doc in the | ! | DOCUMENTS directory for usage. Initially, the | ! | most useful information will be a breakdown of | ! | time spent in the various stages of computation | ! | given by setting msaupd = 1. | ! %-------------------------------------------------% ! include 'debug.h' ndigit = -3 logfil = 6 msgets = 0 msaitr = 0 msapps = 0 msaupd = 1 msaup2 = 0 mseigt = 0 mseupd = 0 ! ! %-------------------------------------------------% ! | The following sets dimensions for this problem. | ! %-------------------------------------------------% ! CALL GETARG(1,ARG1) CALL GETARG(2,ARG2) CALL GETARG(3,ARG3) CALL GETARG(4,ARG4) READ (ARG1,*) nev READ (ARG2,*) ncv WRITE (*,*) nev, ncv READ (ARG3,*) accuracy tol = 10.0D0**(-accuracy) open(18,file=ARG4,status='old') READ (18,*) m READ (18,*) n READ (18,*) w ldu = m ldv = n WRITE (*,*) m, n, w ALLOCATE( s(ncv,2) ) ALLOCATE( select(ncv) ) ALLOCATE( IAP( m+1 ), JA( w ), A( w ) ) k = 1 y = 1 IAP(k) = y sum0 = zero 998 READ (18,*, end=999) i,j,alpha IF (i+1 .NE. k) THEN if (k+1 .lt. i+1) write (*,*) 'not row full rank' DO k=k+1,i+1 IAP(k)=y enddo k = i+1 ENDIF JA(y)=j+1 sum0=sum0+alpha*alpha A(y)=alpha y=y+1 go to 998 999 if (k+1 .lt. m+1) write (*,*) 'not row full rank' DO k=k+1,m+1 IAP(k)=y enddo close(18) maxthreads=omp_get_max_threads() ALLOCATE (start_row(maxthreads+1)) n0 = w/maxthreads t=0 i=0 do while (i