Re: Problems with compiling/executing atm program on Sun Workstation


Subject: Re: Problems with compiling/executing atm program on Sun Workstation
From: Jim Rosinski (rosinski@bearmtn-e0.cgd.ucar.edu)
Date: Wed Jan 20 1999 - 12:26:50 MST


On Tue, 19 Jan 1999, Aidan Heerdegen wrote:

> Segmentation fault (core dumped)
>
> Definesurf seems to be writing the SGH and PHIS fields out with a 90 degree
> shift in longitude i.e. the data for South America appears just east of Africa!

Trying to make sense out of a netcdf file written by a job which was not
run to completion (e.g. seg faulted) is likely to be a fruitless exercise.
Since netcdf writes random access files with liberal use of buffering, there
are no guarantees that calls to routines like "NF_PUT_VAR" actually result in
data being disk-resident immediately after the call. Or even after the
program terminates in this case, since the seg fault likely occurred *before*
the NF_CLOSE call which would have flushed the buffers.

I don't know what resolution you are interpolating to, but one thing to try
might be to interpolate to a very low resolution (e.g. 16x8) and see if that
works. If it works, I would suspect a stacksize problem as the cause of the
seg fault for the higher resolution case.

> The pc (Power Challenge) is an SGI machinem and the -stackvar compiler
> flag is not used.

Right. Compiler flags which do the same thing often differ drastically from
machine to machine. You have to read the man page for the compiler to find
out how to accomplish the specific task. "man f90" on an SGI PC here at NCAR
reveals the flag:

     -static Statically allocates all local variables.

Thus to disable default stack memory allocation for local variables on an
SGI PC, you need to pass the -static flag to the f90 compiler.

Regards,

Jim Rosinski
CCM Core Group



This archive was generated by hypermail 2b27 : Thu Jun 01 2000 - 09:26:33 MDT