Compiling and Installing deal.II
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to install the dependency:
yum install blas lapack zlib boost -y
- Run the following command to decompress the deal.II installation package:
tar -xzvf dealii-9.1.1.tar.gz
- Run the following command to switch to the directory generated after decompression:
cd dealii-9.1.1
- Run the following commands to create and access the directory for compiling deal.II:
mkdir build cd build
- Run the following commands to perform compilation and installation:
CC=mpicc CXX=mpicxx FC=mpif90 cmake -DDEAL_II_WITH_THREADS=OFF -DDEAL_II_COMPONENT_DOCUMENTATION=ON -DDEAL_II_WITH_MPI=ON -DCMAKE_INSTALL_PREFIX=/path/to/DEALL.II ../
- Run the following command to modify the build.make file:
- Open build.make.
vi tests/quick_tests/CMakeFiles/mpi.debug.run.dir/build.make
- Press i to enter the insert mode and add the content in bold to line 52 in the build.make file.
cd /storage/software/TaiShan/dealii/src/build/tests/quick_tests && /storage/software/TaiShan/openmpi/openmp i-4.0.1-gcc9.1-hcoll/bin/mpiexec --allow-run-as-root -mca btl ^openib -np 2 ./mpi.debug > mpi.debug-OK 2>&1 || ( ec ho mpi.debug:\ RUN\ failed.\ Output: && cat mpi.debug-OK && rm mpi.debug-OK && exit 1 )
- Press Esc, enter :wq!, and press Enter to save the file and exit.
- Open build.make.
- Run the following commands to check the setting:
make -j 32 make install make test
If 100% tests passed is displayed, the program is successfully deployed, as shown in Figure 1.
Parent topic: deal.II 9.1.1 Porting Guide (CentOS 7.6)
