[LLVMdev] no differnce in the execution time between seq. and parallel programs
Patrik Hägglund H
patrik.h.hagglund at ericsson.com
Fri Jun 8 02:36:52 PDT 2012
Parallel execution incurs an overhead penalty compared to sequential execution, which eventually is overcomed by more computing resources. That is, you don't always benefit from running in parallel.
In this case, I think it is very hard to say more without the details of your programs. I would say that your figures look "normal" given the information you provided. Just as the sequential execution times differ between compilers in "random" ways, the parallel may differ too.
/Patrik Hägglund
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Esraa
Sent: den 7 juni 2012 15:47
To: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] no differnce in the execution time between seq. and parallel programs
Duncan Sands <baldrick <at> free.fr> writes:
>
> > I would be happy if you give me an insight into what could have caused the
> > difference.
>
> No idea. Maybe you forgot to turn optimizations on when compiling? Otherwise
> you are going to have to send in your programs along with an explanation of how
> you compiled them exactly (exact sequence of commands) both for gcc and LLVM.
>
> Ciao, Duncan.
>
Hi Ciao
Thank you very much for your help and patience
I want to check with you the compilation steps witout turn on any optimazation
in both gcc and llvm :
Fft_x.c The first program before the transformation
Fft_dswp.c The second program after the transformation
In gcc compiler I used the following steps
--Before the transformation
gcc -Wall fft_x.c -o samp -lm
Time ./samp
0.544 the execution time before transformation
--After the transformation
Gcc -Wall fftx_dswp.c -o samp -lm -lpthread
Time ./samp
0.319 the execution time after transformation
-------------------------------------------------------
Then I repeat the same Pervious steps with the llvm
In llvm compiler I used the following steps
--Before the transformation
Llvm-gcc -c -emit-llvm fft_x.c -o sam.o
Llvm-ld sam.o -lm
Time ./a.out
0.320 the execution time before transformation
--After the transformation
Llvm-gcc -c -emit-llvm fft_dswp.c -o sam.o
Llvm-ld sam.o -lm
Time ./a.out
0.350 the execution time after transformation
------------------------------------------------------
Realy I don't care which one is faster llvm or gcc , but the thing that I care
about is
In gcc there was difference in the execution time before and after the
transformation, but in llvm I didn't see any difference in llvm.
In llvm the execution time after the transformation became worse .
if evey thing is ok and no error
My question is
Are there any strategies that llvm use it to treat with threads that make the
performance worse.
many thanks
Esraa
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list