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

20030723: GRIBDEC/mcgribdec on RH 8.0 Linux with AMPS data (cont.)



>From: Matthew Lazzara <address@hidden>
>Organization:  SSEC/AMRC
>Keywords:  200307221750.h6MHovLd006453 McIDAS gribdec

Hi Matthew,

Sorry I couldn't get to this yesterday...

>I've gotten the new gribdec.tar.Z, and tried that.  As a note, I'm using
>gcc and when compiling I get the following warnings - but code still builds:
>
>cc1: warning: changing search order for system directory "/usr/include"
>cc1: warning:   as it has already been specified as a non-system directory
>
>I get those after the mcfc output, after the list of subroutines and
>main0....  but as noted, I get a .k out of this compile.
>
>I still get the same behavior - and as an interesting note, I've got a *newer*
>version of  Red Hat, and thus, gcc to:
>
>gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

OK.  To test to see if this was a problem, I built McIDAS-X v2003 on
our RedHat 9.0 Linux system using gcc/g77, and then built gribdec.k
on the same system.  I was able to successfully run gribdec.k on your
amps.grb file with no problems:

% uname -a
Linux sherman.unidata.ucar.edu 2.4.20-8smp #1 SMP Thu Mar 13 17:45:54 EST 2003 
i686 i686 i386 GNU/Linux

% cat /etc/redhat-release 
Red Hat Linux release 9 (Shrike)

% gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.

% ./gribdec.k /home/mcidas/gribdata/amps.grb 6000
 Input GRIB file: /home/mcidas/gribdata/amps.grb
Output GRID file: GRID6003
GRIB messages:: Found: 137 Decoded: 137 Written: 137
GRIBDEC: Done

So, the compiler I am using is newer than the one you re using, but it
is still 3.2.x.

>Ugh...this is could be the problem.   Have you tried RH 8.0 yet?  I ought
>to go back to using my Suns - after I find disk space for the data.

The only reason I didn't try RedHat 8.0 is that our 8.0 system is not
healthy.  I will give it a try now, with the realization that things
may not build.

OK, I just build McIDAS-X v2003 on our RedHat 8.0 system using gcc/f2c/mcfc
and then built the gribdec.k bundle using the same compiler combination.
Here are the results:

% uname -a
Linux sunshine.unidata.ucar.edu 2.4.18-14smp #1 SMP Wed Sep 4 12:34:47 EDT 2002 
i686 i686 i386 GNU/Linux

% cat /etc/redhat-release 
Red Hat Linux release 8.0 (Psyche)

% gcc --version
gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

% ./gribdec.k /home/mcidas/gribdata/amps.grb 6000
 Input GRIB file: /home/mcidas/gribdata/amps.grb
Output GRID file: GRID6003
GRIB messages:: Found: 137 Decoded: 137 Written: 137
GRIBDEC: Done

% env
 ...
LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib
CC=gcc
CPPFLAGS=-DNDEBUG -Df2cFortran
CFLAGS=-O
FC=mcfc
FFLAGS=-O
CXX=

Again, I had no problem in converting the amps.grb file into a McIDAS GRID
file.  Also, I did not get any warnings about changing the search order
for the system directory "/usr/include".

>I was thinking of down-rev'ing my OS to RH 7.2 - as cron has funny behavior in
>8.0 (o.k...I'm used to Solaris...), but my admins helped me out of that issue.
>Let me know what you think.  No worries - no rush.

I advise you to not downgrade your OS.  Your problem appears to be in
the development environment on your RH 8 machine, or with the amps.grb
data file.  Is it possible that you somehow FTPed the amps.grb file to
your RH 8 system in ASCII mode while, at the same time, the version
you made available to me was the original?  This might explain the
strange output you report:

>gribdec.k amps.grb 1010 'AMPS_22/07/2003_0_UTC_D1'
>gribdec.k: ERROR reading
>Output file: GRID1010
>Input GRIB file: amps.grb
>GRIB messages:: Found: 0 Decoded: 0 Written: 0
>GRIBDEC: Done

The line that is toublesome is 'gribdec.k: ERROR reading'.  I just looked
at the code and see that the write statement has an error:

        ok = lbi( confil, byte, 1, temp1 )
        if ( ok .lt. 0 ) then
          if ( grib .eq. 0 ) then
            write( cline, '("ERROR reading ",80A," at byte ",I8)')
     &         byte
            call Edest( cline, 0 )
          endif
          goto 999
        endif

The write is expecting two variables for the format, but the first one
'confil' is missing.

The code should read:

        ok = lbi( confil, byte, 1, temp1 )
        if ( ok .lt. 0 ) then
          if ( grib .eq. 0 ) then
            write( cline, '("ERROR reading ",80A," at byte ",I8)')
     &         confil, byte
            call Edest( cline, 0 )
          endif
          goto 999
        endif

It is possible (albeit remotely) that the code being generated is
being messed up by this mistake.  Please implement the correction
above; rebuild gribdec.k; and then rerun your decode invocation.

Cheers,

Tom

>From address@hidden Fri Jul 25 14:48:56 2003

Tom -

O.k...I found the problem - I'm missing a complete install (that is
"make install.all") as  the install of the data files in to ~mcidas/data
failed as it was trying to put the data files into ~mcidas/mcidas/data,
which doesn't exist....now, things are working!!!!!

Ugh...small error, that I hardly noticed.

I'll test out the grids and see if the are indeed stable...

Cheers,  and I can't thank you again for being a great sounding board to
talk me through this!

Matthew


Matthew Lazzara wrote:

>
> Hi Tom,
>
>
> No worries on the delay in reply - I've tried your suggestion, but no
> luck  Below is the output of my make as well as ther version
> information....and before I list that there, maybe you want me to get
> you access to my system to look around and try this out for yourself
> or see what you can find that I can't?  Let me know, as I'd be glad to
> get you access if you think that would help.  Here goes:
>
> $ make
> mccomp -gcc -I. -I/home/mcidas/inc -c btab.c
> mccomp: Using default optimizations
> rm -f btab.o
> gcc -c -I. -I/home/mcidas/inc btab.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcgribdecoder.c
> mccomp: Using default optimizations
> rm -f Mcgribdecoder.o
> gcc -c -I. -I/home/mcidas/inc Mcgribdecoder.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcmkmcgrid.c
> mccomp: Using default optimizations
> rm -f Mcmkmcgrid.o
> gcc -c -I. -I/home/mcidas/inc Mcmkmcgrid.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcupackbit.c
> mccomp: Using default optimizations
> rm -f Mcupackbit.o
> gcc -c -I. -I/home/mcidas/inc Mcupackbit.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcisbitset.c
> mccomp: Using default optimizations
> rm -f Mcisbitset.o
> gcc -c -I. -I/home/mcidas/inc Mcisbitset.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcgtpstrg.c
> mccomp: Using default optimizations
> rm -f Mcgtpstrg.o
> gcc -c -I. -I/home/mcidas/inc Mcgtpstrg.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcibmfloat.c
> mccomp: Using default optimizations
> rm -f Mcibmfloat.o
> gcc -c -I. -I/home/mcidas/inc Mcibmfloat.c
> mccomp -gcc -I. -I/home/mcidas/inc -c Mcgetmemory.c
> mccomp: Using default optimizations
> rm -f Mcgetmemory.o
> gcc -c -I. -I/home/mcidas/inc Mcgetmemory.c
> mccomp -gcc -c gribdec.pgm -I. -I/home/mcidas/inc
> mccomp: Using default optimizations
> rm -f gribdec.o
> mcfc -c -I. -I/home/mcidas/inc gribdec.f
> gribdec.f:
>    main0:
> cc1: warning: changing search order for system directory
> "/usr/include"
> cc1: warning:   as it has already been specified as a non-system
> directory
> mccomp -gcc -o gribdec.k gribdec.o btab.o Mcgribdecoder.o Mcmkmcgrid.o
> Mcupackbit.o Mcisbitset.o Mcgtpstrg.o Mcibmfloat.o Mcgetmemory.o
> /home/mcidas/lib/main.o -L. -L/home/mcidas/lib -lmcidas -lm
> mccomp: Using default optimizations
> mcfc -o gribdec.k gribdec.o btab.o Mcgribdecoder.o Mcmkmcgrid.o
> Mcupackbit.o Mcisbitset.o Mcgtpstrg.o Mcibmfloat.o Mcgetmemory.o
> /home/mcidas/lib/main.o -L. -L/home/mcidas/lib -L/usr/X11R6/lib
> -lmcidas -lm -lf2c -ldl -lm
> mccomp -gcc -c grib2img.pgm -I. -I/home/mcidas/inc
> mccomp: Using default optimizations
> rm -f grib2img.o
> mcfc -c -I. -I/home/mcidas/inc grib2img.f
> grib2img.f:
>    main0:
>    make_directory:
>    make_navigation:
>    make_image:
>    get_image_info:
> cc1: warning: changing search order for system directory
> "/usr/include"
> cc1: warning:   as it has already been specified as a non-system
> directory
> mccomp -gcc -o grib2img.k grib2img.o btab.o Mcgribdecoder.o
> Mcmkmcgrid.o Mcupackbit.o Mcisbitset.o Mcgtpstrg.o Mcibmfloat.o
> Mcgetmemory.o /home/mcidas/lib/main.o -L. -L/home/mcidas/lib -lmcidas
> -lm
> mccomp: Using default optimizations
> mcfc -o grib2img.k grib2img.o btab.o Mcgribdecoder.o Mcmkmcgrid.o
> Mcupackbit.o Mcisbitset.o Mcgtpstrg.o Mcibmfloat.o Mcgetmemory.o
> /home/mcidas/lib/main.o -L. -L/home/mcidas/lib -L/usr/X11R6/lib
> -lmcidas -lm -lf2c -ldl -lm
>
>
> Now running it inMcIDAS (from the command line):
>
>
> GRIBDEC amps.grb 6000 DEV=CCC
>  Input GRIB file: amps.grb
> Output GRID file: GRID6000
> GRIB messages:: Found: 137 Decoded: 0 Written: 0
> GRIBDEC: Done
>
> As  a note the amps.grb file was acquired from the AMPS web site using
> webget...and its the same file I put on the FTP site for you...I move
> it around using scp, which ought to be safe.   Maybe I do have a
> problem with webget here....
>
> Here's the rest of my stats:
>
> $ uname -a
> Linux antarctica 2.4.18-27.8.0smp #1 SMP Fri Mar 14 05:47:33 EST 2003
> i686 i686 i386 GNU/Linux
>
> $ cat /etc/redhat-release
> Red Hat Linux release 8.0 (Psyche)
>
> $ gcc --version
> gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There
> is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
>
> I did make that code change too....
>
> Ah HA!  I scp'ed that amps.grb file that I have been testing on my
> linux box to my Sun - and it didn't work.  So, I've now checked
> getting a grib file on my Sun and moved it over to the linux box and
> that didn't work either.  It maybe that the sample amps.grb file is
> bad and I have a webget problem?  But, it doesn't explain why a grib
> file that I got on my sun worked great, and not on the linux box with
> gribdec.
>
> Ugh.  Too many variables...I just wish they'd put the data on
> ftp...and not http....I had to get a new version of webget
>
> I might try to show the /usr/include problem to McIDAS group (Dave
> Paker isn't here, but maybe Becky or Rick can help).
>
> Otherwise - talk with you more next week about this....in between
> things. (There is an educational workshop we are participating in, and
> I will be on travel starting July 31.)
>
> Thanks so much for keeping in touch with me - and I'll keep hunting
> down the issues with webget....if that is an issue.
>
> Matthew