Corrfunc icon indicating copy to clipboard operation
Corrfunc copied to clipboard

Add MKL for a faster DDtheta test run

Open manodeep opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. Running the tests DDtheta_mocks always take a long time because there are no vectorized acos functions available directly through gcc/clang.

Describe the solution you'd like A clear and concise description of what you want to happen. icc has an implementation through MKL/SVML, and would be good to i) either install MKL as a dependency (with an option to disable) or ii) check if MKL is already available.

Then during compile time, if MKL is available, we should just use the vectorised MKL trig routines - will speed up the DDtheta_mocks runs significantly.

Describe alternatives you've considered Compile directly with icc, if available.

The MKL linking code already exists in common.mk, so might not be too difficult to sort out

manodeep avatar Jun 10 '20 23:06 manodeep

Noting that the intel channel on conda has an mkl-devel package, that contains the relevant mkl.h header and the libraries. We could add an option to request MKL and expand out the inverse cosine into the MKL-defined functions + the existing fallback when neither icc nor MKL are available.

manodeep avatar Jun 11 '20 13:06 manodeep