Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62835 closed defect (fixed)

netcdf-fortran does not honour variant specifications of compiler, but requires g95 instead

Reported by: platipodium (Carsten Lemmen) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: tenomoto (Takeshi Enomoto), mascguy (Christopher Nielsen), eborisch (Eric A. Borisch), cjones051073 (Chris Jones), kencu (Ken)
Port: netcdf-fortran

Description

When trying to install netcdf-fortran (with openmpi) I get g95 as a requirement and *not* the selected gcc10 or gccdevel on MacOS aarch64

> port install netcdf-fortran +gccdevel+openmpi

--->  Computing dependencies for netcdf-fortran
The following dependencies will be installed:  g95

> port install netcdf-fortran +gcc10+openmpi

--->  Computing dependencies for netcdf-fortran
The following dependencies will be installed:  g95

Change History (22)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

For some reason the gcc* variants aren't offered when using +openmpi:

% port variants netcdf-fortran +openmpi
netcdf-fortran has the variants:
[+]g95: Build using the g95 Fortran compiler
   mpich: Build using the MPICH compiler
     * conflicts with openmpi
  +openmpi: Build using the OpenMPI compiler
     * conflicts with mpich

comment:2 Changed 4 years ago by jmroot (Joshua Root)

Cc: mascguy eborisch cjones051073 added

I don't see where the problem is on initial inspection, but I guess it must be in the mpi or compilers portgroups. Adding some people who might know more.

comment:3 Changed 4 years ago by mascguy (Christopher Nielsen)

It looks like the following commit is disabling most of the compiler support.

mpi PG: Skip missing compilers on arm

The problem is that for non-ARM builds, it disables almost everything for openmpi:

       # Disable compilers not support on arm
        if {${os.arch} eq "arm" || !$is_mpich} {
            lappend disabled -gcc5 -gcc6 -gcc7 -gcc8 -gcc9 -gcc10
            lappend disabled -clang60 -clang70 -clang80 -clang90 -clang10
        }

With the latest mpi portgroup, all compiler variants are missing when selecting openmpi:

$ port info --variants netcdf-fortran +openmpi
variants: g95, mpich, openmpi, universal

Reverting to a version of the portgroup prior to that commit:

$ port info --variants netcdf-fortran +openmpi
variants: g95, gcc10, gcc5, gcc6, gcc7, gcc8, gcc9, mpich, openmpi, universal

@CJones, do you want to go ahead and fix?

comment:4 Changed 4 years ago by mascguy (Christopher Nielsen)

Owner: set to cjones051073
Status: newassigned

comment:5 Changed 4 years ago by mascguy (Christopher Nielsen)

Hmmmm, well, I believe clang90 and clang10 are working on ARM, along with gcc10. So the logic needs to be revisited.

However, it also disables everything for openmpi, when running on x86. And that's definitely a bug.

Last edited 4 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:6 Changed 4 years ago by mascguy (Christopher Nielsen)

The logic in question should be the following, I believe:

        # Disable compilers not support on arm
        if {${os.arch} eq "arm" && !$is_mpich} {
            lappend disabled -gcc5 -gcc6 -gcc7 -gcc8 -gcc9 
            lappend disabled -clang60 -clang70 -clang80 
        }

comment:7 Changed 4 years ago by platipodium (Carsten Lemmen)

The above solution by @mascguy is confirmed working for me, but still does not solve +gccdevel +openmpi (which may not be supported at this time?)

comment:8 Changed 4 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In b57ec390c8239d4ce47353f5adb1b43f60da4431/macports-ports (master):

mpi pg: fix ARM support, along with x86

Fixes: #62835

comment:9 in reply to:  7 ; Changed 4 years ago by mascguy (Christopher Nielsen)

Replying to platipodium:

The above solution by @mascguy is confirmed working for me, but still does not solve +gccdevel +openmpi (which may not be supported at this time?)

Carsten, is gccdevel necessary for your work, or are you able to use gcc10?

Last edited 4 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:10 in reply to:  9 Changed 4 years ago by platipodium (Carsten Lemmen)

Carsten, is gccdevel necessary for your work, or are you able to use gcc10?

As I am developing on an M1 machine, I'd prefer (native) gcc11 (gccdevel).... but mpich works so I don't depend on openmpi variant

comment:11 in reply to:  5 Changed 4 years ago by cjones051073 (Chris Jones)

Replying to mascguy:

Hmmmm, well, I believe clang90 and clang10 are working on ARM, along with gcc10. So the logic needs to be revisited.

However, it also disables everything for openmpi, when running on x86. And that's definitely a bug.

Clang 9 and 10 build on arm but they are not reliable enough to use really, I have seen them ICE etc. Clang 11 is really the best one to use on arm

comment:12 in reply to:  8 Changed 4 years ago by cjones051073 (Chris Jones)

Replying to Christopher Nielsen <mascguy@…>:

In b57ec390c8239d4ce47353f5adb1b43f60da4431/macports-ports (master):

mpi pg: fix ARM support, along with x86

Fixes: #62835

Allowing gcc10 is fine as that has been fixed on arm since that list was first made, but it is a mistake to allow clang9.0 and 10 on arm as these are not reliable on this platform. Why would you use them when clang 11 is available and has food arm support ?

Version 0, edited 4 years ago by cjones051073 (Chris Jones) (next)

comment:13 Changed 4 years ago by mascguy (Christopher Nielsen)

Cc: kencu added

comment:14 Changed 4 years ago by mascguy (Christopher Nielsen)

If the consensus is that Clang 9 and 10 are unreliable on ARM, I'll update the portgroup accordingly.

comment:15 Changed 4 years ago by mascguy (Christopher Nielsen)

Never mind, looks like that was already done. :-)

comment:16 in reply to:  8 ; Changed 4 years ago by jmroot (Joshua Root)

Replying to Christopher Nielsen <mascguy@…>:

In b57ec390c8239d4ce47353f5adb1b43f60da4431/macports-ports (master):

mpi pg: fix ARM support, along with x86

Fixes: #62835

It looks like this change just shifts the problem to mpich instead of openmpi? I don't see why $is_mpich should be relevant to this decision at all.

comment:17 in reply to:  16 Changed 4 years ago by mascguy (Christopher Nielsen)

Replying to jmroot:

It looks like this change just shifts the problem to mpich instead of openmpi? I don't see why $is_mpich should be relevant to this decision at all.

Good catch. @CJones, do you want to fix, or shall I?

comment:19 Changed 4 years ago by platipodium (Carsten Lemmen)

And there is more to it:

sh-3.2# port install netcdf-fortran +gccdevel+openmpi
--->  Computing dependencies for netcdf-fortran
Error: Can't install libgcc because conflicting ports are active: libgcc-devel

Is this possibly fixed by your above commits? Otherwise maybe make this a new ticket?

comment:20 Changed 4 years ago by kencu (Ken)

Just try doing what it says; deactivate libgcc-devel and install libgcc.

comment:21 in reply to:  20 Changed 4 years ago by platipodium (Carsten Lemmen)

Replying to kencu:

Just try doing what it says; deactivate libgcc-devel and install libgcc.

Cannot work as libgcc-devel is a dependency of gccdevel. So when I request +gccdevel, it should correctly depend on libgcc-devel, *not* libgcc

comment:22 Changed 4 years ago by kencu (Ken)

so just disable gcc-devel :>

Edit: oh, I see what you mean now. Requesting netcdf-fortran +gccdevel gives you this libgcc issue. Right.

Last edited 4 years ago by kencu (Ken) (previous) (diff)
Note: See TracTickets for help on using tickets.