The first time I submitted this post, it didn't appear in the forum, so I'm posting it again. Each time through a do loop I am allocating, calculating, and deallocating a set of arrays. The second time through the loop all is well until deallocating where an exception is thrown. I am checking the ALLOCATED property before deallocating, and it looks ok. But something is not right and the exception is 100% repeatable. All the arrays are local to the subroutine, and are declared with the ALLOCATABLE property. Is there anything special one should do when using a set of arrays in such a fashion? The arrays are small. Just a few hundred elements each. Some are REAL, some are COMPLEX. Here's how I'm doing it for each array. Complex(8), ALLOCATABLE :: EIVEC_COMPLEX(:,:) do i=1,whatever ALLOCATE (EIVEC_COMPLEX(N4,N4)) if( allocated(EIVEC_COMPLEX) ) DEALLOCATE (EIVEC_COMPLEX) end do Thanks, Brian in Austin, Texas
For more complete information about compiler optimizations, see our Optimization Notice.