This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to address@hidden for more info.
Pete, The problem with MAIN__ seems like it is using the fort77 as the linker instead of gcc. I notice that your get a compiler warning at line 423 of put_gem_grid.f for the st_inch call, which is obviously different from what I am currently running. I will attatch my current Linux dcgrib to this email message which hasn't been stripped. If the decoder still hangs, issue a "kill -6 pid" to the dcgrib process ID from another window so that a core will be dumped. That should allow you to use gdb to find where the decoder is getting stuck in the loop. The dcgrib I have is statically linked (eg uses libf2c.a as defined in Makeinc.linux) so it should be able to trace using gdb. Steve Chiswell Unidata User Support On Tue, 7 Dec 1999, Pete Pokrandt wrote: > > Steve and all, > > I am having a problem with the dcgrib decoder under linux. We are trying > to convert grib files written by Greg Tripoli's UW-NMS model, and > while the GRIB files look correct, and in fact can be read by various > other grib decoders under linux (wxp can read the files just fine, for > example), dcgrib gets through about the first 10 or so grib records > and just hangs, not writing any more data to the gempak file, and not > crashing. It will run endlessly for days, so it must be somehow stuck in > an endless loop somewhere. > > The exact same grib files decode just fine using dcgrib on an SGI > workstation (under both SGI and Linux I used Gempak 5.4 pl12 decoders) > > I'd like to dig into it further on my own, but I remember you saying > there were lots of hoops you had to jump through to get gempak to > compile under linux. I did try compiling dcgrib on my own, using the > Makefile included, and the precompiled gempak libraries from the gbuddy > account, but upon loading, I get an "undefinied reference to MAIN__" at > link time, apparently coming from my libf2c library. The output from > my compilation is included below, in case it's of any use. > > Is there any (relatively easy) way I can compile just the dcgrib > program on my own to throw in some debugging code to try to figure > out where it is hanging, or would you have some time to take a look > if I provided you the grib file? > > I suspect that something strange is going on in the byte swapping > that is needed on the intel platform (based on the fact that it > works fine on an SGI) > > Thanks. > > Pete > > Here's my compile output > > [gempak@ProfHorn dcgrib]$ make dcgrib > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ dcgrib.c > fort77 -g -c bd_gem_grid.f > bd_gem_grid: > BLOCK DATA bd_gem_grid: > fort77 -g -c open_gem_grid.f > open_gem_grid: > Warning on line 167: local variable ermiss never used > fort77 -g -c put_gem_grid.f > put_gem_grid: > Warning on line 423: inconsistent calling sequences for st_inch, > arg 2: here real variable, previously character variable. > Warning on line 423: inconsistent calling sequences for st_inch: > here 3, previously 4 args and string lengths. > Warning on line 623: local variable ermiss never used > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ gempds.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ stagger.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ emalloc.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ gbds.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ gbytem.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ gdes.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ get_prod.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ grib1.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ gribtypes.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ mkdirs_open.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ params.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ product_data.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ quasi.c > gcc -DUNDERSCORE -DLINUX -DULTRIX -g -c -DGEMPAK -D__STDC__ inetutil.c > /usr/lib/libf2c.so: undefined reference to `MAIN__' > make: *** [dcgrib] Error 1 > > > -- > +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+ > ^ Pete Pokrandt V 1447 AOSS Bldg 1225 W Dayton St^ > ^ Systems Programmer V Madison, WI 53706 ^ > ^ V address@hidden ^ > ^ Dept of Atmos & Oceanic Sciences V (608) 262-3086 (W) 222-0919 (H) ^ > ^ University of Wisconsin-Madison V 262-0166 (Fax)262-3086 (VM)^ > +<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+ > >