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

Improve cmake's FindMKL to avoid runtime issues and preloading libraries #1427

Merged
merged 2 commits into from
Apr 10, 2023

Conversation

gbarter
Copy link
Contributor

@gbarter gbarter commented Feb 1, 2023

Feature or improvement description
This was a fix that we identified in WEIS projects running on Eagle a long time ago but of course forgot to submit a PR until we overwrote the fix with more recent OpenFAST versions.

When running on Eagle linux machines with the Intel compiler suite, we encounter an error that is well captured in various forums (here, here, here).

The suggested fix is to link to the mkl_rt library first or to preload the libraries in an environment variable using hard paths. The first approach is much more appealing and I can confirm that this has resolved our issues on Eagle using WEIS.

Related issue, if one exists
Not that I know

Impacted areas of the software
Regression tests run with intel compilers

Additional supporting information
Let me know if I can augment the description.

Test results, if applicable

I think this will be easier to do using the Github Actions workflow via this PR.

@gbarter gbarter changed the title Improve cmake's FinkMKL to avoid runtime issues and preloading libraries Improve cmake's FindMKL to avoid runtime issues and preloading libraries Feb 1, 2023
@andrew-platt andrew-platt requested a review from rafmudaf February 1, 2023 22:21
@andrew-platt andrew-platt added this to the v4.0.0 milestone Feb 1, 2023
@andrew-platt andrew-platt modified the milestones: v4.0.0, v3.5.0 Apr 10, 2023
@andrew-platt andrew-platt requested review from deslaughter and removed request for rafmudaf April 10, 2023 20:09
@andrew-platt andrew-platt removed the request for review from deslaughter April 10, 2023 20:41
@andrew-platt andrew-platt merged commit 68e5dc1 into OpenFAST:dev Apr 10, 2023
@rafmudaf
Copy link
Collaborator

@andrew-platt do you know how this might affect CMake with Intel for Windows? In that case, is there a runtime library?
It's the AND MKL_RT_LIB of if (MKL_IFACE_LIB AND MKL_SEQ_LIB AND MKL_CORE_LIB AND MKL_RT_LIB) that I'm looking at.

@andrew-platt
Copy link
Collaborator

@rafmudaf this worked ok with a CMake + OneAPI + VS just now. I started to wonder as well, so I tested it.

cmake .. -G "Visual Studio 16 2019"

@rafmudaf
Copy link
Collaborator

Thanks for checking @andrew-platt

@andrew-platt andrew-platt mentioned this pull request May 12, 2023
19 tasks
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.

3 participants