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-18 03:09:28


On Sat, Jul 17, 2010 at 09:14:11AM -0700, Eugene Loh wrote:
> 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.
> >
> >
> More generally, a Fortran compiler that optimizes aggressively could
> "break" MPI code.
>
> http://www.mpi-forum.org/docs/mpi-20-html/node236.htm#Node241
>
> That said, you may not need to worry about this in your particular case.

This is a very important point, many thanks Eugene.
Fortran MPI programmer definitely needs to pay attention to this.

MPI-2.2 provides a slightly updated version of this guide:

http://www.mpi-forum.org/docs/mpi22-report/node343.htm#Node348

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