- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can get sgetrf working, but when I do the exact call with cgetrf, it does not work (Info = 2).
I double checked all the data structures and parameters.
Here is my simple test code that I used for both sgetrf and cgetrf.
Does anybody notice where I may have made my mistake?
float b2[] = {
1 ,0, 0,
0, 1, 0,
0, 0, 1
};
MKL_Complex8 b[] = {
{1, 0}, {0, 0}, {0, 0},
{0, 0}, {1, 0}, {0, 0},
{0, 0}, {0, 0}, {1, 0},
};
int n = 3;
int lda = 3;
int ldb = 3;
int ipiv[3];
int info = 0;
char trans = 'N';
float *buff2 = malloc(sizeof(float) * n * n);
MKL_Complex8 *buff = malloc(sizeof(MKL_Complex8) * n * n);
memcpy(buff2, b2, sizeof(float)*n*n);
memcpy(buff, b, sizeof(MKL_Complex8)*n*n);
sgetrf( &n, &n, buff2, &lda, &ipiv, &info );
cgetrf( &n, &n, buff, &lda, &ipiv, &info );
=========================
I get the following results:
buff2 = 1 01
0 1 0
0 0 1
info = 0
so sgetrf worked with real values
buff = 1+0i 0+0i 0+0i
-1.#IO-1.#IOI -1.#IO-1.#IOI -1.#IO-1.#IOI
-1.#IO-1.#IOI -1.#IO-1.#IOI -1.#IO-1.#IOI
info = 2
but cgetrf did not work.
Thanks in advance for anyone that may be able to spot the problem.
I'm new to MKL and am still trying to get my arms around the parameter data structures.
Thanks,
Randy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May I ask you to do some more steps in hope to find the problem?
1) to check the problem with the separate project link only MKL?
The linking dependencies are the same you used : mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
2) with the same standalone project to use serial versions:
sequential.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib
--Gennady
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Randy,
I checked the problem you reported on win32 with MKL version10.2.
Please the output result I ve got, below
sgetrf: info == 0
buff2 1.000000, 0.000000, 0.000000
buff2 0.000000, 1.000000, 0.000000
buff2 0.000000, 0.000000, 1.000000
cgetrf: info == 0
buff 1.000000, 0.000000, 0.000000
buff 0.000000, 1.000000, 0.000000
buff 0.000000, 0.000000, 1.000000
Press any key to continue . . .
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some more questions I've forgotten to ask you:
What MKL versions you are using?
What is you linking line?
OS?
Is it ia32 or Intel64 architecture?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some more questions I've forgotten to ask you:
What MKL versions you are using?
What is you linking line?
OS?
Is it ia32 or Intel64 architecture?
Here is the information you asked for: (Sorry I should of had that in the original post)
MKL Version: 10.2.1 (Originally I was on 10.0, but after your post I upgraded to the lastest version).
Linking Line: I use Visual Studio 2008 (version 9.0). The linking line parameters used by VS is:
/OUT:"C:Documents and SettingsrcoxMy DocumentsProjectscfuncvs-cfuncDebugvs-cfunc.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:Program FilesIntelCompiler11.074cpplibia32" /LIBPATH:"C:Program FilesIntelMKL10.2.1.019ia32lib" /LIBPATH:"C:Program FilesIntelIPP6.0.2.074ia32stublib" /MANIFEST /MANIFESTFILE:"Debugvs-cfunc.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"c:Documents and SettingsrcoxMy DocumentsProjectscfuncvs-cfuncDebugvs-cfunc.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT libiomp5md.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib ippi.lib ippcv.lib ipps.lib ippm.lib ippcore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
OS: Windows XP Professional (win32)
Architecture: ia32
Let me know if there is any other information that could help.
Thanks again for helping.
Randy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May I ask you to do some more steps in hope to find the problem?
1) to check the problem with the separate project link only MKL?
The linking dependencies are the same you used : mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
2) with the same standalone project to use serial versions:
sequential.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May I ask you to do some more steps in hope to find the problem?
1) to check the problem with the separate project link only MKL?
The linking dependencies are the same you used : mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
2) with the same standalone project to use serial versions:
sequential.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib
--Gennady
I was corrupting the Complex parameter prior to the function call.
As you suggested, I removed except MKL, and everything worked fine.
It was then a simple (but tedious) task to add things in until I got the error again.
In hind sight, I should have done this first before posting.
Sorry to spam this forum with a rookie mistake.
I appreciate your help! Thanks. Now I'm moving forward again. :)
Randy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was corrupting the Complex parameter prior to the function call.
As you suggested, I removed except MKL, and everything worked fine.
It was then a simple (but tedious) task to add things in until I got the error again.
In hind sight, I should have done this first before posting.
Sorry to spam this forum with a rookie mistake.
I appreciate your help! Thanks. Now I'm moving forward again. :)
Randy
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page