Skip to content
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

issue with finding MPI when building with spack #30

Open
gonsie opened this issue Oct 30, 2019 · 7 comments
Open

issue with finding MPI when building with spack #30

gonsie opened this issue Oct 30, 2019 · 7 comments

Comments

@gonsie
Copy link

gonsie commented Oct 30, 2019

I'm getting a very strange issue when building with spack. It appears that configure finds MPI correctly, but then fails.

     77    checking for stdlib.h... (cached) yes
     78    checking for GNU libc compatible malloc... yes
     79    checking for /usr/local/bin/mpicc... /usr/local/bin/mpicc
     80    Checking whether /usr/local/bin/mpicc responds to '-showme:compile'.
           .. no
     81    Checking whether /usr/local/bin/mpicc responds to '-showme'... no
     82    Checking whether /usr/local/bin/mpicc responds to '-compile-info'...
            yes
  >> 83    configure: error: You should check to see if MPI is setup properly.

This does not happen when manually building libcircle. Does the build system properly detect the MPI that spack passes, or does it rely on hard coded paths?

@adammoody
Copy link
Member

@gonsie , mind chasing this one down? I wanted to cut a new v0.2.2 release of libcircle within the next few weeks. It'd be nice to have spack working for that release.

@adammoody
Copy link
Member

@gonsie , this was the other issue. Does this error message ring any bells?

@gonsie
Copy link
Author

gonsie commented Jan 7, 2020

This one still happens on the BGQ, but I can build libcircle by hand myself

@adammoody
Copy link
Member

Does spack build libcircle for you on TOSS and/or CORAL?

@adammoody
Copy link
Member

BGQ uses MPICH, so this may be related to JulianKunkel@612ae55

@gonsie
Copy link
Author

gonsie commented Jan 8, 2020

Issue still exists for Spack.

Checking whether /usr/local/bin/mpicc responds to '-showme:compile'... no
Checking whether /usr/local/bin/mpicc responds to '-showme'... no
Checking whether /usr/local/bin/mpicc responds to '-compile-info'... yes
configure: error: You should check to see if MPI is setup properly.

But I can build it by hand.

@adammoody
Copy link
Member

Debugging shows the Spack environment is mixing flags for the XL and gcc compilers, which causes the above problem. I also found this page:

https://spack.readthedocs.io/en/latest/packaging_guide.html#mpi-support-in-spack

That actually links to the m4 logic we're using to detect MPI as a recommended method, so I think our autotools code is likely alright. That same page suggests we might be able to improve our Spack package file by setting compiler variables using the spec.

Spack provides an idiomatic way to use MPI compilers
in your package. To use MPI wrappers to compile your
whole build, do this in your install() method:

env['CC'] = spec['mpi'].mpicc
env['CXX'] = spec['mpi'].mpicxx
env['F77'] = spec['mpi'].mpif77
env['FC'] = spec['mpi'].mpifc

So this is probably something to fix on our Spack side of things and not something we need to change in our distribution.

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

No branches or pull requests

2 participants