Request for comments: mpi and using multiple compilers

Sean Farley sean at
Sat Jul 20 16:28:35 PDT 2013

Hi all,

I'm looking for comments and feedback for two new port groups:
multiple compilers [1] and mpi [2]. My goal is to unify all the gcc4X
variants and mpich / openmpi variants scattered throughout the port

Here's a summary of the port groups:

- provide variants for all compilers (should there be a way to blacklist?)
- provide mpi variants e.g. netcdf [3]

$ port info netcdf

netcdf @, Revision 2 (science)
Variants:             [+]clang, clang30, clang31, clang32, clang33,
clang34, [+]dap, dragonegg30, dragonegg31, dragonegg32, dragonegg33,
dragonegg34, g95, gcc44, gcc45, gcc46, gcc47, gcc48, gcc49,
                      gfortran, hdf4, llvm, mpich, mpich2,
mpich_devel, [+]netcdf4, openmpi, openmpi_devel, universal

- use require_active_variants to deal with conflicts; e.g. netcdf + mpich [4]

$ port install mpich
--->  Activating mpich @3.0.4_0+clang
--->  Cleaning mpich

$ port install netcdf +mpich +gfortran
--->  Computing dependencies for netcdf.
--->  Configuring netcdf
Error: org.macports.configure for port netcdf returned: mpich must be
installed with +gfortran.

Some questions:

* Should there be a default compiler (i.e. +clang)? Currently, I have
this implemented but maybe it could be removed.

* How would a port specify an optional use of mpi (or fortran) and a
requirement of one? There could be a proc 'require_mpi /
require_fortran' but I was unsure if it was worth it. Currently, there
is some monkeying around logic with using default_variants + checking
for at least one mpi / gfortran variant. I think I prefer this way
because it keeps all the variants in line.





More information about the macports-dev mailing list