# Matrix multiplication not returning on certain matrix content (Intel)

5 views (last 30 days)
Philipp on 10 Apr 2024
Edited: Bruno Luong on 11 Apr 2024
Hi,
I have a certain matrix multiplication which is not returning on my Intel machine (Win11 Pro, Intel i7-8700). When I exchange the content of the matrices with random numbers I can obtain a result within seconds. I could reproduce this problem on several Intel machines (and different Matlab versions). I relate this problem to Intel MKL. One matrix contains a lot of entries close to zero (10^-322) which probably causes the problem.
and run the command:
scc=At*scc;
Is this operation running through on your machine?
John D'Errico on 10 Apr 2024
It is generally a bad idea to force someone to download a file from off-site. We don't know if you are planting a trojan on our system. Honestly, I won't touch it to test your question as a download. Maybe others will be more willing to take a chance on an unknown person, posting a link to an unkown file. I hope they don't take the risk since you could have made this much simpler.
Just attach a .mat file that contains the matrices. Click on the paper clip icon on a comment.
Philipp on 10 Apr 2024
It's about 4 GB and I don't know if I can reproduce it on any other size and I have no intent to invest any more time into this. The provided link directs to a German university (over https) with a download service for larger files. The university scans the files internally for viruses. It's the best I can do.

Bruno Luong on 10 Apr 2024
Edited: Bruno Luong on 10 Apr 2024
The matrix contains many non normalized floating point numbers and operations on these numbers are very slow;
>> size(At)
ans =
17534 17532
>> size(scc)
ans =
17532 8281
>> tic; B=At*scc(:,1); toc
Elapsed time is 1.105924 seconds.
>> tic; B=At*scc(:,1:10); toc
Elapsed time is 10.237435 seconds.
>> tic; B=At*scc(:,1:100); toc
Elapsed time is 108.484422 seconds.
On my machine it takes 1 sec by column of scc. So eventually I guess it will finish in less than 3h.
Note that for normalized numbers the operation is roughly 200 time faster.
So for now I think there is no bug. Just let the thing run over night (Sorry I won't do that).
Walter Roberson on 11 Apr 2024
Hmmm... I wonder if the hardware could convert the numbers to 80 bit floats, do the operation, and convert back?
Bruno Luong on 11 Apr 2024
Edited: Bruno Luong on 11 Apr 2024
Certainly a very nice idea. But one of the reasons: As the exponet has only 4 more bits, its is still not enough to convert all denormalized 64 bits numbers to normalized 80 bits. It needs +6 bits exponent since 2^6 >= 52 > 2^5 > 2^4

### Categories

Find more on Startup and Shutdown in Help Center and File Exchange

R2024a

### Community Treasure Hunt

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

Start Hunting!