Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

allcoatable arrays can't be allocated and allocated arrays can't be deallocated

$
0
0

Hi,

Here is the code:

                   ......

                    deallocate(chebft_y)                      

                    N2wave=int((xrhomax2-xrhomin)/(2*xwavebjmin))      
                    if (N2wave .lt. 1) then
                        !c       if (.true.) then
                        !ccccccccccccccccc
                        !ccccc      
                        write(*,*)'N2wave is less than 1.' 
                        mxy=int(mxyunit1*(xrhomax2-xrhomin)/(2*xwavebjmin))
                        if (mxy .lt. NPmin) then
                            mxy = NPmin
                        endif
                        write(*,*)'mxy=', mxy
                        allocate(rkho(0:mxy-1),gllY(mxy),gllX(mxy),gllW(mxy))      

                        ......

The array chebft_y is allocated ( I have checked its elements), but when deallocating it, it says 'BSEM_90.exe has triggered a breakpoint' and a No Source Available window comes out. But in the debugging window, no error hints show. 

I tried putting this part into a subroutine which is also used in other place. When first call this subroutine, no problems shows. However, when call this subroutine the second time, a similar problem shows. But the strange thing is sometimes the chebft_y can be allocated, sometimes it can't be. When it can be allocated, the last allocate operation for (rkho, gllY...) can not run and also shows ' exe has triggered a breakpoint' and a runtime error window saying 'R6025 - pure virtual function call', still no other error hints in the debugging window. 

Where may be the problem? Thanks~ If need further information is needed, please tell me!

 

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>