Request for comments: mpi and using multiple compilers

David Strubbe dstrubbe at gmail.com
Thu Jul 25 14:02:46 PDT 2013


Hi Sean,

We both have 'arpack @3.1.3+mpich' installed but they were built with
> two very different compilers: mine with clang and yours with gcc45. If
> we force the user to specify the compiler then we can use
> require_active_variants to make sure everything is in line, e.g.
>
> arpack +mpich +gfortran -> mpich+gfortran will be used
> arpack +mpich +gcc45 -> mpich+gcc45 will be used
>
> And this ensures that the same compiler is used on all machines with the
> same variants.
>

To me, this seems to complicate life for the user (you are required to
check what compiler you used for mpich, in order to install this port).
Also, I can always do "port install mpich +whatever" later on, which
implicitly deactivates the one I had at the time of building arpack, and
now the mpich and underlying compiler libraries used in arpack are
different, and your check does not succeed in enforcing anything about
that. And, do you see my point that there are other variants involved too,
which are not being checked? So, the build is still non-reproducible in
ways that may potentially be important. (For the record, arpack uses only
Fortran, but this a small detail. I understand the point of your example.)

BUT: How about this idea which may fit with both of our conceptions of how
things should work?

A default variant for fortran is set according to whichever one was used
for building MPI. Then, you can still do "port install arpack +mpich"
without worrying which compiler was used to build mpich, but then the
Portfile will make this actually "arpack +mpich +gcc45" or whatever in the
registry, so you can report a problem knowing which compiler was used. (And
in case the user set gcc45 by hand, this will be checked for consistency
against mpich.)

I only mean enforcing the same compiler if the same variants are given
> as I showed above.
>

Ok.


> It just simply loops through all the fortran variants (gccXY, gfortran,
> and g95) and returns the one that is set or the empty string if none are
> set.
>

All right, so my suggestion instead is to just see what variant MPI was
built with, rather than checking against something provided by the user.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130725/d2b9ba8e/attachment.html>


More information about the macports-dev mailing list