Open LotharukpongJS opened 11 months ago
For further context, the multithreading should be seen when running myTAI::PlotSignatureTransformed()
for example:
> 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.
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 :)
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, Hajk
Dear All,
Maybe some guidelines here could be useful: https://mac.r-project.org/openmp/ ?
Many thanks, Hajk
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
:https://github.com/drostlab/myTAI/blob/699b78f10a619cfd97e584cf2277f9d04e938544/README.md?plain=1#L35-L37
https://github.com/drostlab/myTAI/blob/699b78f10a619cfd97e584cf2277f9d04e938544/src/Makevars#L1-L13
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: