forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"Multiple symbols found" when linking Intel MKL

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Thu Apr 28, 2005 5:35 am    Post subject: "Multiple symbols found" when linking Intel MKL Reply with quote

Hi,

I am currently evaluating FTN95 and Intel Math Kernel Library, but have a small problem while linking the library.
(It's the first time I am trying to use a library, so forgive me if it's a silly question)

The following sample code is from the MKL manual:

Code:
program main
real x(10), y(10), sdot, res
integer n, incx, incy, i
external sdot
n = 5
incx = 2
incy = 1
do i = 1, 10
x(i) = 2.0e0
y(i) = 1.0e0
end do
res = sdot(n, x, incx, y, incy)
print*, 'SDOT = ', res
end


First I compiled the code using:
Code:
ftn95 main.f95


Then I tried to link the library by using the following command:
Code:
slink main.obj mkl_s.lib


This then resulted in the following message (and no exe):
Code:
*** Multiple symbols found for comdat section C:ProgramIntelMKL721ia32libmkl_s.lib


Anyone who knows what I am doing wrong?
Any help is greatly appreciated!

Andreas
Back to top
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Apr 29, 2005 2:34 am    Post subject: "Multiple symbols found" when linking Intel MKL Reply with quote

I do not know the source of this problem but there are two issues that may be relevant.
1) If the library uses the STDCALL protocol (as seems likely), you should use /IMPORT_LIB <DLL name> on the FTN95 command line (from a Plato project you can use the References and their Properties instead).
2) If the LIB is a static library then you can link it directly. If it is a stub library for a DLL then SLINK allows you to use the DLL instead (this is what Plato will usually do for you).

I do not have a copy of the MKL library otherwise I could check this out for you.
Back to top
View user's profile Send private message AIM Address
Anonymous
Guest





PostPosted: Fri Apr 29, 2005 6:59 am    Post subject: "Multiple symbols found" when linking Intel MKL Reply with quote

Thank you very much for your reply. But, I am afraid I still have problems...

This is what is mentioned in the INTEL MKL documentation:

"In the following discussion, stdcall is actually the Compaq* Visual Fortran (CVF) compiler default compilation, which differs from stdcall in the way strings are passed to the routine."

"Linking to Intel® MKL has been simplified since Intel® MKL 6.0. Only the interface file needs to be linked into your program. The other libraries are identified as default libraries within the interface library and cause the linker to automatically link in the other libraries.
...
Some possible variants:

Code:
link myprog.obj mkl_c.lib

cdecl interface for 32-bit processor static linking, LAPACK and kernel.
Code:
link myprog.obj mkl_s.lib

CVF default interface for static linking (on IA-32), LAPACK and kernel.
Code:
link myprog.obj mkl_c_dll.lib

cdecl interface for dynamic linking on IA-32 platforms. DLL dispatcher will load the appropriate DLL for the processor dynamic kernel.
Code:
link myprog.obj mkl_s_dll.lib

CVF default interface for dynamic linking on IA-32 platforms. DLL dispatcher will load the appropriate DLL for the processor dynamic kernel."

Am I doing something wrong or is there some kind of incompatibility problems between Intel MKL and FTN95?

Andreas
Back to top
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue May 03, 2005 2:42 am    Post subject: "Multiple symbols found" when linking Intel MKL Reply with quote

You could try using the SLINK command permit_duplicates.
The link map should indicate which symbols are being duplicated.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group