nakatamaho / mplapack

The MPLAPACK: multiple precision version of BLAS and LAPACK
Other
79 stars 10 forks source link

MPLAPACK constitutes a multi-precision linear algebra package, predicated upon the foundational structures of BLAS and LAPACK.

This particular package has undergone a comprehensive conversion into the C++ programming language, further accommodating an array of high-precision libraries, inclusive of GMP, MPFR, and QD. Such a versatile feature enables users to selectively opt for the library most congruous with their specific requirements. MPLAPACK represents a freely accessible software, disseminated under a 2-clause BSD-style license, supplemental to the original license ascribed by LAPACK.

News

Capabilities

Supported multiple precision libraries and floating point formats

We use MPFR + MPC as the primary arithmetic class.

Supported platforms

MPLAPACK test results

MPLAPACK benchmark results

Manual

Movies

Slides

Setting up docker environment for CUDA

The following link provides a comprehensive guide for installation: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#install-guide

Building on Linux and Windows via Docker (Recommended)

The construction process necessitated a duration of approximately 3.5 hours, utilizing an Apple Mac mini (2018) equipped with a Core i5-8500B processor, comprising 6 cores operating at a frequency of 3 GHz. The instructions are designed for the Ubuntu 22.04 operating system. Please execute the following commands:

Ubuntu 22.04

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:ubuntu2204 -f Dockerfile_ubuntu22.04 . 2>&1 | tee log.ubuntu2204

Ubuntu 20.04

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:ubuntu2004 -f Dockerfile_ubuntu20.04 . 2>&1 | tee log.ubuntu2004

Ubuntu 20.04 + Intel oneAPI

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:ubuntu2004intel -f Dockerfile_ubuntu20.04_inteloneapi . 2>&1 | tee log.ubuntu2004.intel

Windows 64bit (using cross compiler on Ubuntu)

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:mingw -f  Dockerfile_ubuntu20.04_mingw64 . 2>&1 | tee log.mingw

CentOS 7 (amd64)

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:centos7 -f Dockerfile_CentOS7_amd64 . 2>&1 | tee log.CentOS7

CentOS 7 (aarch64)

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:centos7 -f Dockerfile_CentOS7_AArch64 . 2>&1 | tee log.CentOS7

CentOS 8

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:centos8 -f Dockerfile_CentOS8 . 2>&1 | tee log.CentOS8

Ubuntu 18.04

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:ubuntu1804 -f Dockerfile_ubuntu18.04 . 2>&1 | tee log.ubuntu1804

How to build and install from source tarball

$ rm -rf $HOME/tmp $HOME/MPLAPACK
$ mkdir $HOME/tmp
$ cd $HOME/tmp
$ wget https://github.com/nakatamaho/mplapack/releases/download/v2.0.1/mplapack-2.0.1.tar.xz
$ tar xvfz mplapack-2.0.1.tar.xz
$ cd mplapack-2.0.1
$ CXX="g++" ; export CXX
$ CC="gcc" ; export CC
$ FC="gfortran"; export FC
$ ./configure --prefix=$HOME/MPLAPACK --enable-gmp=yes --enable-mpfr=yes --enable-_Float128=yes --enable-qd=yes --enable-dd=yes --enable-double=yes --enable-test=yes --enable-benchmark=yes #--enable-_Float64x=yes 
$ make -j4
$ make install

Note: Float64x is supported only on Intel CPUs, you can enable this by uncomment "#--enable-_Float64x=yes" -> "--enable-_Float64x=yes" as follows:

$ ./configure --prefix=$HOME/MPLAPACK --enable-_Float64x=yes --enable-gmp=yes --enable-mpfr=yes --enable-_Float128=yes --enable-qd=yes --enable-dd=yes --enable-double=yes --enable-test=yes

Docker build for developemnt (+ FABLE; Automatic Fortran to C++ converter)

https://github.com/cctbx/cctbx_project/tree/master/fable FABLE: Automatic Fortran to C++ conversion (https://doi.org/10.1186/1751-0473-7-5).

How to build

$ git clone https://github.com/nakatamaho/mplapack/
$ cd mplapack
$ /usr/bin/time docker build -t mplapack:fable -f Dockerfile_fable . 2>&1 | tee log.fable

How to convert a sample Fortran to C++

$ docker run -it mplapack:fable
$ cd ; fable.cout sample.f

MPLAPACK Release process

MPLAPACK 3.0.0 Release process

This is the release process for MPLAPACK 3.0.0 Action Date Status Description
optimized implementations should be the default
add template version mockup https://github.com/nakatamaho/mplapack-template
add gmpfrxx https://math.berkeley.edu/~wilken/code/gmpfrxx/
add openblas for benchmark of double
update to LAPACK 3.10.1
FMA for QD, DD
add more benchmarks, Rsyev, Rgesvd etc
optimized implementations
add qa program of BLAS
Take benchmark on A100 (Rgemm, Rsyrk dd)
python integration?
octave integration?
Drop GMP version Since trigonometric functions req'ed
Impliment mixed precision version
cleanup pow (REAL, long int)
Get rid of compiler warnings
lp64 ilp64 llp64 ilp32 lp32 cleanup

MPLAPACK 4.0.0 Release process

This is the release process for MPLAPACK 3.0.0 Action Date Status Description

old schedules

History

Oldpage

http://mplapack.sourceforge.net/

Acknowledgment:

This work has been supported by: The Special Postdoctoral Researchers' Program of RIKEN (2008, 2009) Grant-in-Aid for Scientific Research (B) 21300017 from the Japan Society for the Promotion of Science (2009, 2010, 2011). Microsoft Research CORE6 (2010), and the Japan Society for the Promotion of Science (JSPS KAKENHI Grant no. 18H03206) and TIS inc.

Also the M.N would like to thank Dr. Imamura Toshiyuki. Dr. Nakasato Naohito, Dr. Fujisawa Katsuki, Dr. Kouya Tomonori, Dr. Takahashi Daisuke, Dr. Goto Kazushige, Dr. Himeno Ryutaro, Dr. Hishimuna Toshiaki, Dr. Katagiri Takahiro, Dr. Ogita Takeshi, Dr. Kashiwagi Masahide, Dr. Yuasa Fukuko, Dr. Ishikawa Tadashi, Dr. Geshi Masaaki and Mr. Minato Yuichiro for warm encouragement.

Citation

@misc{2109.13406v2,
Author = {Maho Nakata},
Title = {MPLAPACK version 2.0.1 user manual},
Year = {2022},
Eprint = {arXiv:2109.13406v2},
}

contact

NAKATA Maho maho.nakata@gmail.com maho@riken.jp