Hi Guys;
I'm running ROMS in a Opteron Machine, running SUSE Linux 10
and Absoft 64-bit Fortran 95 10.0.6.
I installed the netcdf-3.6.2 in two different folders using gfortran and Absoft compilers and linked it in my Linux_gfortran.mk and Linux_f90.mk files.
I was able to get ROMs working using gfortran, but when I tried to use the Absoft compiler it doesn't work and I get the following error:
f90 -w Build/master.o Build/ocean_control.o Build/ocean_coupler.o Build/propagator.o -o oceanS Build/libADM.a Build/libRPM.a Build/libTLM.a Build/libNLM.a Build/libANA.a Build/libICE.a Build/libUTIL.a Build/libMODS.a -L/mnt/msa20/group/saimos/libs/netcdf-3.6.2/f95/lib -lnetcdf
Build/libNLM.a(output.o): In function `OUTPUT':
/mnt/msa20/group/Oceanography/MODELS/ROMS3r068/Build/output.f90:76: undefined reference to `NF_CLOSE'
Build/libUTIL.a(close_io.o): In function `CLOSE_IO':
/mnt/msa20/group/Oceanography/MODELS/ROMS3r068/Build/close_io.f90:34: undefined reference to `NF_CLOSE'
/mnt/msa20/group/Oceanography/MODELS/ROMS3r068/Build/close_io.f90:38: undefined reference to `NF_CLOSE'
/mnt/msa20/group/Oceanography/MODELS/ROMS3r068/Build/close_io.f90:91: undefined reference to `NF_STRERROR'
/mnt/msa20/group/Oceanography/MODELS/ROMS3r068/Build/close_io.f90:93: undefined reference to `NF_STRERROR'
/mnt/msa20/group/Oceanography/MODELS/ROMS3r068/Build/close_io.f90:95: undefined reference to `NF_STRERROR'
...........
collect2: ld returned 1 exit status
link failed.
I'm not using any FFLAG or other special flag.
Do you have any idea why I'm getting this error?
Is anyone using Absoft Fortran and Linux to run ROMS with success?
Many thanks;
Carlos Teixeira
Absoft Fortran x Linux Error
I would run on your absoft-compiled library to see what the names look like. Does it have any extra underscores? Or is it lower case? Find out what compiler options were used when compiling that library and try to match. Most of these problems have to do with the underscores. Did you run "make check" after building the library?
Actually, what version of ROMS is this exactly? Why is it looking for nf_close rather than nf90_close?
Code: Select all
nm libnetcdf.a | grep NF_CLOSE
Actually, what version of ROMS is this exactly? Why is it looking for nf_close rather than nf90_close?
Hi Kate;
Thanks for your help.
I did:
nm libnetcdf.a | grep NF_CLOSE
And it couldn't find NF_CLOSE.
than I did:
nm libnetcdf.a
And there's a mix of lower and upper case names (without underscores) (here). For exemplo nf_close is in lower case but other functions are in upper case. I think this is the reason of my problems.
I used the default options to install the netcdf lib and it passed all the tests using make check. I will work out what's the default and see if I can solve the problem.
I'm using ROMS 3.1 rev. 174 and I don't know why it's looking for nf_close rather than nf90_close. Any idea?
Many thanks
Carlos Teixeira
Thanks for your help.
I did:
nm libnetcdf.a | grep NF_CLOSE
And it couldn't find NF_CLOSE.
than I did:
nm libnetcdf.a
And there's a mix of lower and upper case names (without underscores) (here). For exemplo nf_close is in lower case but other functions are in upper case. I think this is the reason of my problems.
I used the default options to install the netcdf lib and it passed all the tests using make check. I will work out what's the default and see if I can solve the problem.
I'm using ROMS 3.1 rev. 174 and I don't know why it's looking for nf_close rather than nf90_close. Any idea?
Many thanks
Carlos Teixeira
Well, you know that both output.f90 and close_io.f90 are looking for that nf_close. I'd start by looking in those files to see if you can find it. Is there a "USE netcdf" or a "#include 'netcdf.inc'"? My output.F has nf90_close. Actually, my output.F has "USE mod_netcdf" which in turn has "USE netcdf".