ScaLAPACK

Friday, April 06, 2007

3:02 PM

 

The ScaLAPACK package is located here.  Instructions for building ScaLAPACK follow.  In this build I am using BLACS and ATLAS or BLAS (there is one line of difference if using either of these packages).  When building ScaLAPACK in this way, it is important that both BLACS and ATLAS or BLAS have been built with the same Fortran compilers.

 

1.       Build MVAPICH or MVAPICH2.  ScaLAPACK requires mpicc/mpif77 and the MPI library.  In this case, it should be the same MPI package used to build BLACS.

2.       Build ScaLAPACK:

a.       Untar the source:

mkdir scalapack

cd scalapack

tar vxzf ~rowland/work/benchmarks/scalapack/scalapack.tgz

cd <scalapack-version directory>

b.      Edit the SLmake file and set the following variables.  They appear in the order given:

home = <path to the current directory>

 

BLACSdir = <path to BLACS build library directory>

 

SMPLIB  =      [so shared libraries will work, this is never needed anyway]

 

BLACSFINIT = $(BLACSdir)/<blacsF77init_*.a library file>

 

BLACSCINIT = $(BLACSdir)/<blacsCinit_*.a library file>

 

BLACSLIB = $(BLACSdir)/<blacs_*.a library file>

 

F77 = <path to MVAPICH/MVAPICH2 install>/bin/mpif77

 

CC = <path to MVAPICH/MVAPICH2 install>/bin/mpicc

 

CDEFS = -DAdd_ -DNO_IEEE $(USEMPI)           [for gfortran or ifort]

CDEFS = -Df77IsF2C -DNO_IEEE $(USEMPI)     [for g77]

[the first CFLAG is the same as INTFACE in BLACS]

 

BLASLIB = <path to ATLAS libf77blas.a library file> <path to ATLAS libatlas.a library file>     [for ATLAS]

BLASLIB = <path to blas_*.a library file>     [for BLAS]

c.       Build ScaLAPACK.  The following shell script can be created and run from the top-level directory:

#!/bin/bash

 

make clean

make

make exe

3.       Run the tests.  The tests are in the TESTING directory.

a.       By default, you must use at least 4 processes.

b.      Make sure to set the following environment variable if using gfortran:

export GFORTRAN_UNBUFFERED_ALL=y     [for MVAPICH2]

mpirun_rsh -np 4 host1 host2 host3 host4 GFORTRAN_UNBUFFERED_ALL=y ./test     [for MVAPICH]