This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gomp slowness

Hi All,

I did some tests with GCC-4.2.2 (MinGW build) and the source code provided by skaller.

The compilation log is as follows.

-------------- Build: Release in Test ---------------
[ 50.0%] mingw32-gcc.exe -Wall -fexceptions -fopenmp -O2 -IC:\MinGW\include -c C:\Projects\Test\combined_mp.c -o obj\Release\combined_mp.o
C:\Projects\Test\combined_mp.c: In function 'main':
C:\Projects\Test\combined_mp.c:77: warning: 'sum' is used uninitialized in this function
[100.0%] mingw32-g++.exe -LC:\MinGW\lib -o bin\Release\Test.exe obj\Release\combined_mp.o -s -lgomp -lpthread
Output size is 16.50 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 1 warnings

Here is the result of two sample runs.

C:\Projects\Test\bin\Release>set OMP_NUM_THREADS=1

e started at 0
e done at 2859
pi started at 2859
pi done at 12390
integration started at 12390
integration done at 26234
Values: e*pi = 8.539734,  integral = 9.666667
Total elapsed time: 26.234 seconds

C:\Projects\Test\bin\Release>set OMP_NUM_THREADS=2

e started at 0
pi started at 0
e done at 828
integration started at 828
integration done at 8015
pi done at 8703
integration started at 8703
Values: e*pi = 9.267763,  integral = 9.666667
Total elapsed time: 15.609 seconds


This indicates that GOMP is working well. :)

My system specs:

Windows XP SP2, 1GB RAM, T2050@1.60 GHz (Core Duo)
Compiler: GCC-4.2.2 (MinGW build)

Best Regards,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]