Re: Segmentation fault when reading from DODs server

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 25 2011 - 11:08:22 MDT

I agree with Mary that we would need to be able to trigger the problem ourselves in order to have a chance of debugging and fixing it. So it would be very helpful if you could send the script and enough information for us to run it. But it would also be interesting to know if Mary's suggestion below helps with the problem.
  -dave

On Mar 25, 2011, at 9:10 AM, Mary Haley wrote:

> Hi Andrea,
>
> Dave will probably have to jump in here, because I think there's not much you can do once NCL hits a seg fault. This causes the script to end no matter what.
>
> However, *maybe* adding a "isfilepresent" will help with checking that the file is there before you try to access it. Of course, if the timing is not right, the file could be "present" when you execute "isfilepresent", and then the network could hiccup just after that and then the addfile would bomb.
>
> So, try adding something like inside your do loop across each file. You may want to add some kind of extra counter check so that it doesn't enter an infinite loop if it can't access the file.
>
> NTRIES = 10 ; Number of times to try before giving up.
> GOT_FILE = False
>
> ntries = 0 ; counter
> do while(.not.GOT_FILE.and.ntries.lt.NTRIES)
> if(isfilepresent(filename)) then
> a = addfile(filename,"r")
> GOT_FILE = True
> print(filename + " read successfully.")
> else
> print("error: " + filename + " not accessible at this time, will try agai\
> n")
> ntries = ntries + 1
> end if
> end do
>
> If possible, we'd like to try to fix this problem. Would you be able to provide us with the script, or even just the names of the files (and variables) you're trying to access, and we'll see if we have a problem on our end?
>
> Thanks,
>
> --Mary
>
> On Mar 25, 2011, at 7:50 AM, Andrea Hahmann wrote:
>
>> Dear NCLelers,
>>
>> I have written a script to extract a sub-set of model fields from (very large) CFSR reanalysis datasets using a DODs version of NCL. Its is saving a lot of time not to have to transfer these big files over the network. However, as the script goes along over a time loop it sometimes gives a “segmentation fault” and the script stops. Then, by hand I have to restart the script and it continues on past the date that gave the original problem. I suspect there are occasional problems with the network, but I have not been able to confirm this. So, my question is: Is there any way to make the script “retry” the addfile preventing the segmentation fault to occur and the script to stop? Any other suggestions?
>>
>> Thanks in advance for any guidance.
>> Andrea
>> --
>>
>> Andrea N. Hahmann
>> Senior Scientist
>> Wind Energy Division
>> Risø DTU
>>
>> Technical University of Denmark
>> Risø National Laboratory for Sustainable Energy
>> Frederikborgvej 399, P.O. Box 49
>> 4000 Roskilde, Denmark
>>
>> Direct +45 4677 5471
>> Mobil: +45 2133 0550
>> ahah@risoe.dtu.dk
>> www.risoe.dtu.dk
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 25 11:08:23 2011

This archive was generated by hypermail 2.1.8 : Mon Mar 28 2011 - 08:51:50 MDT