Compiling libMesh
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:
Linux:
which $CC /opt/moose/mpich-3.3/gcc-9.2.0/bin/mpicc mpicc -show gcc -I/opt/moose/mpich-3.3/gcc-9.2.0/include -L/opt/moose/mpich-3.3/gcc-9.2.0/lib -Wl,-rpath -Wl,/opt/moose/mpich-3.3/gcc-9.2.0/lib -Wl,--enable-new-dtags -lmpi which gcc /opt/moose/gcc-9.2.0/bin/gccMacintosh:
which $CC /opt/moose/mpich-3.3/clang-9.0.0/bin/mpicc mpicc -show clang -Wl,-commons,use_dylibs -I/opt/moose/mpich-3.3/clang-9.0.0/include -L/opt/moose/mpich-3.3/clang-9.0.0/lib -lmpi -lpmpi which clang /opt/moose/llvm-9.0.0/bin/clang
What you are looking for is that
whichandmpicc -showare returning proper paths. If these paths are not set, orwhichis 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:
Linux:
echo $PETSC_DIR /opt/moose/petsc-3.11.4/mpich-__MPICH___gcc-9.2.0-opt file $PETSC_DIR /opt/moose/petsc-3.11.4/mpich-__MPICH___gcc-9.2.0-opt: directoryMacintosh:
echo $PETSC_DIR /opt/moose/petsc-3.11.4/mpich-__MPICH___clang-9.0.0-opt file $PETSC_DIR /opt/moose/petsc-3.11.4/mpich-__MPICH___clang-9.0.0-opt: directoryIf
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.If
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.shIf you encounter errors during this step, we would like to hear from you! Please seek help on the MOOSE Discussion forum. Provide the diagnostic and libmesh configure logs. Those two files can be found in the following locations:
moose/libmesh/build/config.logmoose/scripts/libmesh_diagnostic.log
If libMesh built successfully, return to the beginning of the step that lead you here, and try that step again.