JuliaMath/IntelVectorMath.jl

Setting mode during precompilation time doesn't make sense

Closed this issue · 4 comments

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.

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.

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

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

This is part of #39 now.