Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Problem linking to intel and netcdf4 libraries

Caroline_P_
Beginner
936 Views

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?

 

 

0 Kudos
3 Replies
Matt_Thompson
Novice
936 Views

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.

0 Kudos
Steven_L_Intel1
Employee
936 Views

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.

0 Kudos
Casey
Beginner
936 Views

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).

0 Kudos
Reply