Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Beginner
580 Views
I tried the example:

#include

#include

#include

#include

#include

#include "C:\\Program Files\\Intel\\ComposerXE-2011\\mkl\\include\\mkl_poisson.h"

int main()

{

MKL_INT nx=6, ny=6;

MKL_INT ix, iy, i, stat;

MKL_INT ipar[128];

double ax, bx, ay, by, lx, ly, hx, hy;

double *dpar, *f, *bd_ax, *bd_bx, *bd_ay, *bd_by;

double q;

DFTI_DESCRIPTOR_HANDLE xhandle = 0;

char *BCtype;

dpar=(double*)malloc((13*nx/2+7)*sizeof(double));

f=(double*)malloc((nx+1)*(ny+1)*sizeof(double));

bd_ax=(double*)malloc((ny+1)*sizeof(double));

bd_bx=(double*)malloc((ny+1)*sizeof(double));

bd_ay=(double*)malloc((nx+1)*sizeof(double));

bd_by=(double*)malloc((nx+1)*sizeof(double));

/* Defining the rectangular domain 0<1, 0<1 for 2D Poisson Solver */

ax=0.0E0;

bx=3.0E0;

ay=0.0E0;

by=1.5E0;

q=0.0E0;

lx=bx-ax;

hx=lx/nx;

ly=by-ay;

hy=ly/ny;

for(iy=0;iy<=ny;iy++)

{

for(ix=0;ix<=nx;ix++)

{

f[ix+iy*(nx+1)]=0.0E0;

}

}

BCtype = "NNNN";

for(iy=0;iy<=ny;iy++)

{

bd_ax[iy]=0.0E0;

bd_bx[iy]=0.0E0;

}

{

bd_ay[ix]=0.0E0;

bd_by[ix]= 0.0E0;

}

for(i=0;i<128;i++)

{

ipar=0;

}

d_init_Helmholtz_2D(&ax, &bx, &ay, &by, &nx, &ny, BCtype, &q, ipar, dpar, &stat);

if (stat!=0) goto FAILURE;

d_commit_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, &xhandle, ipar, dpar, &stat);

if (stat!=0) goto FAILURE;

d_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, &xhandle, ipar, dpar, &stat);

if (stat!=0) goto FAILURE;

free_Helmholtz_2D(&xhandle, ipar, &stat);

if (stat!=0) goto FAILURE;

FAILURE: printf("\\nDouble precision 2D Poisson example FAILED to compute ");

printf("the solution...\\n");

/* Free MKL memory if any was allocated */

return 1;

/* End of the example code */

}

I use Intel MKL 10.3.x and Microsoft* Visual Studio 2008.And Select Build Components I choose parallel ,it turns out:

MKLtest.exe: E:\\Vc++\\MKLtest\\Debug\\MKLtest.exe
MKLtest.exe: C:\\WINDOWS\\system32\\ntdll.dll
MKLtest.exe: C:\\WINDOWS\\system32\\kernel32.dll
MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\mkl_core.dll
MKLtest.exe: C:\\WINDOWS\\system32\\msvcrt.dll
MKLtest.exe: C:\\WINDOWS\\system32\\libiomp5md.dll
MKLtest.exe: C:\\WINDOWS\\WinSxS\\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\\msvcr90d.dll
MKLtest.exe 0x7c812afb : 0xA1A01DB1: 0xa1a01db1
MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\mkl_p4m.dll
MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\libimalloc.dll
MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\libimalloc.dll
'Win32 ' (0x1624) 1 (0x1)
'Win32 ' (0x14e0) 1 (0x1)
'Win32 ' (0x954) 1 (0x1)
'Win32 ' (0x1204) 1 (0x1)
MKLtest.exe 0x7c812afb : 0xA1A01DB2: 0xa1a01db2
[4376] MKLtest.exe: 1 (0x1)

when I choose sequential...

MKLtest.exe: E:\\Vc++\\MKLtest\\Debug\\MKLtest.exe

MKLtest.exe: C:\\WINDOWS\\system32\\ntdll.dll

MKLtest.exe: C:\\WINDOWS\\system32\\kernel32.dll

MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\mkl_sequential.dll

MKLtest.exe: C:\\WINDOWS\\system32\\msvcrt.dll

MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\mkl_core.dll

MKLtest.exe: C:\\WINDOWS\\WinSxS\\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\\msvcr90d.dll

MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\mkl_p4m.dll

MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\libimalloc.dll

MKLtest.exe: C:\\Program Files\\Intel\\ComposerXE-2011\\redist\\ia32\\mkl\\libimalloc.dll

[4912] MKLtest.exe: 1 (0x1)

I don't know what is the problem~

I can't figure it out..any advise?

11 Replies
Moderator
580 Views
not clear to me was you able to link the example succesfully or not? what does it for example means[4912] MKLtest.exe: 1 (0x1)
Beginner
580 Views
Hi~
[4912] MKLtest.exe: 1 (0x1)"means:
Routine[4912] MKLtest.exe:local"exit,returning value is 1(0x1).

""means
" Do not generate binary file using the debugging information"
Thank you

Employee
580 Views
Hi,

Let me check if I understood you correctly. Youmodified example Poisson d_Helmholtz_2D_c.c and try to compile, link, and run it, right? From your output Imay guessthat the example was successfully compiled, linked, and ran for both parallel and sequential versions of Intel MKL.

The message
"

[4912] MKLtest.exe: 1 (0x1)"means:

Routine[4912] MKLtest.exe:local"exit,returning value is 1(0x1).
"
means that theprogram was executed and exited with the code 1, right?

As far as I can see, you modifiedthe example in the way that it always returns 1 as you skipped the piece of code before the line "FAILURE: printf(...);". So, theprogram should always return 1 and print a failure message like "Double precision 2D Poisson example FAILED to compute the solution..."on the screen and it does so, right?

The second message
"

""means

" Do not generate binary file using the debugging information"
"
tells that Intel MKL libraries do NOT contain a debug information. However, as you created a "Debug" Visual Studio project, Visual Studio expects that you want to debug the program and informs you that your program has pieces (calls to Intel MKL functions) that do notcontain debug information. If you change the project to "Release", this message should not appear anymore. However, this message does not prevent your program from running correctly, it just says that you are unable to debug the pieces of code related to Intel MKL. Actually, you do not need to debug Intel MKL functions as they should work correctly.

In summary, if you want the program to exit with 0 exit code, please put the piece of code ended with "return 0;" operatorbefore the line "FAILURE: printf(...);" as in example. If you do not want to see the message about debugging information, switch to "Release" Visual Studio project. Please let me know if this information helps and thank you for using Intel MKL!

With kind regards,
Sergey G

Beginner
580 Views

Hi~You've understood it.I also uderstand what you mean ....But I have tries the example Poisson d_Helmholtz_2D_c.c that isn't modified.And I choose debug sequential...It turns out :

2D.exe: E:\Vc++\2D\Debug\2D.exe

2D.exe: C:\WINDOWS\system32\ntdll.dll

2D.exe: C:\WINDOWS\system32\kernel32.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_sequential.dll

2D.exe: C:\WINDOWS\system32\msvcrt.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_core.dll

2D.exe: C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_p4m.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\libimalloc.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\libimalloc.dll

[4364] 2D.exe: 0 (0x0)

so it've done ~with returning value 0

when I switch to release...the same turns out_

2D.exe: E:\Vc++\2D\Release\2D.exe

2D.exe: C:\WINDOWS\system32\ntdll.dll

2D.exe: C:\WINDOWS\system32\kernel32.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_sequential.dll

2D.exe: C:\WINDOWS\system32\msvcrt.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_core.dll

2D.exe: C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.218_x-ww_e1702eb6\msvcr90.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\mkl_p4m.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\libimalloc.dll

2D.exe: C:\Program Files\Intel\ComposerXE-2011\redist\ia32\mkl\libimalloc.dll

[8112] 2D.exe: 0 (0x0)

so it've done ~with returning value 0

You said "If you change the project to "Release", this message should not appear anymore."But why it appears again?
It got:
1>.\2DRE.cpp(194) : error C3861: MKL_FreeBuffers: means

What does this meaning?What can I do to make it disappear?

Employee
580 Views
Hi,

try to use "mkl_free_buffers();" instead of "MKL_FreeBuffers();". Does it work for you?

Regards,
Sergey G
Employee
580 Views
Hi,
Could you explain the difference between 2D program with release options (you've written that it return 0 on output) and 2DRE program that can't find MKL_FreeBuffers?
With best regards,
Beginner
580 Views
2D program doesn't contain" MKL_FreeBuffers()" , and 2DRE contains" MKL_FreeBuffers()"....
I wanna know that no matter what I choose ..release or debug ...I got the same result ...and why?
Thank you~
Beginner
580 Views

Hi
I tried to use "mkl_free_buffers();" but it didn't work...
1>e:\vc++\2d\2d\2d.cpp(194) : error C3861: mkl_free_buffers:

1>e:\vc++\2d\2d\2d.cpp(204) : error C3861: mkl_free_buffers:

Employee
580 Views
Thank you for trying "mkl_free_buffers();"! Would you please add the line "#include "C:\Program Files\Intel\ComposerXE-2011\mkl\include\mkl_service.h"? Thank you! Does it work?

It might result in some MKL header files "not found" compilation messages, so you can place a string "C:\Program Files\Intel\ComposerXE-2011\mkl\include" in "Project - Project Properties - Configuration Properties - C/C++ - General - Additional Include Directories" field.

Regards,
Sergey G
Beginner
580 Views

Thank you so much~It works~

Employee
580 Views
Glad to here this! Good luck!

Sergey G