This article presents svds-C, an open-source and high-performance C program for accurately and robustly computing truncated SVD, e.g. computing several largest singular values and corresponding singular vectors. We have re-implemented the algorithm of svds in Matlab in C based on MKL or OpenBLAS and multi-thread computing to obtain the parallel program named svds-C. svds-C running on shared-memory computer consumes less time and memory than svds thanks to careful implementation of multi-thread parallelization and memory management. Numerical experiments on different test cases which are synthetically generated or directly from real world datasets show that, svds-C runs remarkably faster than svds with averagely 4.7X and at most 12X speedup for 16-thread parallel computing on a computer with Intel CPU, while preserving same accuracy and consuming about half memory space. Experimental results also demonstrate that svds-C has similar advantages over svds on the computer with AMD CPU, and outperforms other state-of-the-art algorithms for truncated SVD on computing time and robustness.
翻译:本文介绍了svds-C,一个用于精确且鲁棒地计算截断奇异值分解(例如计算若干最大奇异值及其对应奇异向量)的开源高性能C程序。我们基于MKL或OpenBLAS以及多线程计算,将Matlab中的svds算法用C语言重新实现,得到了名为svds-C的并行程序。得益于精心实现的多线程并行化和内存管理,在共享内存计算机上运行的svds-C比svds消耗更少的时间和内存。在不同测试案例(包括合成生成和直接来自真实世界数据集)上的数值实验表明,在配备Intel CPU的计算机上进行16线程并行计算时,svds-C的运行速度显著快于svds,平均加速比为4.7倍,最高可达12倍,同时保持相同的精度并消耗约一半的内存空间。实验结果还表明,在配备AMD CPU的计算机上,svds-C相对于svds具有类似优势,并且在计算时间和鲁棒性上优于其他最先进的截断奇异值分解算法。