david-cortes / isotree

(Python, R, C/C++) Isolation Forest and variations such as SCiForest and EIF, with some additions (outlier detection + similarity + NA imputation)
https://isotree.readthedocs.io
BSD 2-Clause "Simplified" License
186 stars 38 forks source link

Mac arm nthreads problem #39

Closed mizexin closed 2 years ago

mizexin commented 2 years ago

Im a new guy

In order to try to improve the efficiency I set the parameter nthreads=2, but received Warning message: In isolation.forest(test, ntrees = 100, nthreads = 2) : Attempting to use more than 1 thread, but package was compiled without OpenMP support. See https://mac.r-project.org/openmp/ I read the phase guide and found that it should be specifying some compilation flag for architecture maybe in Makevars. But I don't konw what should be add in this file. Help pls

david-cortes commented 2 years ago

The link that it gives has an example of what should be in Makevars mentioned right there where it says "How to enable OpenMP in packages". You can also search for more examples by trying something like "r mac openmp" in google, since the issue is not specific to this package.