Re: netxdf, xlf, os x (10.4.5) issue

"Ryan Glover" <prionscientific@xxxxxxxxx> writes:

> Hello Roy,
>
> I have been careful with the command names.  The interesting bit for
> me is that command in the code is nf90_open (all lowercase) but the
> undefined symbol name is ___netcdf_MOD_nf90_open .  That's three
> leading underscores, one of which is the fault of nm and the other two
> are prepended by xlf when it creates the module code.  (discussed here
> http://www.absoft.com/Products/Compilers/Fortran/Macintosh/XLF/xlf/pgs/ug66.htm#HDRHU00902).
>  So it seems that xlf creates a wrapper function around the regular
> netcdf functions.  If I address the wrapper directly, in my test
> fortran program, by calling __netcdf_MOD_nf90_open, ld complains of an
> undefined symbol named __netcdf_mod_nf90_open (notice the lowercase
> mod).
>
> Needless to say, neither of these approaches has solved the problem.
>

This sounds like it may be a problem with how netCDF was built on your
system. Specifically, it might think you are using a different fortran
compiler.

(The fortran wrapper functions are created when netCDF is built. For
that reason, the netCDF configure needs to know what your fortran
compiler will be.)

When you installed netCDF, if you did a "make test" the test program
in the f90 directory would have been compiled and run. 

If you did not run make test, do so please to ensure you have a
working netCDF library.

If you have multiple fortran compilers on your system, perhaps netCDF
picked the incorrect one?

In that case, you need to rebuild netCDF, and tell it about the
fortran compiler that you want it to use.

If you go to the directory where you built netCDF, and rerun
configure, then you will learn which fortran compiler was chosen by
the netCDF configure script. (Search for the string "FC").

If it's not the one you want, try setting the environment variable FC
to the name of the fortran compiler (xlf). Then rerun configure (but
do a make distclean first!)

If this doesn't work, send me the output of the configure script, and
the output of "make test" and I will see if I can spot the problem.

Ed
-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx


  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: