To improve performance and reduce analysis times, flow5 uses Intel’s Math Kernel Library (Intel MKL) to perform operations on linear systems.
Intel MKL is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, sparse solvers, fast Fourier transforms, and vector math. The routines in MKL are hand-optimized specifically for Intel processors. The library supports Intel processors and is available for Windows, Linux and macOS operating systems.
The performance and efficiency of this library is impressive and has led to a dramatic reduction in analysis times compared to those of xflr5.
The analysis times in flow5 have been greatly reduced with the use of Intel's MKL library and with multithreading. This in turn allows the use of higher mesh sizes. The following chart shows the improvement when running on an Intel Core i5@2.50GHz.
The benefits are similar on a low-end aging macOS. The macMini 2014 platform was limited to 4Gb RAM, so that memory issues limited the benchmark to matrix sizes no greater than 10000.
The MKL librairies have been replaced by the macOS native vecLib framework starting with v7.03, with comparable performance.
flow5 runs smoothly on macOS mini M1 with the Rosetta 2 translator, with good performance.
The analysis times diminish with the processor's speed and number of threads as shown in the graph below.
It is to be noted that Intel's MKL library is specifically optimized for Intel processors, so that the benefit on an AMD processor is not quite as significant as could have been expected given the number of cores. The improvement is still significant nonetheless.
MKL has been reported to run slowly on Intel "Efficiency cores" with LU factorization times increasing by one or two orders of magnitude.
This problem is fixed by forcing MKL to run on "Performance cores". These pages explain how to proceed:
In practice, the environment vaiables which control thread usage need to be set before running flow5.
Alternatively the environment variable can be set at system level, or by creating a script.