symPACK is a sparse symmetric matrix direct linear solver. It can be built using the following procedure.
First, download symPACK as follows:
git clone email@example.com:symPACK/symPACK.git /path/to/sympack
SymPACK requires the UPC++ v1.0 library to be installed. The minimum supported release version is 2019.9.0. It can be downloaded at upcxx.lbl.gov. UPC++ contains a CMake config file which symPACK is using to link to the library. The install path needs to be provided to CMake as follows:
Several environment variables can be optionally set before configuring the build:
metis_PREFIX= Installation directory for MeTiS
parmetis_PREFIX= Installation directory for ParMETIS
scotch_PREFIX= Installation directory for SCOTCH
ptscotch_PREFIX= Installation directory for PT-SCOTCH
Then, create a build directory, enter that directory and type:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/sympack -DCMAKE_PREFIX_PATH=/path/to/upcxx/install ...OPTIONS... /path/to/sympack
...OPTIONS... can be one of the following:
-DENABLE_METIS=ON|OFFto make MeTiS ordering available in symPACK (
metis_PREFIXmust be set in the environment)
-DENABLE_PARMETIS=ON|OFFto make ParMETIS ordering available in symPACK (
parmetis_PREFIXmust be set in the environment,
metis_PREFIXis required as well)
-DENABLE_SCOTCH=ON|OFFto make SCOTCH ordering available in symPACK (
scotch_PREFIXmust be set in the environment)
-DENABLE_PTSCOTCH=ON|OFFto make PT-SCOTCH ordering available in symPACK (
ptscotch_PREFIXmust be set in the environment,
scotch_PREFIXis required as well)
Some platforms have preconfigured toolchain files which can be used by adding the following option to the
-DCMAKE_TOOLCHAIN_FILE=/path/to/sympack/toolchains/cori.cmake (To build on NERSC Cori for instance)
A sample toolchain file can be found in
/path/to/sympack/toolchains/build_config.cmake and customized for the target platform.
cmake command will configure the build process, which can now start by typing:
make make install
Additionally, standalone drivers for symPACK can be built by typing
SymPACK has several optional features. We have already mentioned the options related to sparse matrix ordering. The following list is the complete set of options available when building symPACK:
-DENABLE_METISto enable MeTiS ordering (
-DENABLE_PARMETISto enable ParMETIS ordering (
-DENABLE_SCOTCHto enable SCOTCH ordering (
-DENABLE_PTSCOTCHto enable PT-SCOTCH ordering (
-DAMD_IDX_64to use 64 bit integers for AMD ordering (
-DMMD_IDX_64to use 64 bit integers for MMD ordering (
-DRCM_IDX_64to use 64 bit integers for RCM ordering (
-DENABLE_MKLto enable Intel MKL through the
-DENABLE_THREADSto enable multithreading (
UPCXX_THREADMODE=paris required during cmake configuration. SymPACK implements its own multithreading and as such should be linked with sequential BLAS/LAPACK libraries.
SymPACK uses both UPC++ and MPI, therefore, some preliminary environment variables may need to be defined on most platforms. More details can be found in the UPC++ documentation:
export UPCXX_NETWORK=udp #good option on most workstations, but NOT on high performance networks export GASNET_SPAWNFN='C' export GASNET_CSPAWN_CMD='mpirun -np %N %C'
To run the standalone symPACK driver, for instance on a sample problem from the Suite Sparse matrix collection, the procedure below can be followed:
#first download the input matrix (we are using nasa2146 here) wget https://sparse.tamu.edu/RB/Nasa/nasa2146.tar.gz #extract the matrix tar xzf nasa2146.tar.gz #run sympack upcxx-run -n 4 -- ./run_sympack -in nasa2146/nasa2146.rb -ordering MMD -nrhs 1
For larger problems, like audikw_1, it is strongly advised to use more efficient orderings (such as METIS).
Note that to run symPACK,
upcxx-run is used in the example above, but on some platforms, such as NERSC Cori,
other launchers may be used to both spawn MPI and UPC++, such as
srun if the system is using SLURM.
Moreover, for larger problems, the
-shared-heap XX argument to
upcxx-run may be needed (Please refer to UPC++ documentation).