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.

INTERFACE operator

sebastian_gurgul
Beginner
615 Views
Hello,

Can someone tells me what is wrong with this code part ?
It is related to INTERFACE key word.

PROGRAM HELLO
interface
subroutine ddot ()
end subroutine ddot
end interface
call ddot()
END

When I try to compile the source above I get:
/tmp/ifortECzeBy.o(.text+0x21): In function `MAIN__':
: undefined reference to `ddot_'

The source above is a simpler version of sample from Intel Fortran Language Reference document (par.7-8)

Thank you in advance,
0 Kudos
3 Replies
TimP
Honored Contributor III
615 Views
If you're intending to link against one of the BLAS-compatible ddot() functions, you will need to make the interface block agree. MKL supplies such interfaces. If you're supplying a different function yourself, why not put it in the same file, and give the compiler a chance to emit more meaningful messages?

Message Edited by tim18 on 04-24-200608:36 AM

0 Kudos
Steven_L_Intel1
Employee
615 Views
To add to what Tim says, if your intent is to link to a library containing a DDOT routine, you have to name that library in the ifort command that links the application.
0 Kudos
sebastian_gurgul
Beginner
615 Views
All right.
Thank you for help.
0 Kudos
Reply