Skip to content

Move PGI compiler check before GNU #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

jjhursey
Copy link
Member

  • PGI compiler has a GNU compatability mode so __GNUC__ is defined by
    pgcc. So first check for __PGI before checking for GNU.

 * PGI compiler has a GNU compatability mode so `__GNUC__` is defined by
   `pgcc`. So first check for `__PGI` before checking for GNU.

Signed-off-by: Joshua Hursey <[email protected]>
@jjhursey jjhursey requested a review from bgoglin October 20, 2020 16:43
@jjhursey
Copy link
Member Author

Configured with ./configure --prefix=$HOME/local/hwloc-pgi CC=pgcc CXX=pgc++ FC=pgfortran (on ppc64le, but that shouldn't matter for this check).

Before the change configure detected the PGI compiler as "gnu"

###
### Configuring hwloc core
###
checking hwloc building mode... standalone
configure: hwloc builddir: /smpi_dev/mpiczar/local/src/hwloc-2.2.0
configure: hwloc srcdir: /smpi_dev/mpiczar/local/src/hwloc-2.2.0
checking for hwloc version... 2.2.0
checking if want hwloc maintainer support... disabled
checking for hwloc directory prefix... (none)
checking for hwloc symbol prefix... hwloc_
checking for pgcc option to accept ISO C99... (cached) none needed
checking size of void *... 8
checking which OS support to include... Linux
checking which CPU support to include... unknown
checking size of unsigned long... 8
checking size of unsigned int... 4
checking for the C compiler vendor... gnu

After this commit, it correctly detects it as "portland group"

###
### Configuring hwloc core
###
checking hwloc building mode... standalone
configure: hwloc builddir: /tmp/jjhursey/hwloc
configure: hwloc srcdir: /tmp/jjhursey/hwloc
checking for hwloc version... 2.4.0a1-git
checking if want hwloc maintainer support... disabled
checking for hwloc directory prefix... (none)
checking for hwloc symbol prefix... hwloc_
checking for pgcc option to accept ISO C99... (cached) none needed
checking size of void *... 8
checking which OS support to include... Linux
checking which CPU support to include... unknown
checking size of unsigned long... 8
checking size of unsigned int... 4
checking for the C compiler vendor... portland group

@bgoglin
Copy link
Contributor

bgoglin commented Oct 20, 2020

Thanks Josh. Is this a new feature in pgcc? Or something most people never enable?

@jjhursey
Copy link
Member Author

I think it's been there for a few releases at least. In Open MPI we made the change a while back to the similar m4 file. I just noticed it today because of an odd configuration/setup I had with Open MPI's new 3rd party configure logic. It was trying to pass down GNU only warning CLI options into hwloc, which PGI doesn't handle.

It might be more apparent when using the new v20.x pgcc or the older v19.x pgcc18, but I would need to dig into that a bit further to confirm.

@bgoglin bgoglin merged commit 9f1aafb into open-mpi:master Oct 20, 2020
@jjhursey jjhursey deleted the fix-pgi-vendor-check branch October 20, 2020 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants