Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Recursive I/O operation

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Duke_K

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-12-2012
07:34 AM

112 Views

Recursive I/O operation

I'm coding pretty big program on cluster, and in one of the subroutines (big_one) I have 2 external routines (their codes are in the end of my message) for computing max eigenvalue. When I'm using one of them, program works. When I'm using another one program exits with error:

forrtl: severe (40): recursive I/O operation, unit -1, file unknownI don't understand logic of error's appearence. It connected somehow with operators sort of "write(*,*) .... ", but why there is recursive operation, I don't know. By throwing out such operators I can delay error, but eventually it happens around such operator. Maybe, deleting all of them will help, but I'd like to understand what's happening. I'll be grateful for any suggestions and advice.

1) routine, which works:

...

END SUBROUTINE big_one

real*8 function maxermeig(N,A) !ne uchityvaetsa symmetrichnost'

!computes maximal eigenvalue of (A+A*)/2

implicit none

integer, intent (in) :: N

real*8 RWORK(N), eig_max

complex*16, intent (in) :: A(N,N)

complex*16 VL(1,1), VR(1,1), W(N), WORK(3*N)

integer INFO, LDA, LDVL, LDVR, LWORK, i

LDA=N

LDVL=1

LDVR=1

LWORK=3*N

call ZGEEV('N','N',N,(A+conjg(transpose(A)))/2.d0,LDA,W,vL,LDVL,VR,LDVR,WORK,LWORK,RWORK,INFO)

if (INFO.ne.0) then

write(*,*) 'maxermeig warning, info=',INFO

endif

eig_max=-4.D+100

do i=1,N

if (dble(w(i)).gt.eig_max) then

eig_max=dble(w(i))

endif

enddo

maxermeig=eig_max

end function maxermeig

2) routine, which crushes program:

Unfortunately, cluster has gone down and I don't have its code right now. The thing is - matrix is symmetric, so I wanted to use this and find it's eigenvalue by proper routines. I used zhetrd to reduce matrix and dsterg to solve problem.

Link Copied

2 Replies

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-12-2012
08:29 AM

112 Views

The cure is simple. Instead of coding

write(..,..) aa,bb,maxermeig(...),...

do

tmpvar = maxermeig(...)

write(...,...) aa,bb,tmpvar,...

duke_k1

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-13-2012
02:55 AM

112 Views

But anyway thanks for reply, mecej4.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.