Monte Carlo Numerical Linear Algebra Package
- Mu Yang <[email protected]>
- @ref tutorial_main
- CMake 2.8+ (CMake 3+ recommended).
- C++ compiler with C++11 support (GCC 5+ recommended).
- BLAS & LAPACK library.
- OpenMP Library.
- MPI Library (MPICH or OpenMPI).
- Intel® Math Kernel Library (Recommended for better performance, used for BLAS & LAPACK).
- DOxygen (Used for documentation).
- Google Test Library (Used for code testing).
Please use the following commands to create Makefiles
mkdir build
cd build
cmake <path-to-source>
Use the following command to set options
ccmake <path-to-source>
-
Set 'MCNLA_BLAS' to select BLAS/LAPACK library. [BLAS/MKL]
-
Set 'MCNLA_BUILD_DEMO' to build demo codes.
-
Set 'MCNLA_BUILD_DOC' to build documentation.
-
Set 'MCNLA_BUILD_DRIVER' to build driver codes.
-
Set 'MCNLA_BUILD_REPORT' to build report codes.
-
Set 'MCNLA_BUILD_TEST' to build test codes.
-
Set 'MCNLA_INSTALL_DEMO' to install demos.
-
Set 'MCNLA_INT_SIZE' to select system integer size. [32/64]
-
Set 'MCNLA_OMP' to select OpenMP library. [OFF/GOMP/IOMP] (Require 'MCNLA_BLAS = MKL')
-
Set
MCNLA_USE_GPUto enable GPU support. -
Set 'GTEST_ROOT' for the root path of Google Test. (Require 'MCNLA_BUILD_TEST')
-
Set 'INTEL_ROOT' for the root path of Intel libraries. (Require 'MCNLA_BLAS = MKL')
-
Set 'MKL_ROOT' for the root path of Intel MKL. (Require 'MCNLA_BLAS = MKL')
-
Set 'MPI_PROCS' to set the number of MPI processes used in demo codes.
| Command | Detail |
|---|---|
make all |
build all binaries |
make install |
install package |
make run |
run demo code |
make check |
build and run test codes |
make doc |
build documentation |
make help |
display make-rules |
- Define
MCNLA_USE_ILP64to use 64-bit integer. - Define
MCNLA_USE_MKLto enable Intel MKL. - Define
MCNLA_USE_GPUto enable GPU support. - Define
MCNLA_DISABLE_LITERALto disable literal definition in global namespace.
- Use
ccmake ..orccmake <path-to-source>in thebuildfolder. - Press
<Enter>on the option you want to change, change it, and press<Enter>again. - After changing the options, press
<c>to configure, and press<g>to generate Makefiles if configured successfully. - To quit without saving, press
<q>.
- Source
mklvars.shin thebinfolder of your Intel MKL to set the environment variables.
- Set
GTEST_ROOTto a folder containingincludeandlibof Google Test.
- Set
MCNLA_USE_ILP64withccmake. - If you want to compile directly, add
-DMCNLA_USE_ILP64to compiler flag. - Make sure your LAPACK&BLAS / Intel MKL uses 64bit integer. Make sure you uses the correct library and flags of Intel MKL.
- Possible issues:
- Not enough memory. You might request a vector/matrix which size exceed your memory size.
- Index overflow. Use 64-bit integer instead of 32-bit integer. For example, if you request a
1e5x1e5matrix, there will be1e10elements, which is larger than the maximum number in 32-bit integer (about2.1e9). Using 64-bit integer may solve this problem.
@include LICENSE.md