Skip to content

Setting mode during precompilation time doesn't make sense #40

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

Closed
KristofferC opened this issue Feb 29, 2020 · 4 comments
Closed

Setting mode during precompilation time doesn't make sense #40

KristofferC opened this issue Feb 29, 2020 · 4 comments

Comments

@KristofferC
Copy link
Member

Calling __init__ here: https://github.com/JuliaMath/IntelVectorMath.jl/blob/master/src/setup.jl#L11

and then setting the mode here:
https://github.com/JuliaMath/IntelVectorMath.jl/blob/master/src/setup.jl#L32

doesn't look like it will work properly. The mode is a property of the MKL library and will not be kept when the package is reloaded. If it needs to be set when the package is started, it should be set in __init__ itself.

@KristofferC KristofferC changed the title Settig mode during compilation time doesn't make sense Setting mode during precompilation time doesn't make sense Feb 29, 2020
@Crown421
Copy link
Collaborator

The call to the init function is now no longer necessary with #39, as no Libdl.dlopen is necessary anymore/ covered by importing MKL_jll.
For reasons I don't remember I was necessary to call the dlopens also in the module definitions, quite possibly because of the mode setting you mentioned as well.

Regarding the other point I believe you are correct, it seems redundant. I am not even sure what the command is trying to accomplish, especially given that a more convenient function using integer input is defined just above it.

@KristofferC
Copy link
Member Author

Yeah, my point is mostly about the call to set the mode during compilation time. It doesn't do anything.

@Crown421
Copy link
Collaborator

I will remove it, and have quick look as to whether there might need to be call on __init__

@Crown421
Copy link
Collaborator

Crown421 commented Mar 2, 2020

This is part of #39 now.

@Crown421 Crown421 closed this as completed Mar 2, 2020
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