This page describes how to install pre-build monolish onto Ubuntu 22.04 LTS. Following commands assumes wget
command exists. It can be installed by
$ sudo apt update -y
$ sudo apt install -y wget
For CPU
monolish deb file can be downloaded from GitHub Release page:
$ wget https://github.com/ricosjp/monolish/releases/download/0.16.3/monolish_common_0.16.3.deb
$ wget https://github.com/ricosjp/monolish/releases/download/0.16.3/monolish_0.16.3+oss_amd64.deb
$ sudo apt install -y ./monolish_common_0.16.3.deb ./monolish_0.16.3+oss_amd64.deb
There are two variants according to backend BLAS and LAPACK implementation:
- +oss means it uses OpenBLAS
- +mkl means it uses Intel MKL
For NVIDIA GPU
First, you need to nable CUDA 11.7 repository to enable cuBLAS, cuSPARSE, cuSOLVER using following steps:
$ sudo apt install -y gnupg software-properties-common
$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
$ sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
$ sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
$ sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
$ sudo apt install -y cuda-11-7
Then, install monolish by following steps:
$ wget https://github.com/ricosjp/monolish/releases/download/0.16.3/monolish_common_0.16.3.deb
$ wget https://github.com/ricosjp/monolish/releases/download/0.16.3/monolish_0.16.3+oss-nvidia_amd64.deb
$ sudo apt install -y ./monolish_common_0.16.3.deb ./monolish_0.16.3+oss-nvidia_amd64.deb
monolish for GPU has shared libraries for each generation of GPU. Following commands set the path to the shared library for generation of GPU #0.
$ export PATH=$PATH:/usr/local/cuda-11.7/bin/
$ /usr/share/monolish/link_monolish_gpu.sh