-
Notifications
You must be signed in to change notification settings - Fork 25
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
include mkl libraries for intel compiler on linux and macOS #72
Conversation
* also install intel mkl libraries in apt * trigger checks * trigger checks
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* info-on-mac * set mkl version explicitly * more debug on mac * fix variable typo for linux mkl version * only test on ubuntu * matrix * matrix * fix version selection * check both classic and new * verify dmg * check hpckit * check hpckit * restrict basekit versions * pass install_mkl and test mkl * set input in main action * set input in main action * set input in script * fix typo * change linker options * source env * export DYLD path for Mac * include explicit library path in linker * export mklroot in script * export mklroot to GH env * export mklroot to GH env * export mklroot in script * correct typo * another typo * debug env vars * debug env vars * debug env vars * debug env vars * debug env vars * debug env vars * debug env vars * debug env vars * typo and relative reference mklroot * debug mklroot path * debug mklroot path * typo * find include dir * find include dir * debug mac os dyld path * check all ubuntu * no mkl for gcc and nvidia-hpc * mkl lates * check compiler vars * mkl dir for macos * debug * debug * adapt test structure * remove double testing * conditional in bash * conditional in bash * conditional in bash * conditional in bash * typo * pass missing variable * test them all * test them all * check macos mkl path * set full library path in script * export DYLD in env * test them all * exclude mkl tests on windows * exclude mkl tests on windows * check for dyld * rename mkllib in gh env * shuffle version mapping for mac * export DYLD in script * shuffle mkl version numbers * find installed mkl version * try without mkl * try without mkl * find installed mkl version * find installed mkl version * shuffle mkl vs ifort version * find mkl for 2021.5 * skip mkl for 2021.5 macos and remove double export of dyld * less chatty, .5 exception * last changes? * test 2021.5 only * test them all * export dyld in action
* correct passsing of include_mkl in example * don't source intel set vars * run setvars, set MKLLIB
* feat: set FPM environment variables (fortran-lang#63) * set FPM_FC/FPM_CC/FPM_CXX matching FC/CC/CXX * consolidate env var assignment in setup script * feat: support intel 2024.0 on linux and windows (fortran-lang#64) * fix(mac/gcc): always create unversioned gcc/g++/gfortran links (fortran-lang#65) * brew doesn't link gcc/g++ without version number like it does for gfortran * this was causing default mac gcc/g++ to be discovered on PATH * fix readme auto-update PR conditionals in reporting mode * Update compatibility matrix (fortran-lang#66) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * ci: don't trigger when tags are pushed (fortran-lang#67) * correct typo * fix variable name * pass cpp_name * pass cpp_name --------- Co-authored-by: wpbonelli <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
thanks for this @iulusoy I think if we can also support windows, we might as well include mkl by default and not have a separate input? it might be tricky to find the oneAPI basekit links for older versions, it is unfortunate that mkl is not in the hpckit |
Unfortunately I have no experience with windows, I can try but it will have to be in three-four weeks. |
move macos mkl install into separate script move variable export to main calling function set lib env export in action source instead of execute set MKLLIB per case, skip 2021.5 macos mkl
16a5dc6
to
0e8b621
Compare
Incorporated the requested changes so far, could you please re-review @wpbonelli ? |
@@ -0,0 +1,13 @@ | |||
program hello |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to include math ops in the test program. If we include mkl by default, we can just roll this into the existing fortran test program/action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that would also require installing BLAS/LAPACK for the gnu compilers - for now I would leave it separate, and make the optional math library install the default version once there is something for all compilers/OS.
thanks @iulusoy. I might take a shot at Windows if I have a chance in the meantime |
Addressed the comments, imo the next steps would be (if math libraries are to be installed as default):
|
@iulusoy yes, we'd also want to look at nvidia and lfortran too. Agreed on keeping PRs small. I think a lot of people use |
Add math library support with the new keyword
install_mkl
.DYLD_LIBRARY_PATH
arbitrarily works on some runners and not on others, randomly fails for some version. If it is exported manually in the github action by setting it to$MKLLIB
, the linking of the libraries works though. I could not test this much as the only macs I have for testing are the GitHub runners.Initially I had wanted to only support linux. But then I tried to include
mkl
also for macOS - I consider this a starting point for future improvement. I am unfamiliar with windows, and the Fortran code I am working with has not been tested on Windows so far, so I did not include it.Ideally, one would also want to install
BLAS
andLAPACK
for the gnu compiler suite.mpi
support was also mentioned in #55