mpi

Sean Farley sean at macports.org
Tue Sep 30 17:04:21 PDT 2014


Ryan Schmidt writes:

>> This creates the scenario of: does the port want the full suite of, for
>> example, gcc (meaning both C and fortran) or just the fortran
>> compiler.
>
> And which of these two strategies does the mpi portgroup employ?

Both, that's why there is a 'require_fortran' variable.

>> This led to the creation of the 'require_fortran' monstrosity.
>
> With the release of OS X 10.9 and its use of libc++ we seem to have found the use of gcc ports as values for configure.compiler untenable, giving rise to the fortran recipe which just sets the fortran compiler and leaves the C/C++/ObjC/ObjC++ compilers alone:
>
> https://trac.macports.org/wiki/PortfileRecipes#fortran
>
> I'm not sure if or how this relates to the require_fortran that you mentioned above.

The portfile recipe would be the equivalent of something like +clang
+gfortran which would give you the clang compilers for C and gfortran
4.8 for fortran code. There is also the choice of +g95 in the compilers
portgroup but that doesn't work as well in my experience.

>> -------------
>> Complications
>> -------------
>> 
>> There are two complications with this implementation. The first is that
>> there is no knowledge of configure.compiler (used for blacklisting).
>
> I don't understand the situation in depth, but if mpi is requested, shouldn't we just inspect the value of configure.cc / configure.cxx / configure.obcj / configure.objcxx / configure.fc etc. (in a pre-configure block, to give a port time to change compiler.blacklist / compiler.whitelist / compiler.fallback), and replace them with their corresponding mpi wrappers? If a port needs a Fortran compiler then it would also need to provide gcc variants which would select only the fortran compiler, a la the fortran recipe.

This is pretty much was is done (modulo the blacklist). If I understand
correctly, though, you want to remove gcc from being able to be used as
a compiler? This would be a serious limitation.

Instead, I'd like to make it easier to say: "take the port 'mpich' and
make all of its dependents use the same compilers". That's what the mpi
portgroup tries to mitigate.


More information about the macports-dev mailing list