Request for comments: mpi and using multiple compilers
dstrubbe at gmail.com
Wed Jul 24 13:06:37 PDT 2013
> > I think in most cases that if you use MPI, then there is no need to
> > the underlying compiler also (since compiling even non-MPI code in the
> > package with mpich +gfortran is the same as just using gfortran).
> > we sorted this out for the arpack port.
> Ah, that's something I tried to do at first as well. It's not possible
> since it would lead to non-unique builds. For example, let's assume
> arpack has a known problem with gcc46 and an unknown bug with
> gcc45. In the arpack portfile, we'll put an error if +mpich is selected
> when it was built with +gcc46. Now, 'port install arpack +mpich' would
> have a very, very confusing error to solve if mpich was built with
> +gcc45. Having the compiler in the variant makes a very clear
> representation of what's going on.
Not sure what you mean by this. It is "possible" in the sense that that is
the current state of the arpack port and it is working. The previous state
was, if you built arpack +mpich +gcc45, gcc45 would be used for the serial
part, and mpich would be used for the parallel part of the code, regardless
of what variant mpich had been built with. If you have a problem with
arpack +mpich, I would ask as first question, what variant of mpich did you
have? And then that would give the information needed to diagnose a problem
with gcc45. I agree that this is "non-unique" but doesn't seem any more so
than the fact that it may matter which version of mpich you used, or
whether you used +gforker or +tuned.
> > On the other hand, sometimes it is necessary to enforce the same Fortran
> > compiler used for MPI and for some dependency (when they use Fortran
> > modules).
> Anything else is inviting insanity.
That seems a bit strong to me. If there are not Fortran modules used (.mod
files), I don't see why it should matter. I have mixed and matched atlas,
fftw, blacs, scalapack etc. between gfortran, g95, sunf90, etc. on linux
quite a bit and not had any trouble.
> > I am working on adding MPI support to the octopus port, and wrote
> > the following Portfile code to handle such a dependency. Perhaps you can
> > include something like this in MPI portgroup (and use your more extensive
> > list of Fortran compilers available).
> This code just enforces the fortran variant of openmpi, correct? If so,
> then I already enforce this through the require_active_variants block.
I am not sure whether what you have is the same idea or not. Where does
your port group get "fortran_variant_name" from?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macports-dev