Skip to content

0.3.7 fails to build with PGI (versions 18.10, 19.4 and probably more) #2236

Closed

Description

I am trying to build version 0.3.7 with PGI 19.4 (I've also tried 18.10 and it has the same problem) and it fails immediately with an "Unknown switch" error.

+ make USE_OPENMP=1 CC=pgcc CXX=pgc++ FC=pgfortran F90=pgfortran F77=pgfortran
pgcc-Error-Unknown switch: -march=native
make: *** [getarch] Error 1
Makefile.system:216: Makefile.conf: No such file or directory
make: *** No rule to make target `Makefile.conf'.  Stop.
+ exit 1

I tried to debug the issue by looking at the build system and it appears that the problem has something to do with creation of Makefile.conf and config.h. For some reason, Makefile.conf is not getting created and the value of $(C_COMPILER) is wrong when it gets to line 147 of Makefile.system. Even though I'm using the PGI compiler, it still tries to use the -march=native flag even though there is a check to prevent that.

# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
ifeq ($(ARCH), x86_64)
ifneq ($(C_COMPILER), PGI)
GETARCH_FLAGS += -march=native
endif
endif

PGI builds appear to be broken.

Activity

  1. brada4 commented on Aug 23, 2019

    @brada4
    Contributor

    Try HOSTCC=cc

  2. christopherwharrop-noaa commented on Aug 23, 2019

    @christopherwharrop-noaa
    Author

    Thank you! That fixes this issue. Unfortunately, PGI 19.4 fails with a different problem later on (18.10 works). I'll close this issue and open a new one to address the new problem.

  3. brada4 commented on Aug 23, 2019

    @brada4
    Contributor

    You can attach full build log like with script command, that prevents long chain of further questions.
    If you have an idea hot to get getarch built with PGI - share that, there is a place for #ifdef to make it permanent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions