replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - ALLOCATE halts the execution
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ALLOCATE halts the execution

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
johannes



Joined: 21 Jan 2011
Posts: 65
Location: Leimen, Germany

PostPosted: Sun Oct 27, 2013 10:30 am    Post subject: ALLOCATE halts the execution Reply with quote

Hi all,
I'm making a strange observation, which I cannot reproduce in a short test program (below), which runs well however. I'm allocating and deallocating arrarys in a loop with dynamic file size. My 'large' program halts, without any notice or message, at allocate in the second call of sub. All previous allocates and deallocates return a STAT value of 0.

Code:
MODULE common
Real,Allocatable :: A(:,:)
END Module

PROGRAM alloctest
USE common
1 continue
ALLOCATE (A(10,10))
print *,'Allocated'
A=12345.
print *,'Now deallocate'
DEALLOCATE (A)
print *,'Allocated again'
ALLOCATE (A(20,20))
print *,'Now deallocate'
DEALLOCATE (A)
CALL sub()
pause 'next lap'
goto 1
END
Subroutine sub()
USE common
print *,'sub called.'
print *,'Allocated again'
ALLOCATE (A(5,5))
print *,'Now deallocate'
DEALLOCATE (A)
print *,'sub left'
RETURN
END

I have to add that I use third-party widget routines and call-back functions.

What I want to know is, how to get any diagnostic information.
Best regards, johannes
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sun Oct 27, 2013 4:11 pm    Post subject: Reply with quote

What is the IOSTAT value on failure?
Back to top
View user's profile Send private message AIM Address
johannes



Joined: 21 Jan 2011
Posts: 65
Location: Leimen, Germany

PostPosted: Mon Oct 28, 2013 3:19 pm    Post subject: Reply with quote

Hi Paul,
there is no failure before this special weired allocate. All previous STAT had been 0.
I was wondering whether ALLOCATABLE inside a module and subsequent frequent changes in array dimensions could be a problem, but the little test routine runs well. That looks strange to me.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Mon Oct 28, 2013 3:46 pm    Post subject: Reply with quote

But what is the IOSTAT value after the ALLOCATE that fails.
It should be non-zero but what is this non-zero value?
Back to top
View user's profile Send private message AIM Address
johannes



Joined: 21 Jan 2011
Posts: 65
Location: Leimen, Germany

PostPosted: Mon Oct 28, 2013 5:03 pm    Post subject: Reply with quote

There is no 'after'. It stops at allocation, as if it was waiting for some input. The test print after allocate is no more executed. The array size is small and no activities in the task manager are visible.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Mon Oct 28, 2013 6:04 pm    Post subject: Reply with quote

Have you tried using the debugger to run to the point at which it fails?
Back to top
View user's profile Send private message AIM Address
johannes



Joined: 21 Jan 2011
Posts: 65
Location: Leimen, Germany

PostPosted: Mon Oct 28, 2013 6:21 pm    Post subject: Reply with quote

Hi Paul,
just done. There seems to be a problem in the call back djungle.
I think you answered my question about more diagnostics.
Thanks
johannes
PS: Let me delete this request somewhen later
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group