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

Clang/amd compiler flags showing up in export_albany.in causing issues building MALI on frontier #1108

Open
mcarlson801 opened this issue Mar 13, 2025 · 3 comments

Comments

@mcarlson801
Copy link
Collaborator

I'm trying to add MALI to the nightly builds on Frontier and I'm running into an issue when trying to build. Make is failing to compile a PIO test program due to Clang/AMD compiler flags sneaking into export_albany.in link flags and then not being recognized by the fortran compiler. The offending compiler flags are --hip-link and --offload-arch=gfx90a.

I'm not very familiar with cmake, @bartgol or anyone, do you know why these flags would be getting added to the link line? It looks like maybe I can filter flags starting with -- out here but I'm not sure if that won't break something else.

@bartgol
Copy link
Collaborator

bartgol commented Mar 13, 2025

Ugh, I wish MALI used CMake rather than rely on the hacky export_albany.in file... We ran into similar issues when running with ninja as well as when trying other funky compilers (which added unrecognized flags).

You need to look at cmake/CreateExportAlbany. In the run function, we grab the content of link.txt for a dummy target that links against albany, and we extract all the flags to be written in export_albany.in. You can add some print statements in there, to see what's happening.

@bartgol
Copy link
Collaborator

bartgol commented Mar 13, 2025

Ah, wait, this is different. The export_albany.in file is correct, but when PIO uses it to link, it sees flags it doesn't recognize... This is hard. We basically need to change MALI, so that it does NOT use export_albany.in when testing PIO... After all, it should not need albany/trilinos to test pio, no?

@mcarlson801
Copy link
Collaborator Author

Does MALI only use the fortran compiler (with export_albany.in libs) to build the PIO test program? If so, yeah, that's probably the solution to not use the albany/trilinos libs there.

At any rate, I put a step in the frontier MALI build script to filter the flags out so we have a build going at least.

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