Compiling libMesh requires a proper environment. Lets verify a few things before attempting to build it (or possibly re-build it in your case):
Verify you have a proper compiler present:
which $CC /opt/moose/mpich-3.2/gcc-7.3.1/bin/mpicc mpicc -show gcc -I/opt/moose/mpich-3.2/gcc-7.3.1/include -L/opt/moose/mpich-3.2/gcc-7.3.1/lib -Wl,-rpath -Wl,/opt/moose/mpich-3.2/gcc-7.3.1/lib -Wl,--enable-new-dtags -lmpi which gcc /opt/moose/gcc-7.3.1/bin/gcc
which $CC /opt/moose/mpich-3.2/clang-6.0.1/bin/mpicc mpicc -show clang -Wl,-commons,use_dylibs -I/opt/moose/mpich-3.2/clang-6.0.1/include -L/opt/moose/mpich-3.2/clang-6.0.1/lib -lmpi -lpmpi which clang /opt/moose/llvm-6.0.1/bin/clang
What you are looking for is that
mpicc -showare returning proper paths. If these paths are not set, or
whichis not returning anything, see Modules for help on setting up a proper environment. Once set up, return here and verify the above commands return the proper messages.
Check that PETSC_DIR is set and does exist:
echo $PETSC_DIR /opt/moose/petsc-3.9.4/mpich-__MPICH___gcc-7.3.1-opt file $PETSC_DIR /opt/moose/petsc-3.9.4/mpich-__MPICH___gcc-7.3.1-opt: directory
echo $PETSC_DIR /opt/moose/petsc-3.9.4/mpich-__MPICH___clang-6.0.1-opt file $PETSC_DIR /opt/moose/petsc-3.9.4/mpich-__MPICH___clang-6.0.1-opt: directory
echo $PETSC_DIRreturns nothing, this would indicate your environment is not complete. See Modules for help on setting up a proper environment. Once set up, return here and verify the above commands return the proper messages.
file $PETSC_DIRreturns an error (possible if you are performing a Manual Install), it would appear you have not yet ran configure. Configure builds this directory.
With the above all taken care of, try to build libMesh:
cd moose/scripts ./update_and_rebuild_libmesh.sh
If you encounter errors during this step, we would like to hear from you! Please seek help on our mailing list. Provide the diagnostic and libmesh configure logs. Those two files can be found in the following locations:
If libMesh built successfully, return to the beginning of the step that lead you here, and try that step again.