- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings -
I'm working with the intel 17.0.1 20161005 compiler suite (icc, icpc, ifort) on NCAR's cheyenne machine (GNU/linux OS, Linux kernel 3.12.62-60.64.8-default, x86_64 architecture).
I'm getting a strange link error:
ld: ../../lib/libufo.so: undefined reference to symbol 'abort_'
/glade/u/apps/opt/intel/2017u1/compilers_and_libraries/linux/lib/intel64_lin/libifport.so.5: error adding symbols: DSO missing from command line
mpas/mains/CMakeFiles/mpas_forecast.x.dir/build.make:120: recipe for target 'bin/mpas_forecast.x' failed
make[2]: *** [bin/mpas_forecast.x] Error 1
The string 'abort_' does not appear in any of the source code so it must be put there by the compiler. I'm using SGI's MPT software library, if that matters. The application is mixed C++ and Fortran.
Any ideas where this is coming from? Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is libufo.so? The Intel compiler would not insert a call to a routine named "abort_" unless 1) You had a call to "abort". 2) you used -assume underscore. My guess is that this reference comes from one of the libraries you are using and it makes some unwarranted assumptions about the environment.
I admit that I am not a Linux expert, but I don't think that the mention of libifport in the second error message indicates that's where the reference is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve - You're right - libufo is an application built from source and it does indeed call an abort function. That does not give an error on other platforms but it's a good lead. I'll look into that further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But is abort() not an ifort instrinsic function? Why is it not found?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind - I see it's in the ifport module that one has to "use" - makes sense!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed, abort is not an intrinsic procedure in Intel Fortran. The call might work with other compilers that supply a library routine named abort_. The trailing underscore is a Linux and MacOS convention for Fortran routines (I was mistaken above about your needing a switch to enable it.) While ifort offers an abort routine, it doesn't go by the name abort_ externally, so you need to USE IFPORT to get the right name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hopefully the last question on this thread -
How do I include the ifport module?
I'm on an HPC system so I enable the intel compilers through module load commands. I do not see ifport.f90 anywhere in the $INTEL_BASE_PATH or the $INTEL_COMPILER_BASE_PATH.
However, for this particular version I do see ifport.f90 here:
$INTEL_BASE_PATH/../../compilers_and_libraries_2017.1.132/linux/compiler/include/
I could hardwire this into my build script but then I'd have to do some more detective work every time I load a new intel module/version.
If I do nothing, I get a "module not found" error when I "use ifport"
What is the best way to include to the ifort include directories?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind - I found my mistake - typo!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The word "module" is used in this thread with two different meanings, and readers should guard against confusing the two. The first meaning is "Fortran module", typically a *.MOD file that is provided by the compiler vendor (or one that is generated by compiling a Fortran source file containing the declarations and routine bodies). The second meaning is "Linux environment module" , see http://modules.sourceforge.net/ .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed - Thanks @mecj4 for the clarification.
In any case, this issue isn't resolved yet - I'm still getting a link error even when I "use ifport". My latest suspicion is that it's coming from the mixed C++/Fortran code base - I think it's using icc to do the linking - I'm going to try to switch that to ifort and see if that works.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page