Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI hangs when application compiled with -O3, runs fine with -O0
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2014-02-01 07:13:32


Sorry for the massive delay in replying; I'm going through my inbox this morning and finding old mails that I initially missed. :-\

More below.

On Jan 17, 2014, at 8:45 AM, Julien Bodart <julien.bodart_at_[hidden]> wrote:

> version: 1.6.5 (compiled with Intel compilers)
>
> command used:
> mpirun --machinefile mfile --debug-daemons -np 16 myapp
>
> Description of the problem:
> When myapp is compiled without optimizations everything runs fine
> if compiled with -O3, then the application hangs. I cannot reproduce the problem with a hello world test.

-O3 is notorious for both:

- exposing compiler bugs
- exposing application bugs

I just ran across a -O3 compiler bug in gcc 4.8.1 yesterday.

But more often, it reveals bugs in the application -- something you thought was safe/correct, but actually isn't, and when a compiler makes an aggressive optimization around it, the Badness is revealed.

> when using --debug-daemons I see the following behavior (PATHTOAPPLICATION= my path to the application)

I'm not quite sure from the context of your mail: are you saying that the difference is whether you compile *your application* with -O3 vs. -O0, or whether you compile *Open MPI* with -O3 vs. -O0?

I'd also suggest ensuring that you have the latest release of the Intel compiler for your series. The Intel compiler is like every other piece of software: it has bugs. If you have Intel compiler 12, for example, ensure you have the latest version of the Intel compiler 12 so that you get all the latest bug fixes, etc. We've seen this kind of thing many times from the different compiler suites.

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/