Skip to content

MKL fix for mac#10

Merged
ajaypanyala merged 4 commits into
wavefunction91:mainfrom
ajaypanyala:main
Apr 28, 2023
Merged

MKL fix for mac#10
ajaypanyala merged 4 commits into
wavefunction91:mainfrom
ajaypanyala:main

Conversation

@ajaypanyala
Copy link
Copy Markdown
Collaborator

macOS linker does not support --{start,end}-group
The IntelMKL link line advisor also does not suggest these options when macOS is selected.

@ajaypanyala
Copy link
Copy Markdown
Collaborator Author

ajaypanyala commented Apr 28, 2023

@wavefunction91 This PR is tested on an Intel MAC. MKL is obviously not supported on the new M1,M2 (Arm) macs. Should we just throw an error if a MAC is detected preventing MKL discovery completely or allow discovery for intel based macs (maybe by checking the processor) ?

@wavefunction91
Copy link
Copy Markdown
Owner

By MacOS linker, do you mean AppleClang? Or is this some strange Mac specific thing that infects all compilers? We can definitely do a processor or OS check if it's the latter, compiler check if the former.

@ajaypanyala
Copy link
Copy Markdown
Collaborator Author

ajaypanyala commented Apr 28, 2023

Since GNU ld is not supported on macOS, the default linker on macOS is used regardless of the compiler (am using brew installed gcc-12 in this case for testing). Added a check to detect arm64 and report error.

@wavefunction91
Copy link
Copy Markdown
Owner

Adding a FATAL_ERROR on arm64 would bring down the whole application - I'd just have it "try" to search for MKL, fail, and move on with its day. We could add an early exit condition if we're really concerned about MKL existing on ARM environments, but a failed check isn't a large overhead

@ajaypanyala
Copy link
Copy Markdown
Collaborator Author

Changed it to a warning.

@ajaypanyala ajaypanyala merged commit 97d9d96 into wavefunction91:main Apr 28, 2023
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

Successfully merging this pull request may close these issues.

2 participants