Compilation of parallel ARPACK


Jump to: navigation, search

ARPACK and parallel ARPACK can be downloaded from

Once the various packages and patches uncompressed, some modifications are necessary to make parallel ARPACK work on nic2 (using the pgi compiler):

  • Edit one example file for parallel compiling from folder ARMAKES (for example, ARmake.MPI-SUN4) and, after modifications, save it in the parent folder (ARPACK) with the name (this will overwrite an existing file). Modifications to be made:
    • home = $(HOME)/ARPACK (or wherever the folder ARPACK is located)
    • PLAT = I usually put nothing in here (it's just for the name of the libraries)
    • FC = mpif90 (We compile everything with the mpi pgi compiler, even the serial library)
    • PFC = mpif90 (parallel compiler)
    • MAKE = /usr/bin/make (location of make)
    • Also, we can modify the next two following entries to avoid unwanted underscores in the libraries names:
ARPACKLIB = $(home)/libarpack.a
PARPACKLIB = $(home)/libparpack.a

There are a series of mpif.h files in the ARPACK folder that must be erased before compiling:

find . -name mpif.h

  • Then, load pgi modules:
module load pgi
module load mpich-gb-pgi
  • To compile ARPACK we must first create the serial library, and then the parallel library:
make lib
make plib

Two libraries should have appeared in the ARPACK folder: libarpack.a and libparpack.a

Personal tools