gcc cilkplus git repository breaks on parfib

gcc cilkplus git repository breaks on parfib

Hello,

I have been hacking on cilk for about a year now and have been working with an old cilk release. I recently pulled the most recent commit from the gcc mirror on github and compiled the cilkplus branch. I then proceeded to run parfib and got a segfault immediately. From poking around gdb, it looks like worker states are either corrupted or uninitialized. I was wondering if you could confirm that this is a problem with the current state of the rts, and not a problem on my end. the hash that I am used for the compilation was:

commit 0c9ec0be36b0948788df3b418c1d6f789ed21dad
Author: bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Dec 25 22:46:14 2012 +0000

Reverted libcilkrts files to 2068.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cilkplus@194718 138bc75d-0d04-0410-961f-82ee72b054a4

I can run a basic cilk test and spawn without problems. I can also run parfib on low values (<10). 

Thanks.

Chris.

6 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi Chris,
I am not able to replicate the segfault. Can you please send me a small test case for me to try out?

Thanks,

Balaji V. Iyer.

I have attached the code I am using to run the tests. I compiled the code with:
gcc -std=gnu99 -lcilkrts -lpthread -fcilkplus -ldl -ggdb parfib.c -o parfib.exe

It is a problem that does not happen all the time. You can get a few runs without a segfault, but it segfaults pretty quickly. here are an example 3 runs:
[czakian@enigma cilk_tests]$ ./parfib.exe 20
Running pfib of 20...
Fib(20) is 10946
[czakian@enigma cilk_tests]$ ./parfib.exe 20
Running pfib of 20...
Segmentation fault (core dumped)
[czakian@enigma cilk_tests]$ ./parfib.exe 20
Running pfib of 20...
runtime/local_state.c:43: cilk assertion failed: ff2
Aborted (core dumped)

When I run these in gdb, I get stack corruption a lot of times when the program segfaults, and when the assertion fails happens run_scheduling_stack_fcn, line 43 of local_state.c.

Chris.

Allegati: 

AllegatoDimensione
Download parfib.c562 byte

Hello Chris,
I ran them several times and I am still not getting the seg fault. I am working on a 64 bit x86 (x86_64), are you doing the same? Will it be possible for you to delete the install directory & the object files, reconfigure the source and build them again? One suggestion I would make about parfib.c is to spawn the pfib (n-1), not the pfib(n-2). This would give the runtime more work to steal.

Thanks,

Balaji V. Iyer.

Hmm, interesting. I compiled the same code on my research machine (32 cores, Intel Xeon x86_64) and had no problems.

The machine that has a problem is an intel core2 duo x86_64. I will try to recompile again on my laptop and see if that resolves it. Is there any known issues with that arch? I am running fedora 17 if that makes a difference.

Hi Chris,
I test them on SuSE and Ubuntu, and it seem to work fine on those two. Also, to my best knowledge the architecture and OS that you mentioned should not be an issue.

Thanks,

Balaji V. Iyer.

Accedere per lasciare un commento.