Skip to content

New update on configure deal.ii with trilinos

New update on configure deal.ii with trilinos published on 1 Comment on New update on configure deal.ii with trilinos

Since mpi environment is essential and all package require the same mpi environment, it is better to separate the MPICH into the home folder, not downloaded with petsc. Here is some refined procedures

1,2,3,4. The same as "Tips on setting up deal.ii and petsc"

5. Download and install mpich-3.2.    https://www.mpich.org/. Setup environment variable,

$ export PATH=$PATH:HOME/mpich-3.2/bin

6. Download and install petsc, as in https://www.dealii.org/developer/external-libs/petsc.html. It should be noted that "--download-hypre=1" is required for deal.ii 8.4.0 and later, otherwise there  is error "undefined reference to `PCHYPRESetType' " when compiling program. MPI environment needs to be assigned. However, blas and lapack can be downloaded, since not all softwares require the same blas&lapack. Here is a configuration

./config/configure.py PETSC_ARCH=arch-linux-release \
--with-shared=1 --with-x=0 --with-mpi=1 --download-hypre=1 --with-debugging=0 \
--with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack
(or specify --with-blas-lapack-dir=$MYHOME/fblaslapack-3.4.2)

7. Download and install METIS, P4EST, OpenBLAS as before

8. Download and install trilinos using:

cmake \
-D Trilinos_ENABLE_Sacado=ON \
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D Trilinos_ENABLE_Anasazi:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_Triutils:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_CXX_FLAGS="-g -O3" \
-D CMAKE_C_FLAGS="-g -O3" \
-D CMAKE_FORTRAN_FLAGS="-g -O5" \
-D Trilinos_EXTRA_LINK_FLAGS="-lgfortran -pthread" \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D Trilinos_VERBOSE_CONFIGURE=OFF \
-D TPL_ENABLE_MPI=ON \
-D MPI_BASE_DIR=$MYHOME/mpich-3.2/bin \
-D BUILD_SHARED_LIBS=ON \
\
-D TPL_ENABLE_BLAS:BOOL=ON \
-D BLAS_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.15/include \
-D BLAS_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.15/lib \
-D BLAS_LIBRARY_NAMES:STRING="libopenblas.a" \
-D TPL_ENABLE_LAPACK=ON \
-D LAPACK_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.15/include \
-D LAPACK_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.15/lib \
-D LAPACK_LIBRARY_NAMES:STRING="libopenblas.a" \
\
-D CMAKE_INSTALL_PREFIX:PATH=$MYHOME/trilinos-11.14.3 \
../

9. If we want to use UMFPACK compiled by ourselves (not significant speed change), download it from http://faculty.cse.tamu.edu/davis/suitesparse.html, unzip to the home folder. It requires blas&lapack, we can use OpenBLAS.
Add "$MYHOME/OpenBLAS-0.2.15/lib" to LD_LIBRARY_PATH, and LIBRARY_PATH environment variable$ make install BLAS=-lopenblas LAPACK=-lopenblas
Since SparseSuite needs to be found by dynamics link at runtime, we need to add $MYHOME/SparseSuite/lib to LD_LIBRARY_PATH

10. Download deal.II 8.4.0 and install (Be careful only deal.II 8.3.0 comes with meshconvert)

cmake \
-DCMAKE_C_COMPILER="mpicc" -DCMAKE_CXX_COMPILER="mpicxx" -DCMAKE_Fortran_COMPILER="mpif90" \
-DCMAKE_INSTALL_PREFIX=$MYHOME/dealii-8.4.0 \
-DDEAL_II_WITH_METIS=ON -DMETIS_DIR=$MYHOME/metis-5.1.0 \
-DDEAL_II_WITH_P4EST=ON -DP4EST_DIR=$MYHOME/p4est-1.1 \
-DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=$MYHOME/trilinos-11.14.3 \
(-DUMFPACK_DIR=$MYHOME/SuiteSparse -DDEAL_II_COMPONENT_PARAMETER_GUI=ON ) ../

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *