Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- Set the environment variables.
export CC=mpicc export CXX=mpicxx export F90=mpif90 export F77=mpif77 export FC=mpif90
- Go to the MOOSE directory.
cd /path/to/MOOSE/moose
- Obtain PETSc 3.13.2.
wget https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.13.2.tar.gz
- Compile PETSc 3.13.2.
tar -xvf petsc-3.13.2.tar.gz mv petsc-3.13.2.tar.gz petsc cd petsc export PETSC_DIR=/path/to/MOOSE/moose/petsc/ export PETSC_ARCH=arch-moose ./configure --download-hypre=1 --with-debugging=no --with-shared-libraries=1 --download[1]fblaslapack=1 --download-metis=1 --download-ptscotch=1 --download-parmetis=1 -- download-superlu_dist=1 --download-mumps=1 --download-strumpack=0 --download[1]scalapack=1 --download-slepc=1 --with-mpi-dir=/path/to/hypermpi/hmpi --with-openmp=0 -- with-cxx-dialect=C++11 --with-fortran-bindings=0 --with-sowing=0 --with-64-bit-indices
--with-mpi-dir is the MPI path. Downloading some of the packages requires Internet connection. If the packages cannot be automatically downloaded, you can manually download them. Change 1 to the path for storing the packages. For example, change --download-hypre=1 to --download-hypre=/path/to/MOOSE/package/v2.20.0.tar.gz.
export OMPI_ALLOW_RUN_AS_ROOT=1 export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 make all make check
If the following information is displayed, the installation is successful:

- Compile and install libmesh.
cd /path/to/MOOSE/moose/scripts ./update_and_rebuild_libmesh.sh
- Install MOOSE.
cd /path/to/MOOSE/moose/test make
If you run the make -j command, an error may be reported.
Parent topic: MOOSE 1.0.0 Porting Guide (openEuler 21.03)