Multiple copies of OpenMP runtime linked into the program

Hi everyone,

I have recently implemented the Intel MKL in R 4.2.1 to enable multi-thread processing (happy to explain how I did that, if necessary to provide a solution here).
One of the non-CRAN packages I am using is causing the following error in RStudio now. Surprisingly, however, this error does not occur when using the R terminal instead of RStudio.

*"OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. *
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect resuls. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results"

Does anyone have any suggestions what is going on here? Again, it all works fine in the terminal, but not when using RStudio. I understand that there are probably a couple of unknows I should provide to help solving this issue, so please let me know and apologize me not providing in the first place. Web search has not helped me with that issue at all, and I got no clue what to take from it.

Thanks!

I think you should report your issue to the package maintainer(s) for which this issue arises.

They are known to be quite unresponsive. However, given that it works in the R terminal, it likewise could be considered an RStudio issue, I assume.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.