hpc gfortran

Sean Farley sean at macports.org
Mon Mar 25 20:06:32 PDT 2013


Joshua Root writes:

> On 2013-3-26 09:58 , Sean Farley wrote:
>> 
>> Chris Jones writes:
>> 
>>>>> What do you mean by this exactly? What is the problem with e.g.
>>>>>
>>>>> depends_build port:gcc47
>>>>> configure.fc ${prefix}/bin/gfortran-mp-4.7
>>>>> ?
>>>>
>>>> Then what does configure.fc get set to in the +clang variant?
>>>
>>> Why would you provide a +clang variant in the case of a port that has to use fortran ? Just blacklist any compiler other than a MacPorts gcc compiler, that has gfortran. Or am I missing something.
>> 
>> 1) Because any port that relies on mpi will get a version of mpicc that is
>> built with clang and has no corresponding fortran compiler.
>
> This suggests that it is openmpi that is doing it wrong. I don't see how
> having a separate gfortran port would fix it.

You're right. The mpi ports could just hardcode
clang+gfortran4.7. Having a separate gfortran would allow the user to
select which fortran they want with the regular 'port select fortran
foo'.

>> 2) Since clang is the new default with Apple, there is great interest in
>> the scientific community for building the c part with clang and the
>> fortran part with gfortran.
>
> Fair enough, but clang is the default C compiler for ports on recent OS
> versions anyway.

Yes. The debian-based OSes have a separate package for fortran, for example.

>> 3) If you have a port that depends on boost and fortran, then with your
>> suggestion there will be ABI issues with the C++ libraries.
>
> C++ ABI issues seem pretty much inescapable judging by recent bug
> reports. But again, I don't see how a separate gfortran port would help.

I think as long as there's a way to get fortran + non-gcc c compiler,
then the user will at least one way around it. Though, g95 is left out
in the cold it would seem (not that I think g95 is a viable fortran
compiler, but that's another story).

Perhaps I could see how far I can get with a fortran portgroup without
touching the gcc ports and then report back? From my own experience, the
biggest change will be requiring gcc for the clang+gfortran4.7 mpi
(openmpi and mpich, to be precise) ports.


More information about the macports-dev mailing list