[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20050315: udunits: calling from a fortran code
- Subject: 20050315: udunits: calling from a fortran code
- Date: Tue, 15 Mar 2005 13:02:40 -0700
Roderick,
Because you're using Sun's /opt/SUNWspro/bin/f90 compiler, you should
rebuild the UDUNITS package from scratch (i.e., after executing a "make
distclean") without specifying CPPFLAGS=-Df2cFortran (the correct
symbol is "sunFortran" -- but that should be automatically determined).
When compiling fortran code that includes the file "udunits.inc", the
code must be preprocessed. For f90(1), this is automatically done for
files with a ".F" suffix but not for ones with a ".f" suffix. So,
rename the file.
Regards,
Steve Emmerson
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web. If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.
------- Original Message
>To: <address@hidden>
>From: "Pearson, Roderick R" <address@hidden>
>Subject: udunits: calling from a fortran code
>Organization: UCAR/Unidata
>Keywords: 200503151925.j2FJP2v2007068
This is a multi-part message in MIME format.
------_=_NextPart_001_01C52994.9DFD3FD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I installed udunits on this machine:
SunOS jana 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Blade-1000
How to I get my FORTRAN code to correctly call the udunits files?
I had no problems with the configure,make,test and install. =20
I used setenv CPPFLAGS=3D-Df2cFortran -UNDEBUG. for the fortran =
interface.
I have some legacy code that has an include statement include 'udunits', =
hence my reason to install the package. When I compile the code I have =
errors like this:
#define UD_POINTER integer*4
^
"udunits.inc", Line =3D 25, Column =3D 1: ERROR: The characters found in =
the label field are not valid.
^
"udunits.inc", Line =3D 25, Column =3D 27: ERROR: Unknown statement. =
Expected assignment statement but found "*" instead of "=3D" or "=3D>".
UD_POINTER utmake
^
"udunits.inc", Line =3D 33, Column =3D 24: ERROR: Unknown statement. =
Expected assignment statement but found "EOS" instead of "=3D" or =
"=3D>".
How to I get my code to correctly call the udunits files?
My compile options are :
f77 saqmnetwrite.f -I/users/students/rpearson/netcdf-3.6.0-p1/include =
-L/users/students/rpearson/netcdf-3.6.0-p1/lib -lnetcdf =
-I/users/students/rpearson/uduni
ts-1.12.4/include -L/users/students/rpearson/udunits-1.12.4/lib =
-ludunits
My compiler is=20
231]rpearson_jana> f77 -V
NOTICE: Invoking /opt/SUNWspro/bin/f90 -f77 -ftrap=3D%none -V
f90: Forte Developer 7 Fortran 95 7.0 2002/03/09
------- End of Original Message