Skip navigation links

MATLAB 2021a Is Installed and Ready For Use

As many users may have noticed, the MATLAB/2021a module has been installed on HPCC and is ready for use. Users can check the release note for details of changes at this link. 

Among the changes and updates in the new version, there is one thing I would like to bring to the attention of Matlab users on HPCC: the performance improvements on some basic sparse matrix computation. I tested the examples provided by the release note on HPCC and would like to share the results here. 

For the testing, I used the same code and six cores included in the release note. I ran the code in a job to control the number of cores used on Intel16, Intel18, and AMD20 types of compute nodes. The execution time was measured in seconds by averaging five runs. The same code was run using version 2020b and 2021a for the comparison. I have included the code as well as the timing information in the following.

  1. Sparse matrix multiplication:
    function timingSparseMult
    rng default
    A = sprand(1e5,1e5,0.0002);
    B = sprand(1e5,1e5,0.0002);
    tic
    C = A*B;
    toc
    end

The approximate execution times in seconds are:

Intel16 Intel18 AMD20
2020b 2.16495 1.74583 1.79784
2021a 0.457479 0.410616 0.722299
  1. Solving linear systems:
    function timingSparseBackslashMultRHS
    rng default
    A = sprand(1e4,1e4,0.0003) + speye(1e4);
    B = sprand(1e4,100,0.002);
    dA = decomposition(A);
    tic
    x = dA\B;
    toc
    end

The approximate execution times in seconds are:

Intel16 Intel18 AMD20
2020b 1.42437 1.53113 1.6342
2021a 0.277106 0.27789 0.311213

From the timing data, both examples show that version 2021a is about five times faster than version 2020b. There are a few other matrix operations which have performance improvements in this latest version. These functions are used extensively in MATLAB-based software, so the performance improvement could have a large impact on such software. I would like to encourage our users to try this new version and let us know how it affects your work. 

Xiaoge Wang
Research Consultant
ICER