OpenMP WORKSHARE behaves strangely

Tobias Burnus burnus@net-b.de
Mon Feb 18 10:53:00 GMT 2008


Ignacio Fernández Galván wrote:
> 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
You could try to use -fdump-tree-all and look at <filename>.*omp*, which 
shows in pseudo C code what OpenMP does.  But I think at the end we need 
an example program.

Tobias



More information about the Fortran mailing list