ATMET.com Forum Index ATMET.com
RAMS - HYPACT - REVU Discussion Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Transfer future into past (metp problem)

 
Post new topic   Reply to topic    ATMET.com Forum Index -> HYPACT Support
           
View previous topic :: View next topic  
Author Message
TROICA
New Forum Member


Joined: 12 Mar 2007
Posts: 6

PostPosted: Mon - 18 Jan 2010 - 10:23 am    Post subject: Transfer future into past (metp problem) Reply with quote

Hi Craig,

We used RAMS 6.0/HYPACT 1.5 in the project TROICA. The program stops in an error (segmentation fault), in forum we read that other person have same problem.

1. The problem appears in line
…..
hmet_update(npts,metc(ng)%v(1,1,1),metp(ng)%v(1,1,1),metf(ng)%v(1,1,1),wtp)
(hyp_gridavg () in hrdanal.f90)
The variable metp(ng)%v(k,i,j) give the error.

If cross error back, easy to find that this subroutine call from
…..
if (mod(hytime,freqavg) <dtpart>1) ,
you several time call (in section ‘future in past’)
……
call hyp_rdanal (metf(ng),ifutfl(ng),ng)
(hrdriv.f90)
……..
which several time call deallocate memory
……
call dealloc_met(met)


In this situation the program simply clean memory, so local variable metp(ng) is out of visible.

I think, that line (in section ‘future in past’)
…..
metp(ng)=metf(ng)
(hrdriv.f90)
give only pointer to array metp, not allocate real place in memory. It’s true, or isn’t?

I found in hrdanal.f90 allocated for metc.
The allocate memory for metf give subroutine hyp_rdanal (metf(ng),ifutfl(ng),ng).
But I don’t found any allocated for metp.
How fix this problem?

Thank you in advance,
Project TROICA
Back to top
View user's profile Send private message
tremback
Administrator


Joined: 30 Oct 2003
Posts: 2214
Location: Boulder, Colorado (sometimes)

PostPosted: Wed - 20 Jan 2010 - 5:48 pm    Post subject: Reply with quote

Sorry, I'm not quite following the explanation. metp is first allocated in hyp_setup, then it should never be deallocated. In hdriv.f90 (about lines 120-140), metf is assigned to metp (that is a copy of the entire structure). hyp_rdanal is called with metf, which will deallocate it, then allocate it again.

Is this crashing after a long period of simulation? It's possible that the system is not reusing the deallocated memory, so the allocations might stop working after a while.
_________________
- Craig
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    ATMET.com Forum Index -> HYPACT Support All times are GMT
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