This library is a C implementation of the Integrated Singular Value Decomposition (iSVD), which is an parallel algorithm for computing low-rank approximate singular value decomposition of large size matrices.
Please use the following commands to create Makefiles
cd <isvd-source-folder>
mkdir build
cd build
cmake ..
Use the following command to set options
ccmake ..
The following table are the main options
Option | Detail | Note |
---|---|---|
ISVD_BLAS |
the selection BLAS/LAPACK library. | Options: BLAS/MKL |
ISVD_BUILD_DEMO |
build demo codes. | |
ISVD_BUILD_DOC |
build documentation. | |
ISVD_BUILD_LIB |
build libraries. | |
ISVD_BUILD_TEST |
build unit tests. | |
ISVD_INDEX_TYPE |
the selection index type. | Options: 32/64 |
ISVD_OMP |
the selection OpenMP library. | Options: OFF/GOMP/IOMP |
ISVD_USE_GPU |
enable GPU support. | |
ISVD_TEST_VERBOSE |
enable verbose unit tests. | |
GTEST_ROOT |
the root path of Google Test. | Require ISVD_BUILD_TEST |
INTEL_ROOT |
the root path of Intel libraries. | Require ISVD_BLAS = MKL |
MKL_ROOT |
the root path of Intel MKL. | Require ISVD_BLAS = MKL |
MPI_PROCS |
the number of MPI processes. | Only used in demo codes. |
OMP_THRDS |
the number of OpenMP threads. | Only used in demo/check codes. |
The following table are the main Makefile rules
Command | Detail | Options |
---|---|---|
make all |
build all libraries | |
make install |
install package | |
make check |
build and run unit tests | Require ISVD_BUILD_TEST |
make doc |
build documentation | Require ISVD_BUILD_DOC |
make help |
display make-rules |
ISVD_BUILD_TEST
using ccmake. (Also recommended to unset ISVD_TEST_VERBOSE
if GPU is enabled).ISVD_USE_ILP64
before include isvd.h
to use 64-bit integer._64
.build/include
build/lib
Please link exactly one library for all categories.
gcc test.c -I<include-path> -L<library-path> -Wl,-rpath <library-path> -lisvd_core -lisvd_la_mkl_iomp -lisvd_gpu_magma
gcc test.c -I<include-path> -L<library-path> -Wl,-rpath <library-path> -lisvd_core -lisvd_la_blas -lisvd_gpu_none
gcc test.c -I<include-path> -L<library-path> -Wl,-rpath <library-path> -lisvd_core
gcc test.c -I<include-path> -L<library-path> -Wl,-rpath <library-path> -lisvd_core -lisvd_la_blas -lisvd_gpu_magma -lisvd_gpu_none
Name | Category | Detail | Options |
---|---|---|---|
isvd_core |
Core | Core routines | |
isvd_la_blas |
Linear Algebra | Sequential Plain BLAS | ISVD_BLAS=BLAS , ISVD_OMP=NO |
isvd_la_mkl |
Linear Algebra | Sequential Intel MKL | ISVD_BLAS=MKL , ISVD_OMP=NO |
isvd_la_mkl_gomp |
Linear Algebra | Parallel Intel MKL using GNU OpenMP | ISVD_BLAS=MKL , ISVD_OMP=GOMP |
isvd_la_mkl_iomp |
Linear Algebra | Parallel Intel MKL using Intel OpenMP | ISVD_BLAS=MKL , ISVD_OMP=IOMP |
isvd_gpu_none |
GPU | No GPU | ISVD_USE_GPU=NO |
isvd_gpu_magma |
GPU | MAGMA GPU | ISVD_USE_GPU=YES |
ccmake ..
or ccmake <path-to-source>
in the build
folder.<Enter>
on the option you want to change, change it, and press <Enter>
again.<c>
to configure, and press <g>
to generate Makefiles if configured successfully.<q>
.mklvars.sh
in the bin
folder of your Intel MKL to set the environment variables.GTEST_ROOT
to a folder containing include
and lib
of Google Test.ISVD_OMP
with ccmake
before building libraries.ISVD_USE_ILP64
with ccmake
before building libraries; or-DISVD_USE_ILP64
to compile flag.cmake .
to and recompile again.tmp
folder will be deleted after make clean
.