-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add MKL lib dir to LD_LIBRARY_PATH in GH actions
Since Nutils doesn't search for MKL installation directories any longer, we need to tell GitHub actions where to find MKL manually. This patch adds a search script to the devtools and updates `LD_LIBRARY_PATH` before running the unittests.
- Loading branch information
1 parent
b8b7a6d
commit 8046e22
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from .. import log | ||
import sys, site, os | ||
|
||
libname = 'libmkl_rt.so' | ||
libsubdir = 'lib' | ||
prefixes = list(site.PREFIXES) | ||
if hasattr(site, 'getuserbase'): | ||
prefixes.append(site.getuserbase()) | ||
for prefix in prefixes: | ||
libdir = os.path.join(prefix, libsubdir) | ||
if not os.path.exists(os.path.join(libdir, libname)): | ||
continue | ||
log.set_output('libdir', libdir) | ||
break | ||
else: | ||
log.error('cannot find {} in any of the following dirs: {}'.format(libname, ' '.join(prefixes))) |