Hi David:

1. I passed the extra command line options as follows, but I don't see any
report on the compiler version used:

$ ../bin/x10c++ -x10rt mpi -report postcompile=5 -MAIN_CLASS=KMeansDist -d
. KMeansDist.x10
 Output files: {KMeansDist=[KMeansDist.h, KMeansDist.cc]}
Executing post-compiler mpicxx -I../x10.dist/include
-I../x10.dist/stdlib/include -I. -I. -Wno-long-long -Wno-unused-parameter
-DX10_USE_BDWGC -pthread -o ../x10.dist/samples/./KMeansDist KMeansDist.cc
xxx_main_xxx.cc -L../x10.dist/stdlib/lib -lx10 -lgc -lm -lpthread -lrt -ldl
-L../x10.dist/lib -lx10rt_mpi -Wl,--rpath -Wl,../x10.dist/stdlib/lib
-Wl,--rpath -Wl,../x10.dist/lib -Wl,-export-dynamic
x10c++: ../x10.dist/stdlib/include/x10/array/Array.h: In member function
'void x10::array::Array<T>::_constructor(x10_int) [with x10tp__T = int]':

     ../x10.dist/stdlib/include/x10/array/Array.h:1551: internal compiler
error: in cp_expr_size, at cp/cp-objcp-common.c:101

2. To ensure that X10 build is using the gcc 4.4.6, I created a symbolic
link gcc that points to gcc4.4.6 in my/home/bin and added it to my path:
export PATH:/my/home/bin:$PATH
$ gcc -v displays: gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)

3. How do I pass STATEMENT_EXPR_GCC_WORKAROUND=true option the to the ant
build? I tried this:
$ ant squeakyclean dist -STATEMENT_EXPR_GCC_WORKAROUND=true -DX10RT_MPI=true
Unknown argument: -STATEMENT_EXPR_GCC_WORKAROUND=true

Thanks


On Tue, May 15, 2012 at 10:51 AM, Jeeva Paudel <je...@ualberta.ca> wrote:

> Hello,
>
> I successfully built the x10 v2.2.2.2 compiler from source, using:
> javac 1.6.0_11
> gcc version 4.4.6 20110731 (Red Hat 4.4.6-3)
> Apache Ant version 1.6.5 (the x10-lang website mentions 1.7, but 1.6.5
> works fine as well.)
>
> I also successfully built the MPI implementation of X10RT, and I am using
> mvapich2 1.8
>
> When trying to compile programs in the x10.dist/samples directory, I get
> the following internal compiler error:
> -bash-3.2$ my/path/bin/x10c++ -x10rt mpi -MAIN_CLASS=KMeansDist -d .
> KMeansDist.x10
> x10c++: my/path/x10.dist/stdlib/include/x10/array/Array.h: In member
> function 'void x10::array::Array<T>::_constructor(x10_int) [with x10tp__T =
> int]':
>      my/path/x10.dist/stdlib/include/x10/array/Array.h:1551: internal
> compiler error: in cp_expr_size, at cp/cp-objcp-common.c:101
>
> Am I doing something incorrectly?
>
> Thanks,
> Jeeva
>

Hi,

        That's an assertion failure in gcc.  So far, I've only ever seen it
in gcc 4.1.  Newer versions of gcc have never shown it (gcc bug was fixed).

        (1) Try giving x10c++ the extra command line options
                -report postcompile=5
        to verify that it is actually using the version of gcc that you think
it is.

        (2) Depending on (1), either switch to using gcc 4.4.6 (which should
not have this problem)  or (2) tell the X10 compiler to avoid statement
expressions (the gcc extension that triggers this bug) by giving x10c++ the
extra commandline argument -STATEMENT_EXPR_GCC_WORKAROUND=true.
Unfortunately, you will have to rebuild x10 from scratch with this extra
option (since you need to force the regeneration of all the files in the
standard library, like Array.h).


--dave
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to