This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
forall vs OpenMP
- From: Anton Shterenlikht <mexas at bristol dot ac dot uk>
- To: fortran at gcc dot gnu dot org
- Date: Sun, 8 Apr 2012 12:14:37 +0100
- Subject: 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