Problems with netcdf and fortran

Problems with netcdf and fortran

Around 9 months ago I successfully managed to build netcdf on my mac for use with
fortran. I successfully managed this with a full intel fortran license
and evaluation license for intel c++. However, I am now getting this
error when I try to read netcdf files

forrtl: severe (59): list-directed I/O syntax error, unit -5, file Internal List-Directed Read
Image PC Routine Line Source
libnetcdff.5.dyli 0000000109A970CC Unknown Unknown Unknown
libnetcdff.5.dyli 0000000109A95C04 Unknown Unknown Unknown
Unknown 000000010A029E5F Unknown Unknown Unknown

There were no changes to my code so I can't understand why this error suddenly appeared. My thought is that the c compiler license expired and therefore it stopped working, however I thought I just needed that license to build the library not to run it (maybe I'm wrong). Also it stopped working after 4 months so the license had been out of date for over 3 months before it stopped working. I am reluctant to buy the license if it isn't necessary as I don't use c for anything else.

If anyone has an thoughts to why it isn't working I would love to hear them.

The make file I use to create my programs contains this code

ifort -c -I/usr/local/include -L/usr/local/lib -lnetcdf -lnetcdff -lcurl run_rttov.F90 airs_time.F90 real_to_char.F90 read_netcdf.F90 read_netcdf_era.F90 write_output.F90

ifort -I/usr/local/include -L/usr/local/lib -lnetcdf -lnetcdff -lcurl run_rttov.o airs_time.o real_to_char.o read_netcdf.o read_netcdf_era.o write_output.o

This compiles fine, but when I run the ./a.out I get the error above.

Thanks for your help
Lara

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you don't want to purchase icc, use gcc for that part of the build.

the Intel compilers merely do a compile-time license check. There is no runtime check.

Trying with GCC is a good suggestion. You are not parallelizing the code with OpenMP, pthreads, -parallel, or the like are you?

ron

This error message

>forrtl: severe (59): list-directed I/O syntax error, unit -5, file Internal List-Directed Read

is quite specific and informative. It is telling you that a Fortran routine within the shared library libnetcdff.5.dyli crashed on an error in doing an internal list directed read. Such a run-time error has little to do with your current compilers. It has nothing to do with licenses for compilers. It is caused either because of errors in the CDF file that it is trying to read, or a bug in the library itself.

If you recompile with the -traceback option and run again, you may be able to narrow down the scope to the line number in your current sources from where the failed call to NetCDF was placed.

Thanks for the advice. I have tried to recompile it and rerun but I can't find the issue. It's a mystery. I may try just running a simple netcdf read program and getting that to work. Easier to start with a simple program.

Thanks though

Leave a Comment

Please sign in to add a comment. Not a member? Join today