You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The same speed-up achieved via parallelisation with the Intel chip for Mac doesn't work with the M1 chip. The difference in chip affects the README.md and the src/Makevars :
In an attempt so solve it, I installed the libraries via brew (arch -arm64 brew reinstall libomp) and changed the locations in the src/Makevars to correspond to the messages in the brew installation:
For compilers to find libomp you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
Thus for src/Makevars:
# Disable long types from C99 or CPP11 extensionsPKG_CPPFLAGS=-I../src-DRCPP_DEFAULT_INCLUDE_CALL=false-DCOMPILING_MYTAI-DBOOST_NO_INT64_T-DBOOST_NO_INTEGRAL_INT64_T-DBOOST_NO_LONG_LONG-DRCPP_USING_UTF8_ERROR_STRING-DRCPP_USE_UNWIND_PROTECT${MYTAI_COMPILER_FLAGS}
OPENMP_SUPPORTED:=$(shell$(CC) -fopenmp-dM-E-</dev/null2>&1|grep-c"openmp")
LIBOMP_SUPPORTED:=$(shell [ -d/opt/homebrew/opt/libomp/include ] &&echo1)
ifeq ($(OPENMP_SUPPORTED),1)
ifeq ($(LIBOMP_SUPPORTED),1)
PKG_CPPFLAGS+=-I/opt/homebrew/opt/libomp/includeLDFLAGS=-L/opt/homebrew/opt/libomp/libPKG_CXXFLAGS+=-Xpreprocessor-fopenmpPKG_LIBS+=-lompendifendif
I also added the symlink as suggested in the README.md, with modifications I though were appropriate.
Number of Eigen threads that are employed on your machine: 1 should be Number of Eigen threads that are employed on your machine: 8 if it is working for my machine :)
Describe the bug
The same speed-up achieved via parallelisation with the Intel chip for Mac doesn't work with the M1 chip. The difference in chip affects the
README.md
and thesrc/Makevars
:myTAI/README.md
Lines 35 to 37 in 699b78f
myTAI/src/Makevars
Lines 1 to 13 in 699b78f
With the M1 chip,
/usr/local/opt/libomp/lib/libomp.dylib
,/usr/local/opt/libomp/include
and/usr/local/opt/libomp/lib
do not exist.Instead the homologous locations are probably:
/usr/local/opt/libomp/lib/libomp.dylib
->/opt/homebrew/opt/libomp/lib/libomp.dylib
/usr/local/opt/libomp/include
->/opt/homebrew/opt/libomp/include
/usr/local/opt/libomp/lib
->/opt/homebrew/opt/libomp/lib
In an attempt so solve it, I installed the libraries via brew (
arch -arm64 brew reinstall libomp
) and changed the locations in thesrc/Makevars
to correspond to the messages in the brew installation:Thus for
src/Makevars
:I also added the symlink as suggested in the
README.md
, with modifications I though were appropriate.I then ran
roxygen2::roxygenise()
, which gave me the error at the endIs there a way to resolve this?
Expected behaviour
The same speed-up achieved via parallelisation with the Intel chip for Mac works with the M1 chip
Session info:
The text was updated successfully, but these errors were encountered: