Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] is loop unrolling safe for MPI logic?
From: Anton Shterenlikht (mexas_at_[hidden])
Date: 2010-07-17 08:17:37


On Sat, Jul 17, 2010 at 07:50:30AM -0400, Jeff Squyres wrote:
> On Jul 17, 2010, at 4:22 AM, Anton Shterenlikht wrote:
>
> > Is loop vectorisation/unrolling safe for MPI logic?
> > I presume it is, but are there situations where
> > loop vectorisation could e.g. violate the order
> > of execution of MPI calls?
>
> I *assume* that the intel compiler will not unroll loops
> that contain MPI function calls. That's obviously an
> assumption, but I would think that unless you put some
> pragmas in there that tell the compiler that it's safe
> to unroll, the compiler will be somewhat conservative
> about what it automatically unrolls.

% mpif90 ./p-grains1.f90
./p-grains1.f90(123): (col. 1) remark: LOOP WAS VECTORIZED.
./p-grains1.f90(250): (col. 35) remark: LOOP WAS VECTORIZED.

Looking at the source code:

   123 sub_domain=0

   250 write(*,*)count(sub_domain .ne. 0)

where sub_domain is an array.
 
So, it seems the compiler vectorised only implicit whole
array operations.

Jeff, many thanks again

anton

-- 
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