- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
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,
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All right.
Thank you for help.
Thank you for help.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page