-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenMP for parallelisation with the Apple M1 chip #38
Comments
For further context, the multithreading should be seen when running > library(myTAI)
> data("PhyloExpressionSetExample")
> myTAI::PlotSignatureTransformed(PhyloExpressionSetExample)
Proceeding with the FlatLineTest
Generating PlotSignature() for transformation: none
Plot signature: ' TAI ' and test statistic: ' FlatLineTest ' running 1000 permutations.
[ Number of Eigen threads that are employed on your machine: 1 ]
[ Computing age assignment permutations for test statistic ... ]
[=========================================] 100%
[ Computing variances of permuted transcriptome signatures ... ]
[ Number of Eigen threads that are employed on your machine: 1 ]
[ Computing age assignment permutations for test statistic ... ]
[=========================================] 100%
[ Computing variances of permuted transcriptome signatures ... ]
Total runtime of your permutation test: 3.97 seconds.
-> We recommended using at least 20000 permutations to achieve a sufficient permutation test.
etc.
Anyway, wishing you all a nice Friday afternoon! |
Dear @LotharukpongJS Thank you very much for making me aware of this! @lavakin and I will look into this in detail. With very bets wishes, |
Dear All, Maybe some guidelines here could be useful: https://mac.r-project.org/openmp/ ? Many thanks, |
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: