Skip to content

Start using paths found in extra_rpaths in compilers.yaml when building#35376

Merged
tgamblin merged 3 commits intospack:developfrom
OSU-Nowlab:osu/mvapichrpaths
Mar 3, 2023
Merged

Start using paths found in extra_rpaths in compilers.yaml when building#35376
tgamblin merged 3 commits intospack:developfrom
OSU-Nowlab:osu/mvapichrpaths

Conversation

@MatthewLieber
Copy link
Copy Markdown
Contributor

When built MVAPICH will now use the paths found in extra rpaths within the compilers.yaml file

Copy link
Copy Markdown
Contributor

@natshineman natshineman left a comment

Choose a reason for hiding this comment

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

Confirming the maintainer change: Matt is now full time staff and will be working on all things Spack related, while Nick is transitioning to more of his research as a PhD student.

@harisubramoni
Copy link
Copy Markdown
Contributor

This can be merged. I am not sure why this is not still being automatically taken in.

args.append("--disable-registration-cache")

ld = ""
for path in itertools.chain(self.compiler.extra_rpaths, self.compiler.implicit_rpaths()):
Copy link
Copy Markdown
Member

@haampie haampie Feb 20, 2023

Choose a reason for hiding this comment

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

Why is this necessary? Spack's compiler wrapper adds those rpaths through the compiler wrapper. If not, then the compiler wrapper is not used, which is a problem.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We received a bug report from @nhanford that the rpath's were not correctly being added to MVAPICH's compiler wrappers. This was an attempt to resolve that. Perhaps Nate can weigh in if we went about this in a method different from what he was thinking?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@haampie We're seeing similar issues to #8670 and the proposed solution happens to resemble #8687. Perhaps there is a better way to go about this?

Copy link
Copy Markdown
Member

@tgamblin tgamblin Mar 3, 2023

Choose a reason for hiding this comment

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

We run filter_compiler_wrappers on the installed mpicc, etc., because the Spack wrappers cannot be executed outside of Spack's build environment, so you want your mpicc to execute with the real compiler. If the real compiler needed extra RPATHs in Spack, it likely needs them outside Spack, so it makes a lot of sense (to me) that we'd make the wrappers add these paths.

Spack-installed MPIs are not expected to be run just by Spack -- you want them to work with module load, spack load, envs., etc. too.

Copy link
Copy Markdown
Member

@becker33 becker33 left a comment

Choose a reason for hiding this comment

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

I agree that we need these for the mvapich2 compiler wrappers to work properly when run from outside spack.

I've double checked on the compiler implicit rpaths and we already filter out system paths from that variable, so we won't be adding unreasonable rpaths to system locations.

@tgamblin tgamblin merged commit c0f48b3 into spack:develop Mar 3, 2023
jmcarcell pushed a commit to key4hep/spack that referenced this pull request Apr 13, 2023
…ng (spack#35376)

* Start using paths found in extra_rpaths in compilers.yaml when building

* running black and changing maintainer list

* changing import order to pass isort

---------

Co-authored-by: Matthew Lieber <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants