Matrix multiplication using multicore

조회 수: 16 (최근 30일)
ANUSAI R
ANUSAI R 2019년 11월 22일
댓글: ANUSAI R 2019년 11월 25일
how can i multiply a matrix of dimension (2^18*103) by its transpose using multiple cores of my local system ?
  댓글 수: 3
ANUSAI R
ANUSAI R 2019년 11월 22일
Thank you for replying.I am currently having a system with 128gbRAM with 18core and 36 threads.I can divide the matrix into 8 parts so that each part can be computed separately.still,it’s taking too much time as it uses only one core.So,I would like to know how to do parallel processing so that all 18cores can be activated simultaneously..Thankyou once again
Jan
Jan 2019년 11월 23일
A 128 GB machine is simply too weak to process a matrix multiplication, which produces a 549 GB output. The bottleneck is the disk access, if you use a huge amount of virtual RAM. The number of cores will not really matter, because the calculations in the CPU will take less time (even with a single thread) than writig the data to the disk.

댓글을 달려면 로그인하십시오.

답변 (1개)

James Tursa
James Tursa 2019년 11월 22일
편집: James Tursa 2019년 11월 22일
The matrix multiply operator * calls a highy optimized compiled BLAS library to do this calculation. The BLAS library is already multi-threaded and optimized for cache hits. In addition, I believe MATLAB checks for symmetric cases (both operands the same) and calls faster symmetric library routines for this ... at least it used to last time I looked several years ago. So I am not sure there is anything you can do that isn't already being done in the background. The only caveat is the symmetric case ... if MATLAB doesn't do this on your version then it may require a custom mex routine on your part to force this. My MTIMESX submission does this symmetry check, but alas I have not had the time yet to update it for later versions of MATLAB.
See also this link:
  댓글 수: 1
ANUSAI R
ANUSAI R 2019년 11월 25일
Thank you for your kind reply, I will try this and update.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by