Skip to content

Conversation

jsharpe
Copy link

@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.

if ARGS.fortran_compiler:
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
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