Fixes are available
March 2009 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
August 2009 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
May 2010 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
December 2010 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
XL C/C++ Advanced Edition for Blue Gene/P Fix Pack 17 (October 2013 Update) for 9.0
April 2011 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
August 2011 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
April 2012 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
August 2012 Update for XL C/C++ Advanced Edition for Blue Gene/P, V9.0
APAR status
Closed as program error.
Error description
Compiling the following test case which includes recursive template instantiations at -O3 will cause very long compilation time or a hang. TESTCASE: #include <cstddef> enum TKId{ I4, I8, R4, R8 }; typedef int ESMC_I4; typedef long long ESMC_I8; typedef float ESMC_R4; typedef double ESMC_R8; //------------------------------------------------------------- template<typename T, typename U, typename V> void psv(T *element, TKId elementTK, U *factorList, TKId factorTK, V *valueList, TKId valueTK, int resolved){ // Recursively resolve the TKs and typecast the arguments appropriately // before executing psv operation on the data. if (resolved==0){ resolved; switch (elementTK){ case I4: { ESMC_I4 *elementT = (ESMC_I4 *)element; psv(elementT, elementTK, factorList, factorTK, valueList, valueTK, resolved); } break; case I8: { ESMC_I8 *elementT = (ESMC_I8 *)element; psv(elementT, elementTK, factorList, factorTK, valueList, valueTK, resolved); } break; case R4: { ESMC_R4 *elementT = (ESMC_R4 *)element; psv(elementT, elementTK, factorList, factorTK, valueList, valueTK, resolved); } break; case R8: { ESMC_R8 *elementT = (ESMC_R8 *)element; psv(elementT, elementTK, factorList, factorTK, valueList, valueTK, resolved); } break; default: break; } return; } if (resolved==1){ resolved; switch (factorTK){ case I4: { ESMC_I4 *factorListT = (ESMC_I4 *)factorList; psv(element, elementTK, factorListT, factorTK, valueList, valueTK, resolved); } break; case I8: { ESMC_I8 *factorListT = (ESMC_I8 *)factorList; psv(element, elementTK, factorListT, factorTK, valueList, valueTK, resolved); } break; case R4: { ESMC_R4 *factorListT = (ESMC_R4 *)factorList; psv(element, elementTK, factorListT, factorTK, valueList, valueTK, resolved); } break; case R8: { ESMC_R8 *factorListT = (ESMC_R8 *)factorList; psv(element, elementTK, factorListT, factorTK, valueList, valueTK, resolved); } break; default: break; } return; } if (resolved==2){ resolved; switch (valueTK){ case I4: { ESMC_I4 *valueListT = (ESMC_I4 *)valueList; psv(element, elementTK, factorList, factorTK, valueListT, valueTK, resolved); } break; case I8: { ESMC_I8 *valueListT = (ESMC_I8 *)valueList; psv(element, elementTK, factorList, factorTK, valueListT, valueTK, resolved); } break; case R4: { ESMC_R4 *valueListT = (ESMC_R4 *)valueList; psv(element, elementTK, factorList, factorTK, valueListT, valueTK, resolved); } break; case R8: { ESMC_R8 *valueListT = (ESMC_R8 *)valueList; psv(element, elementTK, factorList, factorTK, valueListT, valueTK, resolved); } break; default: break; } return; } } //-------------------------------------------------------------- --- void testTemplate(TKId elementTK, TKId factorTK, TKId valueTK){ int *element=NULL, *factorList=NULL, *valueList=NULL; psv(element, elementTK, factorList, factorTK, valueList, valueTK, 0 ); }
Local fix
Instead of typedef double ESMC_R8; use typedef float ESMC_R8;
Problem summary
If compiling a programs with deep recursion and many recursive paths at -O3 and higher, the V9 C/C++ compiler tries to visit all possible recursive paths in invocation graph. If the number of possible recursive paths gets too large, the compiler will seem to hang.
Problem conclusion
The compiler is fixed to manage to analyze programs with complex invocation grapshs without an exhaustive traversal.
Temporary fix
Comments
APAR Information
APAR number
LI74258
Reported component name
XL C/C++ AE BG/
Reported component ID
5799HJE00
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-03-20
Closed date
2009-03-20
Last modified date
2009-03-20
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/C++ AE BG/
Fixed component ID
5799HJE00
Applicable component levels
R900 PSN LI74130
UP06/09/13
Document Information
Modified date:
16 October 2021