[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20020814: McIDAS-X v2002 MAP errors on GMS image IMGCOPYed to SPARC (cont.)
- Subject: 20020814: McIDAS-X v2002 MAP errors on GMS image IMGCOPYed to SPARC (cont.)
- Date: Wed, 14 Aug 2002 13:01:18 -0600
>From: Unidata Support <address@hidden>
>Organization: UCAR/Unidata
>Keywords: McIDAS-X v2002 Linux GMS IMGCOPY
Robert,
Well, I found out why displaying a GMS image specifying a LAT,LON point
for a load:
IMGDISP MYDATA/IMAGES.1234 LATLON=-23 -134
and drawing a MAP on top of it will fail
MAP SAT
under RedHat 7.1 Linux.
The problem is actually in the version of g77 shipped with RH 7.1. In
that version, the code used for the ICHAR Fortran intrinsic will return
negative values byte values where the most significant bit of the byte
is set. This goes against the ANSI standard (just looked it up), so it
is incorrect.
I went to www.groups.google.com and did a search using 'g77 ichar'
and found the following comment from a g77 maintainer:
From: Toon Moene (address@hidden)
Subject: Re: ICHAR on g77
Newsgroups: comp.lang.fortran
Date: 2002-04-24 13:22:29 PST
[ ichar(char(255)) returns 255 on RH 6.2 and -1 on RH 7.1 ]
Richard Maine wrote:
> However, I will note that it wasn't too long ago that I noted
> the uncertainty about whether ichar could return values larger
> that 127 as one of the many "issues" involved in trying to use
> characters as substitutes for unsigned integers. (It was in
> the middle of a rant of mine suggesting that signed integers
> were a more reliable way than character to approximate unsigned
> integers). I didn't actually know of this particular case at
> the time, but that won't stop me from pointing out that it
> supports my previous rant.
While true, I still felt that the original behaviour was more "obvious",
so I fixed this problem for GCC-3.0.
--
Toon Moene - mailto:address@hidden - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
Toon Moene's comment indicates that the ICHAR behavior should be correct
in GCC 3.0.
I took a look at the version of g77 that I use on my Solaris SPARC 2.6
box and get:
%g77 -v
g77 version 2.95.3 20010315 (release) (from FSF-g77 version 0.5.25 20010315
(release))
Driving: g77 -v -c -xf77-version /dev/null -xnone
Reading specs from /opt/gnu/gcc2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/specs
gcc version 2.95.3 20010315 (release)
...
The same listing on the RedHat 7.1 system that I have been using gives:
% g77 -v
g77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) (from FSF-g77 version
0.5.26 20000731 (Red Hat Linux 7.1 2.96-85))
Driving: g77 -v -c -xf77-version /dev/null -xnone
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
It is "interesting" that the version number on Linux is higher than that
on Solaris SPARC, but the date on the FSF release is earlier!? I don't
know what to make of this at all!!
Anyway, what I did to work around this problem was to create a routine
called JCHAR and use it in the GMS navigation routine (gms5_nav.for)
instead of ICHAR. I relinked all McIDAS applications using the new
version of gms5_nav.o and ran tests. IMGDISP of the GMS image and
MAPping on top of that image now work correctly.
What doesn't work correctly, however, is the drawing of a MAP on top of
the same image if it was loaded by DF. The DF load works fine, but the
MAP goes into an infinite loop!? Also, the LAT,LON tracking in the
MCGUI doesn't work for the image when loaded by DF, but it does work
for the image loaded with IMGDISP. Weird, but not something that I am
going to worry about much since DF is archaic.
The last comment I can make is that the original gms5_nav.for when turned
into C by f2c and then compiled by gcc works with no problems. This
says that the problem is isolated to g77, but I havn't figured out why
the same code has problems on Compaq True64. Sigh...
Anyway, I will be playing with this some more and then adding the mods
for gms5_nav.for to a new addendum at some point in the future. If
you feel like you need the modified code now, I will stick it out
on our FTP server for you to grab.
Ciao,
Tom
>From address@hidden Wed Aug 14 15:32:33 2002
Strangely enough..gcc 2.96 was known to have problems, it was not an
"official release", which as it turns out was one of the reason several
people around here don't like RedHat.
I will probably leave well enough alone for now since my machines are
working okay. I do have one RH 7.1 box that I set up for testing, but
will just use the 2.95 or 3.0 compilers.
Thanks,
Robert
>From address@hidden Thu Aug 15 09:39:09 2002
>Subject: Re:20020814: McIDAS-X v2002 MAP errors on GMS image IMGCOPYed to
>SPARC (cont.)
I will wait for the next addendum I believe since it works
okay on the systems we have. I have another question
for you on the GINI radar composites which I will send in
a separate message.
Thanks,
Robert