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

20020813: UDUNITS use on DEC Alpha/OSF1: utmake() return value



Yukiko Fukuda,

>Date: Mon, 9 Sep 2002 18:21:03 +0900 
>From: =?iso-2022-jp?B?GyRCSiFFRCEhTSc1KjtSGyhK?= <address@hidden>
>Organization: CTI CO., LTD.
>To: Steve Emmerson <address@hidden>
>Subject: RE: 20020813: UDUNITS use on DEC Alpha/OSF1:
>Keywords: 200209090920.g899Kkj25488

The above message contained the following:

> Some days ago, I was helped you to install UDUNUTS on DEC Alpha/OSF1.
> Though I was successful in installing and compiling it ,
> as I try to read data, it failed.
> 
> The error was occured around
> 
>       unitptr = utmale()
>       retcode = utdec (unitstr , unitptr)
>       retcode = uttime (unitptr)
> 
> and output was following,
> 
>       unitptr = 1129507172
>       retcode = utdec (unitstr , unitptr) = -3
> 
> I tryed 
> 
>       integer*4 utptr   $B"*(J   integer*8 unitptr
> 
> then, it calculated to the very end but,
> the next messege outputed.
> 
>       Unaliged access pid=$B!D(J < > va=$B!D(J pc=$B!D(J ra=$B!D(J 
> inst=$B!D(J

Please add the following to your code:

        integer*8 utmake

Also, ensure that "unitptr" (or "utptr") is declared "integer*8".

> Then next comment is written in Fortran man pages
> 
>       HANDLING TIME
>               $B!&!&!&!&!&(J
> 
>       EXAMPLES
>         In the following, it is assumed that a FORTRAN INTEGER  data
>         type  is appropriate for storing a pointer to a C structure.
>         This assumption is valid for most 32-bit  architectures  but
>         is  invalid  for  most 64-bit architectures that have 32-bit
>         INTEGERs (e.g. a DEC Alpha).
> 
> I can't understand this mean well.
> Is anything concerned this ?

In gereral, on a 64-bit system such as the Alpha, you should declare any
function that returns a pointer-to-a-unit (e.g. "utmake") and any
variable that holds such a value to be "integer*8".

If you still have unaligned memory access problems, then you can use the
uac(1) utility to set how the operating system handles unaligned memory
accesses -- including automatically fixing them. Unfortunately, I don't
recall the arguments to the utility. I suggest you do a 'man 1 uac' to
get more information on how to use it.

> I'm sorry my poor undetstand in English.

You're English is much, much better than my Japanese.

> If you have anything to suggest me,
> could you tell me them?
> 
> Sincerely yours,
> 
> ------------------------------
>   Yukiko Fukuda
>   CTI CO., LTD.
>   e-mail : address@hidden

Please let me know if this helps.

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