Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: Adding -DOPEN_MPI=1 to mpif77 and mpif90
From: Paul H. Hargrove (PHHargrove_at_[hidden])
Date: 2010-02-12 05:41:53


Ralf Wildenhues wrote:
> * Jeff Squyres wrote on Thu, Feb 11, 2010 at 12:41:15PM CET:
>
>> On Feb 11, 2010, at 1:00 AM, Ralf Wildenhues wrote:
>>
>>> * Jeff Squyres wrote on Wed, Feb 10, 2010 at 10:02:27PM CET:
>>>
>>>> WHAT: Add -DOPEN_MPI=1 to the mpif77 and mpif90 command lines
>>>>
>>> It won't work with IBM xlf which needs -WF,-D. I'm sure there are other
>>> Fortran compilers that don't grok -D either (and may not have any other
>>> flag), but I'm not sure whether OpenMPI cares about them.
>>>
>> Ah, good!
>>
>> If we care, it is easy enough to add a configure test to figure this
>> kind of stuff out.
>>
>
> Sure.
>
>
>> Are you aware of any other Fortran compilers that don't accept -D, and
>> if so, what flags they *do* accept?
>>
>
> I've come across old Fortran 77 compilers that don't do any preprocessing
> and thus don't accept any related flags. I don't remember details
> though, and I'm not aware of any currently-used ones; my experience with
> Fortran compilers is limited though.
>
> Cheers,
> Ralf
>

It seems to me that if the compiler doesn't support any form of
preprocessing, then the user can't tell whether one has defined OPEN_MPI
or not.
So, one defines it when the capability exists, and does nothing for
compilers lacking the capability.

-Paul

-- 
Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group                 Tel: +1-510-495-2352
HPC Research Department                   Fax: +1-510-486-6900
Lawrence Berkeley National Laboratory