Re: gomp slowness

2007-10-17 Thread Biplab Kumar Modak

Ross Ridge wrote:

skaller writes:

Unfortunately no, unless MSVC++ in VS2005 has openMP.


I don't know if Visual C++ 2005 Express supports OpenMP, but the
Professional edition should.  Alternatively, the free, as in beer,
Microsoft compiler included in the Windows SDK supports OpenMP.



Visual C++ Express doesn't support OpenMP. The OpenMP library is shipped 
with Standard Edition onwards.


Best Regards,

Biplab

http://biplab.in



Re: gomp slowness

2007-10-17 Thread Biplab Kumar Modak

skaller wrote:

On Wed, 2007-10-17 at 18:14 +0100, Biagio Lucini wrote:

skaller wrote:


It would be interesting to try with another compiler. Do you have access 
to another OpenMP-enabled compiler?


Unfortunately no, unless MSVC++ in VS2005 has openMP.
I have an Intel licence but they're too tied up with commerical
vendors and it doesn't work on Ubuntu (it's built for Fedora and Suse).

If possible, you can post the source code. I've a MSVC 2005 license (I 
bought it to get OpenMP working with it).


I can then give it a try. I have a dual core PC. :)

Best Regards,

Biplab

http://biplab.in



Re: gomp slowness

2007-10-18 Thread Biplab Kumar Modak

skaller wrote:


OK, attached.



Hi skaller,

I think I've wasted my money. They do not ship OpenMP headers and libs 
with Standard Edition. :(


Best Regards,

Biplab



Re: gomp slowness

2007-10-18 Thread Biplab Kumar Modak

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

C:\Projects\Test\bin\Release>test
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.67
Total elapsed time: 26.234 seconds

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

C:\Projects\Test\bin\Release>test
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.67
Total elapsed time: 15.609 seconds

C:\Projects\Test\bin\Release>


This indicates that GOMP is working well. :)

My system specs:

Windows XP SP2, 1GB RAM, [EMAIL PROTECTED] GHz (Core Duo)
Compiler: GCC-4.2.2 (MinGW build)


Best Regards,

Biplab

http://biplab.in