Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] openmpi -cc=<compiler name> option
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-09-23 10:48:18


On Sep 23, 2011, at 10:07 AM, Waclaw Kusnierczyk wrote:

> it's not unusual to use double-hyphen ('--') to separate options
> intended for the wrapper from the options intended for the wrapped. so
> you could have
>
> wrapper --foo -- --foo
>
> with the first --foo interpreted by the wrapper and the other one passed
> down to whatever the downstream program is.

Yes, we considered this approach.

However, we ultimately discarded it when someone showed a real-world code that used *multiple* wrapper compilers (i.e., one wrapper compiler invoked another, which, in turn, invoked another, and then finally invoked the real/underlying compiler). Who gets the tokens before "--"?

You could certainly have a command line like:

   wrapper1 --foo -- --opions-for-wrapper2 -- --options-for-wrapper3 -- foo.c -o foo

But that seems exceedingly distasteful.

I'm afraid I don't remember the specific application / middleware that was used in our decision point not to support "--", but I should point out it was very much in line with our original philosophy: only understand --showme and pass everything else, including "--", to the underlying executable (which may just happen to be another wrapper or something else that might understand "--").

Given that MPI can be used with other middleware, we decided that the best approach was minimalistic and allow our flags to be extracted if needed. Those two options seemed to cover all cases, even if they -- unfortunately -- aren't portable.

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