mtimesx issue , Execution time
Show older comments
Hi,
I am trying run below code with mtimesx as below
tic
mtimesx('SPEEDOMP','OMP_SET_NUM_THREADS(4)');
C=mtimesx(A,B);
mtimesx
to
c
where, A= 1x3x79x 50000 complex 4D matrix, B=3x2x79 complex matrix, C= 1x2x79x50000 4D complex matrix.
I find that mtimesx is using SPEED mode instead of SPEEDOMP mode and execution time is about 0.3-0.4 ms .
I would like to know :
- Why SPEEDOMP mode is not used.
- Can the execution time be improved by SPEEDOMP mode.
- Is there any other arlternative to improve the execution time.
I am using following setup
Matlab '9.6.0.1072779 (R2019a)'
Windows 7, 64 bit.
memory 8 GB,
Intel i7-4800MQ , 4Core, 8 Theread
Looking forward .
2 Comments
Jayant chouragade
on 29 Sep 2020
James Tursa
on 29 Sep 2020
Edited: James Tursa
on 29 Sep 2020
MTIMESX has not been updated in many years. In particular, it has not been updated for the R2018a+ interleaved complex memory model, and it has not been updated for various compilers OpenMP flags.
Getting it to compile with the OpenMP flags is probably just a matter of writing a short script. But even if this were done, the code would not operate as intended for the R2018a+ interleaved complex memory model. Instead, it would use copy-in and copy-out methods for complex variables, which would totally defeat the purpose. Simply compiling with the -R2018a option will not work.
Given that R2020b has a new PAGEMTIMES function that duplicates the functionality of MTIMESX, I doubt I will ever spend the time to update MTIMESX just to support versions R2018a-R2020a. It would take a lot of effort to get the interleaved complex functionality working just for these versions.
Answers (0)
Categories
Find more on Numeric Types in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!