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

20020520: gdradr, gdcntr problems with PGI compiled binary



Robert,

Had to finish merging in the 5.6.g changes before I could
get back to build with pgcc.

I was able to make a small change to the gdradr code to fix up
the problems with the string length overflow. I can provide you
with the updated code (note I have changed GFUNC to GDPFUN
to allow multiple grids to be specified (eg GDPFUN = NET ! N0R)

But, the gdcntr problem you mention is a separate issue.
You will probably find that gdcntr will successfully open the
file the first time through, but not the second. The problem results
from the default compilation not supporting the opening of
a file more than once. Eg, here is a test.f program I wrote:

        PROGRAM TEST
        CHARACTER*72    file

        file = 'test.f'

        OPEN ( UNIT = 1,  FILE = file,  STATUS = 'OLD',
     +             ACCESS = 'DIRECT', IOSTAT = iostat,
     +             RECL = 1 )

        write(*,*) 'look iostat ',iostat

        OPEN ( UNIT = 2,  FILE = file,  STATUS = 'OLD',
     +             ACCESS = 'DIRECT', IOSTAT = iostat,
     +             RECL = 1 )


        write(*,*) 'look iostat ',iostat

        STOP
        END


After compiling with pgf77 -o test test.f, and then running "test",
you will see that the second IOSTAT is non 0. So, you cannot open
the file test.f using 2 different unit numbers.

The same problem exists with HP, but the compiler does support
flags to override this behavior.

I haven't found such flags for pgf77 or pghpf yet.

Steve CHiswell

On Tue, 7 May 2002, Robert Mullenax wrote:

>  I tried to run gdradr and got this.  The same script
> works fine when using gcc compiled version:
>
> GDRADR 1]  Too old: $RAD/NIDS/SHV/NET/dev/null
>  [IM -1]  Image file $RAD/NIDS/SRX/NET/dev/null does not exist
>  [GDRADR 1]  Too old: $RAD/NIDS/SRX/NET/dev/null
>  [IM -1]  Image file $RAD/NIDS/TFX/NET/dev/null does not exist
>  [GDRADR 1]  Too old: $RAD/NIDS/TFX/NET/dev/null
>  [IM -1]  Image file $RAD/NIDS/TLH/NET/dev/null does not exist
>  [GDRADR 1]  Too old: $RAD/NIDS/TLH/NET/dev/null
>  [IM -1]  Image file $RAD/NIDS/TWX/NET/dev/null does not exist
>  [GDRADR 1]  Too old: $RAD/NIDS/TWX/NET/dev/null
>  ..etc
>
>
> I also tried to make a radar gif (from good .gem files) using gdcntr
> and I got an error saying that it could not open the file even
> though the file was there.  I ran gdinfo on the file and everything
> worked fine.
>
> Any ideas?  I can't find any errors in the build otger than the
> melbufr one you already mentioned.
>
> Thanks,
> Robert
> -----Original Message-----
> From: Steve Chiswell
> To: Robert Mullenax
> Sent: 5/6/02 7:08 PM
> Subject: RE: 20020506: PGI compilers
>
> Robert,
>
> This sounds good. The mask function is one thing I was considering when
> I was
> creating grids rather than strictly images.  If I get the chance, I'll
> try som test products here.
>
> Steve
>
> On Mon, 6 May 2002, Robert Mullenax wrote:
>
> > Thanks a bunch Steve.  I know Texas A&M will be glad to know that as
> well.
> > I will be interested to see if it outperforms gcc.
> >
> > BTW on the subject of radar clutter removal I have started masking
> > n0r with net greater than or equal 10 and this seems to be working
> pretty
> > well.
> > I contour snow/mixed with n0r and rain with the masked n0r.  I know I
> won't
> > get rid of any major precip..and a rainshower with a top of 5kft isn't
> going
> > to be that interesting.
> >
> >
> >
> >
> > -----Original Message-----
> > From: Steve Chiswell [mailto:address@hidden]
> > Sent: Monday, May 06, 2002 4:00 PM
> > To: Robert Mullenax
> > Cc: address@hidden
> > Subject: 20020506: PGI compilers
> >
> >
> >
> >
> > Robert,
> >
> > I have built GEMPAK with Linux pgcc and pgf77.
> >
> > I have attatched a tar.gz file with updates to 2 routines and
> > 3 Makefiles necessary to clean up the build.
> >
> > You can unpack the tarfile from $NAWIPS with the usual
> > gunzip tarfile.gz | tar xvf -
> >
> >
> > I included my $NAWIPS/config/Makeinc.linux_portland.
> >
> > All you will need to do to build with the portland compilers is:
> >
> > cd $CONFIGDIR
> > mv Makeinc.linux Makeinc.linux_gcc
> > ln -s Makeinc.linux_portland Makeinc.linux
> >
> >
> > For our PGI compilers, I had to set the PGI environmental variable
> > to the /opt/pgi directory, and ass /opt/pgi/linux86/bin to my path.
> >
> > The $GEMPAK/source/melbufr directory still has errors for Linux, but
> > no program uses that library yet, so it isn't fatal.
> >
> > I ran a quick test by using NMAP2 to pull up a few products, and
> things
> > appeared to work OK.
> >
> > Steve Chiswell
> > Unidata User Support
> >
>