[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 19990524: problem with UDUNITS



Lianmei,

[I used to work at RSMAS with Otis Brown.  Is "Lianmei" your given
name?]

> To: address@hidden
> From: Lianmei Gao <address@hidden>
> Subject: problem with UDUNITS
> Organization: Rosenstiel School of Marine and Atmospheric Science 
> (RSMAS)/University of Miami
> Keywords: 199905241550.JAA27700

In the above message, you wrote:

> presently, I'm encountering a fatal failure when executing a FORTRAN
> program "readgeneral.f" that reads the netCDF formatted NCEP/NCAR
> reanalysis data from the CDC. Dr. Roland Schweitzer, who programmed the
> codes, suggested it might be with the declaration of the variable unitptr,
> and suggested me to contact you for more help.
> 
> FYI, I'm running the program on a DEC alphaserver 2100. The error occurs
> in the subroutine gridread right after the command line of
> retcode = utdec(unitstr,unitptr). the errer msg shows:
> ---------
>  function utmake ok
> Unaligned access pid=23018 <a.out> va=0x11ffff8c4 pc=0x120018d18
> ra=0x1200062a0 inst=0xa62a00
> 00
>  function utdec ok
> Unaligned access pid=23018 <a.out> va=0x11ffff8c4 pc=0x1200171dc
> ra=0x1200062e8 inst=0xa61000
> 00
> Segmentation fault
> ---------
> 
> In the header file udunits.inc and the main program, all pointer variables
> are defined as interger*4. I didnot change anything for their use on a DEC
> alpha machine.

That might be the problem.  On a DEC Aplha, pointers are 64-bit
entities.  I suggest that you 

    1.  Remove your program and all object files associated with it; then
    
    2.  Change the definition of PTR in "udunits.inc" from "integer" to
        "unsigned long".  Be sure to install the new "udunits.inc".

    3.  Recompile and relink your program.

Please let me know if this helps.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.