- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include "mkl.h" void main() { char uplo[2] = "L"; int n = 2; float a[4] = {2.0, 0.5, 0.5, 2.0}; int lda = 2; int info = 0; spotrf( uplo, &n, a, &lda, &info); }but as soon as I link (with mkl_c.lib, as suggested) I get the following error:
("gia definito" = "already defined") I could compile other examples so I must be missing something specific to Lapack... would you help me? Thank you!
-- Marco --
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There isn't anything obviously wrong with what you did. I took your program (calling it exp.c) and used the following makefile to build it:
CC = icl
MKLDIR = c:mklmkl6.0ia32lib
MKLINC = c:mklmkl6.0include
exp.exe: exp.obj
link /libpath:$(MKLDIR) exp.obj mkl_c.lib
exp.obj: exp.c
$(CC) /c -I$(MKLINC) exp.c
Here is the result of making the program:
C: emplpexp>nmake
Microsoft Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
icl /c -Ic:mklmkl6.0include exp.c
Intel C++ Compiler for 32-bit applications, Version 7.0 Build 20021018Z
Copyright (C) 1985-2002 Intel Corporation. All rights reserved.
exp.c
link /libpath:c:mklmkl6.0ia32lib exp.obj mkl_c.lib
Microsoft Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
C: emplpexp>
Please try this out. If you still have a problem come back and we will look at this anew.
Bruce
Message Edited by bsgreer on 01-23-2004 08:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bruce!
I've tried the makefile you suggested but interestingly enough I got the same results I had inside the VS.NET IDE...
E:QuantsTestsfoo>nmake Microsoft Program Maintenance Utility versione 7.00.9466 Copyright (C) Microsoft Corporation. Tutti i diritti riservati. icl /c -I"E:Program FilesIntelMKL60include" mkltest.c Intel C++ Compiler for 32-bit applications, Version 7.1 Build 20030307Z Copyright (C) 1985-2003 Intel Corporation. All rights reserved. 30 DAY EVALUATION LICENSE mkltest.c link /libpath:"E:Program FilesIntelMKL60ia32lib" mkltest.obj mkl_c.lib Microsoft Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. mkl_ia32.lib(p4_ssyrk_omp.obj) : error LNK2005: ___ssyrk_104__par_loop0 gi definito in mkl_ia32.lib(p3_ssyrk_omp.obj) mkl_ia32.lib(p4_ssyrk_omp.obj) : error LNK2005: ___ssyrk_162__par_loop1 gi definito in mkl_ia32.lib(p3_ssyrk_omp.obj) mkl_ia32.lib(def_ssyrk_omp.obj) : error LNK2005: ___ssyrk_104__par_loop0 gi definito in mkl_ia32.lib(p3_ssyrk_omp.obj) mkl_ia32.lib(def_ssyrk_omp.obj) : error LNK2005: ___ssyrk_162__par_loop1 gi definito in mkl_ia32.lib(p3_ssyrk_omp.obj) mkl_ia32.lib(p4_sgemm_omp.obj) : error LNK2005: ___sgemm_241__par_loop0 gi definito in mkl_ia32.lib(p3_sgemm_omp.obj) mkl_ia32.lib(p4_sgemm_omp.obj) : error LNK2005: ___sgemm_259__par_loop1 gi definito in mkl_ia32.lib(p3_sgemm_omp.obj) mkl_ia32.lib(def_sgemm_omp.obj) : error LNK2005: ___sgemm_241__par_loop0 gi definito in mkl_ia32.lib(p3_sgemm_omp.obj) mkl_ia32.lib(def_sgemm_omp.obj) : error LNK2005: ___sgemm_259__par_loop1 gi definito in mkl_ia32.lib(p3_sgemm_omp.obj) mkl_ia32.lib(p4_strsm_omp.obj) : error LNK2005: ___strsm_125__par_loop0 gi definito in mkl_ia32.lib(p3_strsm_omp.obj) mkl_ia32.lib(p4_strsm_omp.obj) : error LNK2005: ___strsm_148__par_loop1 gi definito in mkl_ia32.lib(p3_strsm_omp.obj) mkl_ia32.lib(def_strsm_omp.obj) : error LNK2005: ___strsm_125__par_loop0 gi definito in mkl_ia32.lib(p3_strsm_omp.obj) mkl_ia32.lib(def_strsm_omp.obj) : error LNK2005: ___strsm_148__par_loop1 gi definito in mkl_ia32.lib(p3_strsm_omp.obj) mkltest.exe : fatal error LNK1169: rilevato uno o pi simboli definiti pi volte NMAKE : errore irreversibile U1077: "link" : codice restituito "0x491" Stop. E:QuantsTestsfoo>
I'm compiling on a Windows 2000 Advanced Server machine with 4 x 2.8 GHz P4 Xeon MP;strangely enough from the errors it looks like it linked the PIII binaries instead of the P4 ones.
Note that I successfully compiled some BLAS and VSL examples so the problem seems to be related to the LAPACK stuff.
Thank you for your help and enjoy a great weekend!
-- Marco --
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marco,
This link error looks familiar to me. Links with the first version of Intel MKL 6.0 that was released in May 2003 showed error messages like this. A patch was released shortly thereafter (Intel MKL 6.0.1).
What version of Intel MKL are you using? Version 6.1 is now available and provides improved performance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello there!
Sorry for my late reply: I confirm that the problem disappeared after upgrading to version 6.1.
Cheers and thank you for your help!
-- Marco --
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page