p4est - shawfdong/hyades GitHub Wiki
The p4est software library enables the dynamic management of a collection of adaptive octrees, conveniently called a forest of octrees. p4est is designed to work in parallel and scales to hundreds of thousands of processor cores.
p4est requires BLAS and LAPACK. Here we build p4est with Intel MKL.
Download the latest release tarball of p4est:
$ cd /scratch $ wget http://p4est.github.io/release/p4est-1.1.tar.gz $ tar xvfz p4est-1.1.tar.gz $ cd p4est-1.1
Configure and compile p4est 1.1 with Intel MKL, using Intel MPI using Intel compilers:
$ export CC=mpiicc $ export CXX=mpiicpc $ export FC=mpiifort $ export F77=mpiifort $ export LIBS="-lmkl_intel_lp64 -lmkl_core -lmkl_sequential" $ ./configure \ --prefix=/pfs/sw/parallel/impi_intel/p4est-1.1 \ --enable-mpi $ make -j8 $ make install
p4est 1.1 is installed at /pfs/sw/parallel/impi_intel/p4est-1.1.
Initially we built p4est 1.1 with the Netlib reference BLAS & LAPACK, which are not optimized for performance. Here is what I did:
$ export CC=mpiicc $ export CXX=mpiicpc $ export FC=mpiifort $ export F77=mpiifort $ export LIBS=-lgfortran $ ./configure \ --prefix=/pfs/sw/parallel/impi_intel/p4est-1.1 \ --enable-mpi --enable-shared=no \ --with-blas=/pfs/sw/serial/gcc/lapack-3.5.0/lib/libblas.a \ --with-lapack=/pfs/sw/serial/gcc/lapack-3.5.0/lib/liblapack.a $ make $ make install
Note Netlib BLAS & LAPACK were compiled using gfortran. To link a C/C++ program with those libraries, we must link it with libgfortran too (export LIBS=-lgfortran).
There is a howto document that documents the basic interface design of p4est[1] and there are step-by-step examples for p4est.
p4est 1.1 is installed at /pfs/sw/parallel/impi_intel/p4est-1.1. To facilitate the usage of p4est, I've created a module p4est to set up environment for the synonymous library[2].
To display information about the module:
$ module show p4est
To load the module:
$ module load p4est