This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

forall vs OpenMP


I tried to find any generic
guidelines regarding when
forall is preferable to OpenMP
parallelisation for simple
loops, but couldn't find any.

For this simple triple loop
with a conditional:

 DO K=1,SIZE3
   DO J=1,SIZE2
     DO I=1,SIZE1

       ! GRAIN NUMBER AT THIS POSITION
       NUMBER=SPACE1(I,J,K)

       ! ONLY POSITIVE NUMBERS REPRESENT GRAINS
       IF (NUMBER .GT. 1) GRAIN_VOLUME(NUMBER)=GRAIN_VOLUME(NUMBER) + 1

     END DO
   END DO
 END DO 

can anybody comment on the relative
merits of forall vs OpenMP !$OMP DO
when using GNU fortran compiler ?

Many thanks

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423


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