Software Category


From the ARPACK website:

The package is designed to compute a few eigenvalues and corresponding eigenvectors of a general n by n matrix A. It is most appropriate for large sparse or structured matrices A where structured means that a matrix-vector product w <- Av requires order n rather than the usual order n2 floating point operations. This software is based upon an algorithmic variant of the Arnoldi process called the Implicitly Restarted Arnoldi Method (IRAM). When the matrix A is symmetric it reduces to a variant of the Lanczos process called the Implicitly Restarted Lanczos Method (IRLM). These variants may be viewed as a synthesis of the Arnoldi/Lanczos process with the Implicitly Shifted QR technique that is suitable for large scale problems. For many standard problems, a matrix factorization is not required. Only the action of the matrix on a vector is needed.

Using ARPACK on HPC cluster

The parallel version of ARPACK was compiled for the GNU, Intel and PGI compilers for both openmpi and mvapich2.
The corresponding libraries are located in


For example, to use and built from gnu-openmpi Fortran compiler, add the following options to your command line:

 -L/opt/hpc/gnu/openmpi/lib64 -lparpack -larpack

Note that arpack is based upon the blas and lapack libraries, and parpack calls for arpack. Therefore, we have to link to both the lapack and blas packages and specify the path to these two packages according to the compiler you are using.

For the GNU compiler, add the options

 -L/usr/lib64 -lblas -llapack 

For the Intel compiler, we use the lapack and blas packages from the intel-mkl library. Add the options

-L/gpfs/research/software/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -lmkl_blas95_lp64 -lmkl_lapack95_lp64 

For the PGI compiler, add the options

-L/gpfs/research/software/pgi/linux86-64/14.3/lib -llapack -lblas


To run some simple examples provided by the ARPACK developers, first create two directories to hold the serial and parallel example files, respectively. Run the following commands:

# copy serial and parallel examples to your home directories
$ cd $HOME
$ mkdir arpack
$ cd arpack  
$ mkdir SERIAL
$ mkdir PARALLEL
$ cp -r /opt/rcc/share/doc/arpack-doc/EXAMPLES SERIAL
$ cp -r /opt/rcc/share/doc/arpack-doc/MPI PARALLEL

To compile and run a serial example program (e.g., sssimp.f, a serial f77 program) using the GNU compiler, run the commands:

$ gfortran sssimp.f -L/opt/rcc/gnu/lib64 -larpack -lblas -llapack  -o sssimp
$ ./sssimp

To compile and run a parallel example on the HPC cluster using Gnu compiler:

  $ cd $HOME/arpack/PARALLEL 
  $ module load gnu-openmpi
  $ mpif77 pssdrv1.f  -L/opt/rcc/gnu/openmpi/lib64 -larpack -lparpack -lblas -llapack  -o pssdrv1
  $ sbatch

If you use intel mvapich2

 $ module load intel mvapich2
 $ mpif77 pssdrv1.f  -L/opt/rcc/intel/mvapich2/lib64 -larpack -lparpack -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -L/gpfs/research/software/intel/mkl/lib/intel64  -o pssdrv1

Here is an example Slurm script

$ cat
#SBATCH --job-name="parpack_test"
#SBATCH -p backfill
#SBATCH --mail-type="ALL"
#SBATCH -t 00:05:00

module purge
module load gnu openmpi

mpirun -np 4 ./pssdrv1

You will see the following output upon a successful run:

_saupd: number of update iterations taken
  1 -    1:     5

_saupd: number of "converged" Ritz values
  1 -    1:     4

_saupd: final Ritz values
  1 -    4:   6.350E-01   3.985E-01   3.985E-01   1.620E-01

_saupd: corresponding error bounds
1 -    4:   1.381E-13   8.283E-12   1.017E-10   3.955E-21

 = Symmetric implicit Arnoldi update code =
 = Version Number: 2.1                    =
 = Version Date:   3/19/97               =
 = Summary of timing statistics           =

 Total number update iterations             =     5
 Total number of OP*x operations            =    81
 Total number of B*x operations             =     0
 Total number of reorthogonalization steps  =    81
 Total number of iterative refinement steps =     0
 Total number of restart steps              =     0
 Total time in user OP*x operation          =     0.001000
 Total time in user B*x operation           =     0.000000
 Total time in Arnoldi update routine       =     0.001999
 Total time in p_saup2 routine              =     0.001999
 Total time in basic Arnoldi iteration loop =     0.001999
 Total time in reorthogonalization phase    =     0.000000
 Total time in (re)start vector generation  =     0.000000
 Total time in trid eigenvalue subproblem   =     0.000000
 Total time in getting the shifts           =     0.000000
 Total time in applying the shifts          =     0.000000
 Total time in convergence testing          =     0.000000

 Ritz values and direct residuals
           Col   1       Col   2
Row   1:    1.62029E-01   1.44471E-06
Row   2:    3.98507E-01   1.35166E-06
Row   3:    3.98508E-01   1.75542E-06
Row   4:    6.34986E-01   1.71304E-06


 Size of the matrix is          100
The number of processors is            4
The number of Ritz values requested is            4
The number of Arnoldi vectors generated (NCV) is           20
What portion of the spectrum: SM
The number of converged Ritz values is            4
The number of Implicit Arnoldi update iterations taken is            5
The number of OP*x is           81
The convergence criterion is   5.96046448E-08

Using ARPACK on Spear nodes

The serial version of ARPACK was compiled for the Intel, GNU, and PGI compilers, respectively. To compile applications based on arpack, add the following options to your command line:

 -L/opt/rcc/intel/lib64 -larpack -lblas -llapack 

Below is an example of using these options with a file called myprog.f:

  $ ifort -o a.out   -L/opt/rcc/intel/lib64 -larpack -lblas -llapack  myprog.f

Serial example files provided by the ARPACK developers are located in the directory:


For detailed usage information, refer to the official users' guide on the ARPACK website.