Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28486 Discussions

Undefined Reference to Intrinsic Function NORM2_

Evan_P_
Beginner
895 Views

I am trying to compile some FORTRAN code using this command:

ifort -fPIC *.o -L./ libmylib.a -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -o outfile


And I am getting an error: "undefined reference to norm2_' in one of my already compiled fortran objects.  I don't get it because norm2 an intrinsic Fortran function.  I am compiling the fortran objects with:

ifort -fPIC -c *.f90

and it does not complain about norm2 being in the source file

I am using Intel Fortran Compiler 11.1.  The archive libmylib.a does contain some C code.  I tried searching this forum, but there is nothing on undefined references to intrinsic fortran functions.

Any help would be greatly appreciated.

Thanks,

-Evan

0 Kudos
2 Replies
Hirchert__Kurt_W
New Contributor II
895 Views

Version 11.1 is not exactly recent, and NORM2 was not made a standard intrinsic function until the 2008 Fortran standard (whose content was finalized in 2008, but not formally adopted until later), so I suspect the answer is simply that NORM2 wasn't an intrinsic function at the time version 11.1 was developed and released.

0 Kudos
Evan_P_
Beginner
895 Views

That was also my suspicion!  Thanks!

 

0 Kudos
Reply