Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Error : Cannot set thread affinity mask

mahantesh
Beginner
1,516 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
1,516 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.

0 Kudos
SergeyKostrov
Valued Contributor II
1,516 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

0 Kudos
Sergey_K_Intel
Employee
1,516 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/common/optaps_openmp_thread_affinity.htm). According to description you can even disable affinity control. UIC itself does nothing with thread affinity.
Regards,
Sergey
0 Kudos
SergeyKostrov
Valued Contributor II
1,516 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.
0 Kudos
Ying_H_Intel
Employee
1,516 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
0 Kudos
Vladimir_P_1234567890
1,516 Views
Hello,
The fix should be available inComposer XE 2011 update 9.
Hope this helps,
--Vladimir
0 Kudos
Reply