ARPACK is a well known collection of FORTRAN subroutines designed to compute a few eigenvalues and eigenvectors of large scale sparse matrices. The package is designed to compute a few eigenvalues and corresponding eigenvectors of a general n by n matrix A.
Due to the slowdown in development, ARPACK has been forked into ARPACK-NG as a form of collaborative effort by the various groups that rely on ARPACK.
In this article, let's examine the installation of ARPACK on Linux distributions.
How to install ARPACK in Linux?
Let's explain the separate installation steps for Debian-based (Ubuntu, Mint, Pardus etc.), Redhat-based (Rocky Linux, AlmaLinux, Centos etc.) and Arch based (Manjaro Linux,Arch Linux,Archman Linux etc) operating systems.
Install ARPACK on Debian Based OS
In this step, we will install the ARPACK package on Ubuntu 22.04. Let's start by updating the package list:
foc@ubuntu22:~$ sudo apt update -y
Next, let's install the installable ARPACK packages on Debian distributions:
foc@ubuntu22:~$ sudo apt install libarpack2 libparpack2 -y
These packages are named with the same name in all Debian based operating systems. If you want to install development packages, it will be sufficient to install the following packages:
libarpack2-devlibparpack2-dev
ARPACK files created after installation are as follows:
foc@ubuntu22:~$ sudo find / -iname *arpack* [sudo] password for foc: /usr/lib/x86_64-linux-gnu/libparpack.so.2.1.0 /usr/lib/x86_64-linux-gnu/libarpack.so.2 /usr/lib/x86_64-linux-gnu/libarpack.so.2.1.0 /usr/lib/x86_64-linux-gnu/libparpack.so.2 /usr/share/doc/libarpack2 /usr/share/doc/libparpack2
If you see these files, you have successfully completed the installation.
Install ARPACK on Redhat Based OS
In this step, we will describe the installation of ARPACK on the Rocky Linux operating system. First, let's update the Repo cache:
[foc@rocky9 ~]$ sudo dnf makecache
The ARPACK package is installed from the EPEL repository on these distributions. Install the EPEL repository:
[foc@rocky9 ~]$ sudo dnf install epel-release -y
There is ARPACK package in the epel repo, but it has a dependency on the libflexiblas64.so.3 library during installation:
[foc@rocky9 ~]$ sudo dnf --enablerepo=crb install flexiblas-devel -y
If you try to install ARPACK without installing this package, you will get the following error:
[foc@rocky9 ~]$ sudo dnf install arpack -y Extra Packages for Enterprise Linux 9 - x86_64 1.8 MB/s | 11 MB 00:06 Last metadata expiration check: 0:00:05 ago on Sun 06 Nov 2022 12:38:34 PM +03. Error: Problem: conflicting requests - nothing provides libflexiblas64.so.3()(64bit) needed by arpack-3.8.0-4.el9.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Then install the ARPACK package:
[foc@rocky9 ~]$ sudo dnf install arpack -y
ARPACK has been successfully installed on Rocky Linux. You can see the files related to ARPACK in the system:
[foc@rocky9 /]$ sudo find /usr/ -iname *arpack* /usr/lib64/libarpack.so.2 /usr/lib64/libarpack.so.2.1.0 /usr/lib64/libarpack64.so.2 /usr/lib64/libarpack64.so.2.1.0 /usr/share/licenses/arpack /usr/share/doc/arpack
Install ARPACK on Arch Based OS
In this step, we will describe the installation through the Manjaro Linux distribution. You can install in the same way on other Arch based systems.
First, update the Pacman database cache with the following command:
[foc@manjaro ~]$ sudo pacman -Syy [sudo] password for foc: :: Synchronizing package databases... core 165.4 KiB 220 KiB/s 00:01 [##############################] 100% extra 1861.7 KiB 2.40 MiB/s 00:01 [##############################] 100% community 7.5 MiB 2.29 MiB/s 00:03 [##############################] 100% multilib 173.3 KiB 927 KiB/s 00:00 [##############################] 100%
Then install the ARPACK package:
[foc@manjaro ~]$ sudo pacman -S arpack
Installation is complete. The ARPACK files and directories on the system are as follows:
[foc@manjaro ~]$ sudo find /usr/ -iname *arpack* /usr/share/licenses/arpack /usr/include/arpack /usr/include/arpack/arpack.hpp /usr/include/arpack/arpackdef.h /usr/include/arpack/arpack.h /usr/include/arpack/parpack.h /usr/include/arpack/parpack.hpp /usr/lib/pkgconfig/parpack.pc /usr/lib/pkgconfig/arpack.pc /usr/lib/cmake/arpack-ng /usr/lib/cmake/arpack-ng/arpack-ng-config-version.cmake /usr/lib/cmake/arpack-ng/arpack-ng-config.cmake /usr/lib/libarpack.so.2 /usr/lib/libparpack.so.2 /usr/lib/libparpack.so /usr/lib/libarpack.so /usr/lib/libparpack.so.2.1.0 /usr/lib/libarpack.so.2.1.0
Summary
In this article, we explained ARPACK installation over 3 different distributions. Although the Linux distributions installed vary, the way of installation is actually very similar.
For more information, you can visit ARPACK-NG github page.
It should be noted that the installation environment does not change after installation. Package dependencies and frequent library changes can affect the system you will be working on. Try to keep it stable rather than up to date.
References
Installation of ARPACK
askubuntu.com - How to install and use ARPACK++ on Ubuntu 20.04 LTS?