Skip to content
Prev 14787 / 15075 Next

Problems with R-4.4.2 in MacOS Sequoia with Intel chip

Dear Peter

Many thanks for your help. I ran R in a terminal, something I admit I had not done before.

It crashed and produced the following message:

===
OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib 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 results. 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. For more information, please see http://www.intel.com/software/products/support/.
===

I am using Rcpp Armadillo, and I am following its guidelines for C++ compilation. The ?Makevars? file is produced by running
which produces the following Makevars file:

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

I removed the Makevars file, compiled my package from scratch but the error continues. Any help on how to solve this problem would be most appreciated. 

Best regards
Gilberto

============================
Prof Dr Gilberto Camara
Senior Researcher
Getulio Vargas Foundation (FGV)
National Institute for Space Research (INPE), Brazil
https://gilbertocamara.org/
=============================