Problem linking to intel and netcdf4 libraries

Problem linking to intel and netcdf4 libraries

I have just converted my code to generate netcdf4 rather than netcdf3 files but I am running into some problems with the compilation.

 The code appears to compile and link the appropriate intel  and necdf4 libraries detailed below

NTELLIB=/apps/intel/2011.6.233/composer_xe_2011_sp1.6.233/compiler/lib/intel64/
INTELINC=/apps/intel/2011.6.233/composer_xe_2011_sp1.6.233/compiler/include/

NCDFLIB=/apps/netCDF/4.3.0/intel/lib/
NCDFINCLUDE=/apps/netCDF/4.3.0/intel/include/

NCDFLIBB=/apps/netCDF/4.2/fortran/intel/lib/
NCDFINCLUDEB=/apps/netCDF/4.2/fortran/intel/include/

The library directories are also set in LD_LIBRARY_PATH

However at runtime I get the following error message

forrtl: severe (168): Program Exception - illegal instruction
Image              PC                Routine            Line        Source             
libintlc.so.5      00002B5068501188  Unknown               Unknown  Unknown
libnetcdff.so.5    00002B5069129068  Unknown               Unknown  Unknown
libnetcdff.so.5    00002B5069134DC8  Unknown               Unknown  Unknown
orac_preproc.x     000000000052BF5C  nc_open_                   45  nc_open.F90

which indicates to me that the netcdf and intel libraries cannot be found?

Can anyone helpme with this error?

 

 

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

My first question is how are you compiling/linking to NetCDF? The "best" way to do so would be to use "nc-config --libs" (or nf-config --libs if linking to Fortran). Often some tiny library can be missed in trying to link with NetCDF.

I suspect you are compiling with an -m option that is not appropriate for the processor on your system. It is not a case of missing libraries.

Retired 12/31/2016

As Steve points out, your actual error is "Illegal Instruction", which is likely a result of either your netcdf library or your program compiled with an improper instruction set (via the -m flag).  The "Unknown" statements are due to debugging symbols not being included in your netcdf library and is not your problem (nor is it a problem at all if you aren't trying to debug netcdf code).

Leave a Comment

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