OpenMP WORKSHARE behaves strangely
Ignacio Fernández Galván
jellby@yahoo.com
Mon Feb 18 10:44:00 GMT 2008
Hi all,
I'm having a problem with OpenMP in a program... I have code of the
form:
!$OMP PARALLEL WORKSHARE
Pot(:)=Pot(:)/DBLE(Num)
!$OMP END PARALLEL WORKSHARE
in a couple of subroutines, but when I compile it with -fopenmp, it
does not divide by Num, but by Num**2 ! I have tried to build a sample
program showing the problem, but while my "big" program shows it, all
small codes I've tried behave correctly.
If I run the code with OMP_NUM_THREADS=1, it gives the right answer,
but with any other number (although my computer has only 2 cores), it's
always Num**2.
I'm using:
gcc version 4.3.0 20080217 (experimental) [trunk revision 132376] (GCC)
on:
Linux djelibeibi 2.6.22.12-desktop-1mdv #1 SMP Tue Nov 20 08:38:27 EST
2007 i686 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz GNU/Linux
Has anyone had a similar experience? What could the problem be? I
believe I'm using correct code...
Thanks,
Ignacio
__________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
More information about the Fortran
mailing list