Fixes are available
APAR status
Closed as program error.
Error description
The test case makes use of "omp_set_num_threads" and is being set to 7, which should override the "export OMP_NUM_THREADS=1" env variable. The issue seems to be that, even though "export XLSMPOPTS=procs=2,4,6,8" is set and whenever OMP_NUM_THREADS is lower than the number specified in omp_set_num_threads, some threads are bound on processor #0. Also, when OMP_NUM_THREADS=1, all the threads seem to be bound to process#0 which seems to slow down clients' applications or may cause application segfault. ===== Compile Command: xlc_r -qsmp=omp -o a.out test.c -q64 ===== TESTCASE: $cat test.c #include <stdlib.h> #include <stdio.h> #include <omp.h> int main(int argc, char **argv) { int x; if(argc>1) omp_set_num_threads(atoi(argv[1])); #pragma omp parallel { printf("Thread# %d\n", omp_get_thread_num()); sleep(180); } } $ ===== ACTUAL OUTPUT: $export XLSMPOPTS=procs=2,4,6,8 $export OMP_NUM_THREADS=1 $ ./a.out 7& [1] 1106068 Thread# 0 Thread# 1 Thread# 2 Thread# 3 Thread# 4 Thread# 5 Thread# 6 $ $ ps -mo THREAD -p 1106068 USER PID PPID TID ST CP PRI SC WCHAN F TT BND COMMAND bkanneth 1106068 2105588 - A 0 60 8 * 200001 pts/227 0 ./a.out 7 - - - 1016047 S 0 68 1 f1000131193e4fb0 410410 - 0 - - - - 1659093 S 0 68 1 f10001017840fb30 410410 - 0 - - - - 2154731 S 0 60 1 - 2400400 - 0 - - - - 2576479 S 0 68 1 f10001017cb73130 410410 - 0 - - - - 3391585 S 0 68 1 f10001017840f330 410410 - 0 - - - - 3395627 S 0 68 1 f1000101b62ac7b0 410410 - 0 - - - - 3870913 S 0 68 1 f10001017840f430 410410 - 0 - - - - 3985495 S 0 68 1 f1000123bce1a5b0 410410 - 0 - $ ===== EXPECTED OUTPUT: All the threads should not be bound to processor #0
Local fix
N/A
Problem summary
USERS AFFECTED: OpenMP users who set the number of threads in their program may be affected by this issue. PROBLEM DESCRIPTION: The thread binding information from XLSMPOPTS is deleted after the smprt is initialized, so, when new threads are created, they will not have the right binding.
Problem conclusion
The binding information is now perserved so that it could be used later on.
Temporary fix
Comments
APAR Information
APAR number
IV01135
Reported component name
XL SMP AIX
Reported component ID
5724U8201
Reported release
180
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-05-30
Closed date
2011-05-30
Last modified date
2011-05-30
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL SMP AIX
Fixed component ID
5724U8201
Applicable component levels
[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSB259","label":"XL Fortran Advanced Edition for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.8"}]
Document Information
Modified date:
24 February 2022