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

20000711: compiling problems for readgeneral.f



Edward,

>Date: Tue, 11 Jul 2000 15:30:04 -0400
>From: Edward Colon <address@hidden>
>Organization: University of Louisville/Comparative Planetology Laboratory
>To: address@hidden
>Subject: compiling problems for readgeneral.f
>Keywords: 200007111930.e6BJUBT03070

In the above message, you wrote:

> I am currently using a pc running Redhat Linux and have encountered a
> problem which I did not face when I used a DEC alpha previously. After
> making the required modifications to the code and installing netcdf and
> udunits successfully, I am faced with a barrage of compiling errors. To
> begin with, there are disagreements concerning the type of return values
> for several functions. For example I receive the error
>
> call ncagt(inet,ivar,'scale_factor',xscale,icode1)
>               1
> readg.f:216: (continued):
>          call ncagt(inet,ivar,'missing_value',miss,icode3)
>               2
> Argument #4 of `ncagt' is one type at (2) but is some other type at (1) 

This is necessarily the case because the subroutine, ncagt, is used to
obtain netCDF variable attributes of all kinds.

> To counteract this, I add the `-fno-globals' option to my compile
> line.

If that option disables that particular message, then you did the right
thing.

> However, two other problems which I have not been able to address
> are the utopen function type i.e.
>
> readg.f:79: 
>           retcode=utopen('/usr/local/etc/udunits.dat')
>                   1
> /usr/local/include/udunits.inc:38: (continued):
>            integer utopen
>                    2
> Global name `utopen' at (2) has different type at (1)

It looks like you need to include the header file "udunits.inc" prior to
line 79 of file "readg.f" or, at least, declare the function "utopen" to
return an integer before it's actually called.

> and an unimplemented intrinsic 'unpack'
> 
> readg.f:246: warning:
>               call unpack(idata,x,xscale,xoff,miss,ilon,jlat)
>                    ^
> Reference to unimplemented intrinsic `UNPACK' at (^) (assumed EXTERNAL)

I have no idea what the subroutine "unpack" is.  I suggest that you
contact the author of the file "readg.f".

> I would appreciate tremendously any help you could offer.  By the way
> my compile statement reads:
>
>  g77 -Wno-globals -I/usr/local/include -L/usr/local/lib -lnetcdf -ludunits 
> readgeneral.f
> 
> where the netcdf and udunits include files and libraries are placed 
> in /usr/local
> 
> 
> Thank you,
> 
> Edward Colon
> Comparative Planetology Laboratory
> 211 Sackett Hall Rm 215
> University of Louisville
> Louisville, KY  40220
> office:(502) 852-7280

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