[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: UNICOS ncsync() question
- Subject: Re: UNICOS ncsync() question
- Date: Fri, 20 Sep 1996 12:32:28 -0600
> From: Christi Forsythe <address@hidden>
> Subject: cray optimization
> To: address@hidden
> Date: Fri, 20 Sep 1996 11:19:18 -0600 (MDT)
> Cc: address@hidden, address@hidden, address@hidden
>
> I have some more questions about the unicos optimization. A couple weeks
> ago I sent you email regarding our problem with one of our analysis codes
> creating an output file, but missing all the data. I checked the code
> and indeed it did not use the NCCLOS command to close all its files.
> I'm still testing this solution but it looks like its working.
>
> Our engineers use these finite element codes for their analysis.
> Sometime the codes crash/die/stop.... and in order to debug the codes
> they need to be able to view the last written results. What our codes
> do is write data to the output file at each time step and then
> call ncsync to make sure all the data is in the file.
> Now, if our codes do not run to completion, and the file is not
> closed with an ncclos call, there seems to be this
> possibility that a lot of data is lost.
As you suggest below, checkpointing with ncsync is a possibility.
If your program is in 'C', and exits "normally" in some sense,
you might be able to use the system library call "atexit()" to your
advantage, something like this:
int ncid = -1;
void
cleanup()
{
if(ncid != -1)
{
/* open'ed the netcdf okay */
(void) ncclose(ncid)
}
}
main()
{
...
ncid = ncopen(....);
if(atexit(cleanup) != 0)
{
/* call to atexit() failed. */
}
...
}
> Does ncsync not work with
> this unicos optimization?
ncsync() calls NCxdrfile_sync() which calls the ffio routine ffflush(),
(when ffio is the package in use :-)). So, I believe the answer to your
question is yes. However, I'm not an expert on ffio.
> Is there a work around to this problem?
> We have been running with NETCDF_FFIOSPEC = bufa:336:2 and have been
> getting all the results. Is this going to be our only option?
>
>
> Christi Forsythe
Hope this helps.
-glenn