PaStiX Handbook
6.3.2
|
** Requirements **
PaStiX needs some libraries to be built on your system :
Install BLAS and CBLAS
BLAS (Basic Linear Algebra Subprograms) is a specification that prescribes a set of low-level routines for performing common linear algebra operations. These routines were originally written in Fortran, so we need the CBLAS interface to compile it in C.
On Linux :
On Mac:
Install LAPACK and LAPACKE
LAPACK and LAPACKE are libraries that provide routines for solving systems of linear equations. They depend on the BLAS library.
On Linux :
On Mac:
Warning : you may need to add the following lines to help cmake with LAPACKE on MacOS for the configuration of PaStiX during the build step:
The Portable Hardware Locality (hwloc) software package provides a portable abstraction of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multi-threading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, Infiniband, HCAs or GPUs.
On Linux :
On Mac:
At last, we need to install a library for the ordering part of the factorization. PaStiX supports both Scotch and Metis.
You can install it simply with the following command :
On Linux :
On Mac:
You can install it simply with the following command on Linux:
on Mac : (use the homebrew formula available in the PaStiX repository)
Or, for the 6.0 version :
However, you may want compile your own Scotch library. For doing so, download the version that you want to use and go in your Scotch directory.
Let's define the directory where you want to install Scotch as:
Note that you can also keep the default install directory, and install in the system using root privileges. We do not recommend this latest version.
To build scotch, you have to copy the Make.inc corresponding to your architecture :
Note that either you choose INTSIZE32 or INTSIZE64 in the Makefile.in file, it will define the value of -DPASTIX_INT64=[ON|OFF] for PaStiX.
Scotch is now installed on your system but may not be available in your environment.
One way to check if it is set correctly is to verify that the following command return the path to the freshly installed Scotch:
If it does not find it, you can execute the following lines and try again.
On Linux:
On MacOS:
Note that these lines can (should) be added to your environment file such as .bashrc
to set it by default.
To use the latest stable development branch of PaStiX, please clone the master branch. Note that PaStiX contains two git submodules for spm and morse_cmake. To get source codes please use these commands:
Go in your PaStiX source directory and create a new build directory to build the default shared memory (without MPI) version:
Then you can install it simply with the command :
Note that as before we defined a PASTIX_DIR
variable to define the install directory of PaStiX.
On Mac, if you decide to not build PaStiX and only install it with all its dependencies, you can simply run :
Once the compilation finished, you can setup your environment easily by sourcing the provided file:
And then, you can run your favorite example:
Your setup is ready to play with PaStiX. Please refer to section How to to use PaStiX to get as best results as possible.
As said previously, you can setup your environment easily by sourcing the provided file:
But, you can also have a look on examples installed to see how to link PaStiX within your code :
You will get the following output with a C
driver using OpenBLAS
:
You will get the following output with a Fortran
driver using openblas
:
It will work if you change the examples Makefile accordingly :