PEXSI
Build PEXSI

## Edit make.inc

Configuration of PEXSI is controlled by a single make.inc file. Examples of the make.inc file are given under the config/ directory.

Find make.inc with the most similar architecture, and copy to the main PEXSI directory (using Edison for example, the latest Intel computer at NERSC, a CRAY X30 machine). ${PEXSI_DIR} stands for the main directory of PEXSI. cd${PEXSI_DIR}
cp config/make.inc.CRAY_XC30.intel make.inc


Edit the variables in make.inc.

PEXSI_DIR     = Main directory for PEXSI
DSUPERLU_DIR  = Main directory for SuperLU_DIST
PARMETIS_DIR  = Main directory for ParMETIS
PTSCOTCH_DIR  = Main directory for PT-Scotch


Edit the compiler options, for instance

CC           = cc
CXX          = CC
FC           = ftn

Note
• Starting from PEXSI v0.8.0, -std=c++11 is required in CXXFLAGS.
• For FORTRAN users, CPP_LIB=-lstdc++ -lmpi -lmpi_cxx is often needed. Check this if there is link error.
• PEXSI can be compiled using debug or release mode in by the variable COMPILE_MODE in make.inc. This variable mainly controls the compiling flag -DRELEASE. The debug mode introduces tracing of call stacks at all levels of functions, and may significantly slow down the code. For production runs, use release mode.
• The USE_PROFILE options is for internal test purpose. Usually set this to 0.

## Build the PEXSI library

If make.inc is configured correctly,

cd ${PEXSI_DIR} make all  Should build both the PEXSI library under the src directory and the examples under the examples directory. For more information on the examples, see Tutorial. For examples using FORTRAN interface, cd fortran/ make all  ## Tests After example files are compiled examples$ mpirun -n 1 ./driver_pselinv_complex_(suffix)


should return the diagonal of the matrix

$(A + i I)^{-1}$

saved on the 0-th processor, where $$A$$ is the five-point discretization of a Laplacian operator on a 2D domain. The result can be compared with examples/driver_pselinv_complex.out to check the correctness of the result.