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

threading problem

littlewang
Beginner
1,065 Views

你好,

我在使用 MLK 并行函数时遇到问题。我正在尝试将串行程序修改为并行程序,并设置 openMP 线程数=5。当我使用编译命令时 

ifort ... -mkl=parallel -fopenmp 

可正确设置线程数=5

但是如果我使用makefile来编译这个程序,线程数总是1。    

我应该将 -mkl=parallel 添加到我的 makefile 中吗?我应该怎么办? 

我把我的文件放在附件里

 

我很感激任何意见和想法!

0 Kudos
1 Solution
MRajesh_intel
Moderator
966 Views

Hi,


Since we didn't hear back from you, we are closing this thread for now. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


Have a Good day.


Regards

Rajesh


View solution in original post

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
1,058 Views

could you ask your question in English please?

0 Kudos
littlewang
Beginner
1,036 Views

hello

 

I'm having problems using MLK parallel functions. I am trying to change the serial program to a parallel program and set the number of OpenMP threads to 5. When I use the compile command

 

ifort ... - MKL = parallel  - fopenmp

 

The number of threads can be set correctly to 5

 

But if I compile this program using a Makefile, the number of threads is always 1.

 

Should I add -mkl=parallel to my makefile? What should I do?

 

I put my files in the attachment 

 

I appreciate any comments and ideas!

0 Kudos
MRajesh_intel
Moderator
1,024 Views

Hi,

 

Please try using the latest version of MKL, we don't support the older versions.and use the latest oneMKL Link Line Advisor tool:

https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl/link-line-advisor.html

 

Let us know if you have any issues.

 

Regards

Rajesh.

 

0 Kudos
littlewang
Beginner
1,018 Views

I'm sorry I still don't know how to deal with this problem. Here is a screenshot of the option I made in the above URL. Could you please help me modify my Makefile?

littlewang_0-1623918975876.png

 

0 Kudos
MRajesh_intel
Moderator
1,012 Views

Hi,


Can you please share the Fortran compiler version, MKL version used, required files for the make, build steps. So that we can see if the issue is reproducible from our end?


Regards

Rajesh.


0 Kudos
MRajesh_intel
Moderator
992 Views

Hi,


Can you please provide the required details?


Regards

Rajesh.


0 Kudos
MRajesh_intel
Moderator
967 Views

Hi,


Since we didn't hear back from you, we are closing this thread for now. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


Have a Good day.


Regards

Rajesh


0 Kudos
Reply