This file is a collection of OS-specific notes on the generation of the netCDF Fortran interface and problems with some of the resulting interfaces. If your platform isn't here, either we know of no problems with that OS, or we haven't generated a Fortran interface for it, for lack of the necessary OS-specific .m4 file, describing the characteristics of how C is called form Fortran and peculiarities of the particular implementation of Fortran. If you write a new .m4 file for another platform that successfully generates a netCDF Fortran interface, please send it to us to add to the collection. Cray/UNICOS 1. The way BYTE data and attributes are implemented (packing and unpacking from CRAY integers), only unsigned byte values between 0 and 255 work as expected. For example, if you store -100 as a byte value, it will be retrieved as 156. 2. The UNICOS jackets treat double precision as real, partly because the FORTRAN 128-bit double has no corresponding C type (in C doubles and floats are both 64 bits). Use "real" or "real*8" declarations for double precision. XDR can't store Cray's 128-bit double precision numbers anyway. Microsoft Fortran and C 1. This distribution and Makefiles have been tested on PCDOS 3.3, PCDOS 4.01, OS/2 1.2, OS/2 1.3, using Microsoft C 6.0 and Microsoft Fortran 5.0. 2. Copy the fortran/msoft/* files up into the parent directory with cp *.* .. before using the msoft.mk makefile. 3. fslen.asm is an assembler routine needed to help find the length of FORTRAN character*(*) variables from a C routine they are passed into. This relies on undocumented mechanisms, so it might break in some future release. IBM RS6000/AIX We used the "xlf" compiler on AIX to test the Fortran jackets: make OS=aix_3.1 FC=xlf DEC VAX/VMS These were generated on a UNIX system, since we require sed and m4. All the resulting generated files and ".com" command files to make and install the resulting library interface are in the fortran/vms subdirectory. They should be copied into this parent directory before running make.com and install.com. DEC/Ultrix 1. We tested these with the standard (unsupported) f77 compiler on a VAXstation and a DECstation under Ultrix 4.0. 2. THE MIPS compiler for DECstations seems to have problems with compiling the FORTRAN test program generated by "ncgen -f" when running "make ftest" in the ../ncgen directory. The standard FORTRAN construct it chokes on compiles fine on other platforms ('a string' // char(10) // 'another string'), but on this platform produces the error: f77 -o test0 test0.f ../../../lib/libnetcdf.a Error on line 59 of test0.f: concatenation of nonchar data grow failed sp >= USRSTACK-ctob(u.u_ssize) 0x7fffffff >= 0x7fffd000 Fatal error in: /usr/lib/fcom1.31 Segmentation fault - core dumped If anyone discovers a way around this, please let us know. 3. If in running "ftest" as a result of "make test" in the netcdf/fortran directory, you get errors like the following: --- Testing ncagt, ncagtc ... error in ncagt FLOAT --- Testing ncredf, ncdren, ncvren, ncaren, ncendf ... --- Testing ncacpy ... error in ncagt FLOAT you almost surely have linked with the system-supplied XDR and its buggy xdr_float instead of the one we supply. Remake your netcdf library with the netcdf-distributed xdr instead of the system xdr. SunOS 5 f90 1. SunOS's f90 compiler is a bit green. The following bugs have been noticed: *) The manual page says the "-F" option causes the preprocessor to generate a .for file from a .F; whereas, it actually generates a .f file. *) The compiler fails to compile the file ftest.F in the simplest way: /opt/SUNWspro/bin/f90 -c -g ftest.F cf90-995 f90comp: INTERNAL TFILLS, File = ftest.F, Line = 1351 Unrecoverable error encountered while attempting to print buffered messages - hit EOF while trying to issue message 197 at line 1351. The line number is incorrect. It might refer to the preprocessed (virtual .f) file -- but there's no way to tell.