Fixes are available
November 2009 PTF for XL C/C++ for AIX, V10.1
October 2010 PTF for XL C/C++ for AIX, V10.1
May 2012 PTF for XL C/C++ for AIX, V10.1
January 2013 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 18 (July 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 19 (October 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 21 (October 2015 PTF) for 10.1
August 2009 PTF for XL C/C++ for AIX, V10.1
March 2010 PTF for XL C/C++ for AIX, V10.1
April 2010 PTF for XL C/C++ for AIX, V10.1
June 2010 PTF for XL C/C++ for AIX, V10.1
May 2011 PTF for XL C/C++ for AIX, V10.1
October 2011 PTF for XL C/C++ for AIX, V10.1
February 2012 PTF for XL C/C++ for AIX, V10.1
September 2012 PTF for XL C/C++ for AIX, V10.1
May 2009 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 20 (October 2014 PTF) for 10.1
APAR status
Closed as program error.
Error description
Compiling the following test case with -qsmp=omp and running it with OMP_NUM_THREADS=4 generates unexpected output: #include <omp.h> #include <stdio.h> int main(void) { #pragma omp parallel { int i; #pragma omp critical printf("thread_a %d: %p\n", omp_get_thread_num(), &i); } #pragma omp parallel do { int i; #pragma omp critical printf("thread_b %d: %p\n", omp_get_thread_num(), &i); } while(0); return 0; }
Local fix
Add an extra bracket "{}" to embrace the do-while loop.
Problem summary
OpenMP users with parallel directive which binds to a do/while or while loop, may be affected. The automatic variables enclosed by the lexical scope of the loop are not marked private (per thread). This may result in undetected and unexpected runtime failure of generated executable.
Problem conclusion
To solve this issue, the variables enclosed in the loop will be marked as private. This fix will be applied to a future PTF.
Temporary fix
Comments
APAR Information
APAR number
IZ40899
Reported component name
XL C++ AIX
Reported component ID
5724U8100
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-01-06
Closed date
2009-01-06
Last modified date
2009-06-03
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 C++ AIX
Fixed component ID
5724U8100
Applicable component levels
Document Information
Modified date:
04 October 2021