Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Error : Cannot set thread affinity mask

mahantesh
Beginner
272 Views
Hi,
We are using some functions from UIC_transcoder for decoding jpeg frames and converting these frames to RBG frames. Randomly we are getting the below mentioned errors. Also we use some of the functions from IPP to resize the frame.
OMP : Error # 134 Cannot set thread affinity mask.
OMP : System error #87 : The parameter is incorrect.
Can someone explain why these errors occur and the ways the solve these. Also these erros we have seen in 32 bit Win7.
Thanks,
0 Kudos
6 Replies
SergeyKostrov
Valued Contributor II
272 Views
Quoting mahantesh
...
OMP : System error #87 : The parameter is incorrect
...


'Parameter is incorrect' - ERROR_INVALID_PARAMETER

It is returned by 'GetLastError' Win32 API function and take a look at MSDN for more technical details.

SergeyKostrov
Valued Contributor II
272 Views
Quoting mahantesh
...
OMP : Error # 134 Cannot set thread affinity mask.
OMP : System error #87 : The parameter is incorrect.

1. Error #134 -A'SetThreadAffinityMask' Win32 API function could fail if a thread handle is
invalid or a thread affinity mask is wrong/incorrect. I think that a thread handle was invalid.

Can someone explain why these errors occur and the ways the solve these.


How much RAM and VM ( Virtual Memory )do you have on your system? Did you try to increase a size of
VM? I'll try to reproduce the problem on my system.

Best regards,
Sergey

Sergey_K_Intel
Employee
272 Views
Hi!
Try to play with KMP_AFFINITY environment variable (http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011/compiler_c/optaps/...). According to description you can even disable affinity control. UIC itself does nothing with thread affinity.
Regards,
Sergey
SergeyKostrov
Valued Contributor II
272 Views
...I'll try to reproduce the problem on my system...

I've spent some time today and I couldn't reproduce it in an OpenMP test application.
Ying_H_Intel
Employee
272 Views
Hi Mahantest,

Could you please provide us a test sample to reproduce the problem?

(for example, including the parallel (multi-thread)structure add ippresize call, remove the UIC part?).

I check therewas same reports before in forum:http://secure-software.intel.com/en-us/forums/showthread.php?t=81551. and http://software.intel.com/en-us/forums/showthread.php?t=76294.

Iguess there is mix threadmodel conflict (i.e C# thread and OpenMP thread) or OpenMP nest loops in program, but no evidence. So ifpossible, please provide us a test case.

(Ifthe codeis confident, you can use Private post.

Best Regards,
Ying
Vladimir_P_Intel2
272 Views
Hello,
The fix should be available inComposer XE 2011 update 9.
Hope this helps,
--Vladimir
Reply