cilk++ compiling problem on Linux system

cilk++ compiling problem on Linux system

imagem de ammouna

Hi ,

while compiling cilk++ program on Linux system I'v got this error, can you help me please

gimplification failed:
D.43983 = (struct vector > *) D.43982;
D.43984 = D.43983;
D.44194 = D.44188 - 1;
D.43985 = (int) D.44194;
try
{
try
{
goto ;
:;
__comp_ctor (&D.43986);
try
{
__comp_ctor (D.43984, &D.43986);
}
finally
{
__comp_dtor (&D.43986);
}
D.43984 = D.43984 + 12B;
D.43985 = D.43985 - 1;
:;
if (D.43985 != -1)
{
goto ;
}
else
{
goto ;
}
:;
}
finally
{
cilk_sync;
}
}
catch
{
{
register struct vector > * D.43987;

if (D.43983 != 0B)
{
D.44194 = D.44188 - 1;
D.44199 = (int) D.44194;
D.44200 = D.44199 - D.43985;
D.44201 = (unsigned int) D.44200;
D.44202 = D.44201 * 12;
D.43987 = D.44202 + D.43983;
:;
if (D.43987 == D.43983)
{
goto ;
}
else
{

}
D.43987 = D.43987 - 12;
__comp_dtor (D.43987);
goto ;
:;
}
else
{

}
}
} type align 8 symtab 0 alias set -1
pointer_to_this
>
side-effects head 0x566cb168 tail 0x566cb1c8 stmts 0x567b8cf0 0x567b8d5c 0x56a2757c 0x567b8dec 0x56a27654

stmt type
>>
sizes-gimplified asm_written cached unsigned SI
size
unit size
align 32 symtab 1452102880 alias set -1
pointer_to_this
reference_to_this >
side-effects
arg 0 used unsigned ignored SI file NodeArray.cilk line 159 size unit size
align 32 context abstract_origin chain >
arg 1 arg 0 >
NodeArray.cilk:159>
stmt side-effects
arg 0 used unsigned ignored SI file NodeArray.cilk line 159 size unit size
align 32 context abstract_origin chain > arg 1
NodeArray.cilk:159>
stmt type unit size
align 32 symtab 1436759600 alias set -1 precision 32 min max
pointer_to_this
>
side-effects
arg 0
used unsigned ignored SI file NodeArray.cilk line 159 size unit size
align 32 context chain >
arg 1
invariant arg 0
arg 1 >
NodeArray.cilk:159>
stmt type unit size
align 32 symtab 1436760560 alias set -1 precision 32 min max
pointer_to_this
reference_to_this >
side-effects
arg 0
used ignored SI file NodeArray.cilk line 159 size unit size
align 32 context abstract_origin chain >
arg 1
invariant arg 0 >
NodeArray.cilk:159>
stmt
side-effects
arg 0
side-effects head 0x56701b70 tail 0x56701b70 stmts 0x567b8e58

stmt
side-effects
arg 0
side-effects head 0x56701a8c tail 0x56701b58 stmts 0x56a24960 0x56a248e0 0x56a238c0 0x56a275a0 0x56a275e8 0x56a27630 0x56a24940 0x56a23898 0x56a249c0

stmt
side-effects arg 0
NodeArray.cilk:159>
stmt
side-effects arg 0 >
stmt
side-effects
arg 0 constant invariant arg 0 >
arg 1
>
NodeArray.cilk:159>
stmt
side-effects
arg 0
side-effects head 0x56701abc tail 0x56701abc stmts 0x56a17208
stmt >
arg 1
side-effects head 0x56701ad4 tail 0x56701ad4 stmts 0x56a17258
stmt >
NodeArray.cilk:159>
stmt side-effects arg 0
arg 1
arg 0 arg 1 >
NodeArray.cilk:159>
stmt
side-effects arg 0
arg 1
arg 0 arg 1 >
NodeArray.cilk:159>
stmt
side-effects arg 0 >
stmt
side-effects
arg 0
arg 0 arg 1 >
arg 1
side-effects head 0x56701a74 tail 0x56701a74 stmts 0x56a24900
stmt >
arg 2
side-effects head 0x56701a80 tail 0x56701a80 stmts 0x56a24920
stmt >
NodeArray.cilk:159>
stmt
side-effects arg 0 >>
arg 1
side-effects head 0x56701b64 tail 0x56701b64 stmts 0x565fb620

stmt
side-effects volatile
NodeArray.cilk:159>>
NodeArray.cilk:159>>
arg 1
side-effects head 0x56701c9c tail 0x56701c9c stmts 0x56a17280

stmt
side-effects vars
body
side-effects head 0x56701c90 tail 0x56701c90 stmts 0x56a172a8

stmt
side-effects
arg 0
arg 0 arg 1 >
arg 1
side-effects head 0x56701b7c tail 0x56701c60 stmts 0x56a27678 0x56a2769c 0x56a276c0 0x56a276e4 0x56a27708 0x567b8f9c 0x56a249e0 0x56a238e8 0x567be1d4 0x56a172d0 0x56a24a00 0x56a24a40
stmt stmt stmt stmt stmt stmt stmt stmt stmt stmt stmt stmt >
arg 2
head (nil) tail (nil) stmts
>
NodeArray.cilk:159>>
NodeArray.cilk:159>>
NodeArray.cilk:159>>
NodeArray.cilk: In function void cilk __cilk_loop_c_001(void*, long unsigned int, long unsigned int):
NodeArray.cilk:159: internal compiler error: gimplification failed
Please submit a full bug report,
with preprocessed source if appropriate.
This compiler version is 4.2.4 (Cilk Arts build 8503)
See for instructions.
make: *** [testfpgrowth] Error 1

Thanks,

6 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de ammouna

the line that generates this problem is
" conditionalNodeArray = new vector[conditionalHeader.size()]; "

but I don't understand what's wrong here

imagem de Barry Tannenbaum (Intel)

"gimplification" refers to the conversionor the intermediate representation of a function into GCC's internal representation, called GIMPLE. See http://gcc.gnu.org/onlinedocs/gccint/Gimplification-pass.html for more information, but nothing that is likely to help you.

You do realize you're allocating an array of vectors, right? If you want a vector of conditionalHead.size() entries, change the [] to () (square brackets to parenthesis):

conditionalNodeArray = new vector(conditionalHeader.size());

instead of

conditionalNodeArray = new vector[conditionalHeader.size()];

Cilk++ is unsupported software. We are extremely unlikely to fixanything in Cilk++. If you are really intending to allocate an array of vectors, your choices are:

  • Try to simplify your expression. For example, try moving the call to conditionalHeader.size() into a separate line. This mayhelp you to either identify what's wrong with your code, or work around the compiler bug.
  • Try allocating your vector in a separate, C++ module. You may get an error message that may be helpful in figuring out what's wrong.
  • Convert to Intel Cilk Plus, either using the Intel C++ compiler or the "cilkplus" branch of GCC 4.8. It's very likely that this is not a problem in the current release. If it still is, the Intel C++ compiler is, of course, supported by Intel. And we're currently working on the "cilkplus" branch of GCC 4.8, so we're more likely to fix problems with it.

- Barry

imagem de ammouna

Thanks Barry ,

imagem de ammouna

Hi,
I can compile the program now but while running it I'v got this message :

*** glibc detected *** ./testfpgrowth: munmap_chunk(): invalid pointer: 0xdeadc69c ***
======= Backtrace: =========
/lib32/libc.so.6(+0x6bff1)[0xf7536ff1]
/lib32/libc.so.6(+0x6d28e)[0xf753828e]
/usr/local/cilk/bin/../lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../lib32/libstdc++.so.6(_ZdlPv+0x21)[0xf77140a1]
./testfpgrowth[0x8052a9a]
======= Memory map: ========
08048000-08057000 r-xp 00000000 07:00 1201131 /home/acer/Bureau/FPgrowthMulticoeurs/testfpgrowth
08057000-08058000 rw-p 0000e000 07:00 1201131 /home/acer/Bureau/FPgrowthMulticoeurs/testfpgrowth
08f2f000-091e0000 rw-p 00000000 00:00 0 [heap]
dea00000-deb99000 rw-p 00000000 00:00 0
deb99000-dec00000 ---p 00000000 00:00 0
dec00000-dee00000 rw-p 00000000 00:00 0
dee00000-def00000 rw-p 00000000 00:00 0
def36000-f6caf000 rw-p 00000000 00:00 0
f6caf000-f6cb0000 ---p 00000000 00:00 0
f6cb0000-f74b0000 rwxp 00000000 00:00 0
f74b0000-f74b2000 rw-p 00000000 00:00 0
f74b2000-f74c7000 r-xp 00000000 07:00 914034 /lib32/libpthread-2.12.1.so
f74c7000-f74c8000 r--p 00014000 07:00 914034 /lib32/libpthread-2.12.1.so
f74c8000-f74c9000 rw-p 00015000 07:00 914034 /lib32/libpthread-2.12.1.so
f74c9000-f74cb000 rw-p 00000000 00:00 0
f74cb000-f761f000 r-xp 00000000 07:00 914020 /lib32/libc-2.12.1.so
f761f000-f7620000 ---p 00154000 07:00 914020 /lib32/libc-2.12.1.so
f7620000-f7622000 r--p 00154000 07:00 914020 /lib32/libc-2.12.1.so
f7622000-f7623000 rw-p 00156000 07:00 914020 /lib32/libc-2.12.1.so
f7623000-f7626000 rw-p 00000000 00:00 0
f7626000-f7630000 r-xp 00000000 07:00 1083923 /usr/local/cilk/lib32/libgcc_s.so.1
f7630000-f7631000 rw-p 00009000 07:00 1083923 /usr/local/cilk/lib32/libgcc_s.so.1
f7631000-f7655000 r-xp 00000000 07:00 914024 /lib32/libm-2.12.1.so
f7655000-f7656000 r--p 00023000 07:00 914024 /lib32/libm-2.12.1.so
f7656000-f7657000 rw-p 00024000 07:00 914024 /lib32/libm-2.12.1.so
f7663000-f7665000 rw-p 00000000 00:00 0
f7665000-f773d000 r-xp 00000000 07:00 1083910 /usr/local/cilk/lib32/libstdc++.so.6.0.9
f773d000-f7741000 r--p 000d8000 07:00 1083910 /usr/local/cilk/lib32/libstdc++.so.6.0.9
f7741000-f7742000 rw-p 000dc000 07:00 1083910 /usr/local/cilk/lib32/libstdc++.so.6.0.9
f7742000-f7749000 rw-p 00000000 00:00 0
f7749000-f7758000 r-xp 00000000 07:00 1083912 /usr/local/cilk/lib32/libcilkrts.so.1
f7758000-f7759000 rw-p 0000f000 07:00 1083912 /usr/local/cilk/lib32/libcilkrts.so.1
f7759000-f775b000 rw-p 00000000 00:00 0
f775b000-f775c000 r-xp 00000000 00:00 0 [vdso]
f775c000-f7778000 r-xp 00000000 07:00 914017 /lib32/ld-2.12.1.so
f7778000-f7779000 r--p 0001b000 07:00 914017 /lib32/ld-2.12.1.so
f7779000-f777a000 rw-p 0001c000 07:00 914017 /lib32/ld-2.12.1.so
ffdef000-ffe0e000 rwxp 00000000 00:00 0 [stack]
ffe0e000-ffe10000 rw-p 00000000 00:00 0
Aborted

or Segmentation fault

What should I do in this case ??

imagem de Barry Tannenbaum (Intel)

0xdeadc69c certainly looks like a suspicious address.

Rule #1 of Cilk programming is that before you parallelize the application it must be a correct serial program. Does the program run properly if you serialize it? How about if you run with1 worker? You can use all the normal tools like Valgrind on either the serialization with 1 worker. Since there's no stealing, everything is on 1 stack, so all the stackwalks are correct.

Rule #2of Cilk programming is that if you haven't checked your application for races, you got them. Have you run your application through the Cilkscreen race detector?

- Barry

Faça login para deixar um comentário.