新系统sudo apt-get install build-essential
一、PETSC-3.7.7
1. download PETSC-3.7.7 from
http://www.mcs.anl.gov/petsc/documentation/installation.html
2.
./configure --download-mpich --download-fblaslapack --download-mumps --download-hypre --download-scalapack
3.
sudo make all test
4. Note Dealii and PETSC must use the same mpi, so add the following lines in ~/.bashrc:
export PATH="$PATH:/home/lucky/Desktop/petsc-3.7.7/arch-linux2-c-debug/bin"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/lucky/Desktop/petsc-3.7.7/arch-linux2-c-debug/lib"
export PETSC_DIR=/home/lucky/Desktop/petsc-3.7.7 export PETSC_ARCH=arch-linux2-c-debug
二、 安装P4SET
在dealii官网下载p4est以及安装的srcipt,
语句为sudo apt-get install zlib1g-dev
然后./p4est-setup.sh p4est-2.0.tar.gz ~/Desktop/p4es
三、insatll BLAS 、 LAPACK 、METIS
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install metis
四、dealii-9.0.1
1. 官网下载 dealii-9.0.1
2. install官网教程https://www.dealii.org/9.0.0/index.html
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/Desktop/Dealii -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_PETSC=ON -DDEAL_II_WITH_BLAS=ON -DDEAL_II_WITH_LAPACK=ON -DDEAL_II_WITH_UMFPACK=ON -DDEAL_II_WITH_METIS=ON -DDEAL_II_WITH_P4EST=ON -DMPI_DIR=/home/lucky/Desktop/petsc-3.7.7/arch-linux2-c-debug/lib -DP4EST_DIR=/home/lucky/Desktop/p4est ../dealii-9.0.1
sudo make install