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

Add setting of MPICC to vpip #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jsharpe
Copy link
Contributor

@jsharpe jsharpe commented Feb 18, 2021

Add an argument to vpip to allow passing in an mpi compiler to be set in the environment.
This is needed to compile mpi4py.

@@ -69,6 +69,8 @@ def get_unix_pip_env(venv, venv_source, execroot):
env["F77"] = env["F90"] = os.path.join(os.getcwd(), ARGS.fortran_compiler)
env["AR"] = os.path.join(os.getcwd(), ARGS.archiver)
env["CC"] = os.path.join(os.getcwd(), ARGS.compiler_executable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be reasonable to do the simpler thing of adding env["MPICC"] = env["CC"] here and not doing any of the other changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is that there might be build scripts that assume that the presence of the environment variable MPICC that it was a valid mpi compiler wrapper and hence try to enable mpi features even if the compiler doesn't work as an MPI compiler.

The reality is though that I am setting it to the same value as CC in _add_vpip_compiler_args and its working for us so I guess its good enough? If we come across any packages this causes an issue we can revisit this with a similar approach to the fortran feature (we're already doing this to select the mpi compiler wrapper for normal cc_* targets).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, my proposal and this change seem totally equivalent, which is why I asked.

@CLAassistant
Copy link

CLAassistant commented Apr 16, 2022

CLA assistant check
All committers have signed the CLA.

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.

3 participants