Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: X10 2.2
-
Fix Version/s: X10 2.4
-
Component/s: Native X10: Compiler Codegen
-
Labels:None
-
Number of attachments :
Description
Native X10 can not currently be compiled from source using the Intel C++ compiler (icc) due to compatibility problems with some of the generated code.
The main problem seems to be around statement expressions:
icpc -DNO_TRACING -DNO_CHECKS -O2 -finline-functions -pthread -DX10_USE_BDWGC -I. -I../x10rt/include -I"./bdwgc/install/include" -Igen -ansi -pedantic -Wall -Wextra -Wno-long-long -Wno-unused-parameter -shared -fPIC -c x10aux/assert.cc -o x10aux/assert.o
[exec] gen/x10/lang/IntRange.h(113): error: destructible entities are not allowed inside of a statement expression
[exec] return (__extension__ ({
This is a known compatibility issue with GNU statement expressions and icc http://software.intel.com/en-us/articles/cdiag1487/ and doesn't appear likely to be fixed.
How difficult is it to avoid the use of this sort of statement expression? In this particular case, the statement expression:
x10::lang::IntRange __plus(x10_int i) {
//#line 52 "/scratch/x10-trunk/x10.runtime/src-x10/x10/lang/IntRange.x10": x10.ast.X10Return_c
return (__extension__ ({
x10::lang::IntRange alloc53335 = x10::lang::IntRange::_alloc();
// ... inlined constructor body
alloc53335;
}))
;
}
could probably be replaced with
x10::lang::IntRange __plus(x10_int i) {
x10_int min_ = ((x10_int) (((*this)->FMGL(min)) + (i)));
x10_int max_ = ((x10_int) (((*this)->FMGL(max)) + (i)));
x10::lang::IntRange ret_;
ret_->_constructor(min_, max_);
return ret_;
}
However this is a simple case, so it may not be easy to generalise it for all applications.
Issue Links
- is related to
-
XTENLANG-1891
Support building X10 on IA64/Linux
-
libatomic_ops (mentioned in XTENLANG-1891) is also a problem as some symbols it uses are not defined with icc. However this is really a problem for building BDWGC, which is not part of X10. It is possible to compile BDWGC separately using gcc.