Troubleshooting
The content you find here, is a collection of issues commonly experienced by all of us at some point. Please use the navigation list on the right, to begin with the section you are experiencing issues with. This document has been design in such a manner that you will 'jump' between sections pertinent to fixing the previous one.
Discussion Forum
If your issue can not be solved here, please submit your question to the MOOSE Discussion forum for help!
Conda Issues
Conda issues can be the root cause for just about any issue on this page. Scroll through this section, for what may look familiar, and follow those instructions:
404 error, The channel is not accessible or is invalid.
If you are receiving this, you may be victim of us changing the channel name out from underneath you (Sorry!). Remove the offending channel(s):
conda config --remove channels https://mooseframework.org/conda/moose conda config --remove channels https://mooseframework.com/conda/moose conda config --remove channels https://mooseframework.inl.gov/conda/moose
If you receive errors about a channel not present (CondaKeyError), please ignore. You most likely will not have all three 'old' channels. Next, add the correct channel:
conda config --add channels idaholab
When you're finished, a
conda config --show channels
should resemble the following:$ conda config --show channels channels: - idaholab - conda-forge - defaults
command not found: conda
You have yet to install conda, or your path to it is incorrect or not set. You will need to recall how you installed conda. Our instructions ask to have Miniconda3 installed to your home directory:
~/miniconda3
. Which requires you to set your PATH accordingly:export PATH=~/miniconda3/bin:$PATH
With PATH set, try to run again, what ever command you were initially attempting.
conda activate moose
If
conda activate moose
is failing like so:CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run $ conda init <SHELL_NAME> Currently supported shells are: - bash - fish - tcsh - xonsh - zsh - powershell See 'conda init --help' for more information and options. IMPORTANT: You may need to close and restart your shell after running 'conda init'.
...it's possible you have yet to perform a
conda init
properly. See conda init below.It could also mean you have an older version of Conda, or that the environment you are trying to activate is somewhere other than where conda thinks it should be, or simply missing / not yet created. Unfortunately, much of what can be diagnosed, is going to be beyond the scope of this document, and better left to the support teams at Conda. What we can attempt, is to create a new environment and go from there:
conda create --name testing --quiet --yes
The above should create an empty environment. Try and activate it:
conda activate testing
If the above is asking you to initialize conda, see
conda init
below.If the command failed, or the
conda create
command before it, the error will likely be involved with how Conda was first installed (perhaps with sudo rights, or as another user). You should look into removing this installation of conda, and starting over with our Getting Started instructions. Failures of this nature can also mean your conda resource file (~/.condarc) is in bad shape. We have no way of diagnosing this in a troubleshooting fashion, as this file can contain more than just moose-related configs. For reference, the bare minimum should resemble the following:channels: - idaholab - conda-forge - defaults
conda init
If
conda init
is failing, or similarly doing nothing, it is possible that Conda simply does not know what shell you are operating in, and it created a 'configuration' for the wrong shell, or not at all.To figure out what shell you are operating in:
echo $0
What ever returns here, is the type of shell you are operating in, and is also what you should be instructing Conda to 'initialize'. Example:
conda init zsh
Hint: For Linux, this will most likely be
conda init bash
. For Macintosh, this can either be bash or zsh.Your issue not listed
The quick fix-attempt, is to re-install the moose-packages:
conda deactivate conda remove moose --all --yes conda create moose moose-libmesh moose-tools
If the above re-install method ultimately failed, it is time to submit your errors to the discussion forum.
Build Issues
Build issues are normally caused by an invalid environment, or perhaps an update to your repository occurred, and you now have a mismatch between MOOSE and your application, or a combination of the two with the moose-libmesh Conda package being out of date.
Verify the Conda Environment is active and up to date, with the latest version of our moose packages:
conda activate moose conda update --all
if
conda activate moose
failed, see Conda Issues above.commentnoteWhen ever an update is performed in Conda, it is a good idea to re-build MOOSE and your application. While specific updates to moose-libmesh and/or moose-petsc may not have occurred, there are several other libraries out of our control which may have been upgraded, requiring you to rebuild.
Verify the MOOSE repository is up to date, with the correct vetted version of libMesh:
warningwarningBe sure you have committed/saved your work. The following commands will delete untracked files!
cd moose git checkout master git clean -xfd <output snipped> git fetch upstream git pull git submodule update --init
Verify you either have no moose directory set, or it is set correctly.
[~] > echo $MOOSE_DIR [~] >
The above should return nothing, or it should point to the correct moose repository.
commentnoteMost users, do not use or set MOOSE_DIR. If the above command returns something, and you are not sure why, just unset it:
unset MOOSE_DIR
Try building a simple hello world example (there is more text than what is visible, be sure to copy it all):
cd /tmp cat << EOF > hello.C #include <mpi.h> #include <stdio.h> int main(int argc, char** argv) { // Initialize the MPI environment MPI_Init(NULL, NULL); // Get the number of processes int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size); // Get the rank of the process int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); // Get the name of the processor char processor_name[MPI_MAX_PROCESSOR_NAME]; int name_len; MPI_Get_processor_name(processor_name, &name_len); // Print off a hello world message printf("Hello world from processor %s, rank %d out of %d processors\n", processor_name, world_rank, world_size); // Finalize the MPI environment. MPI_Finalize(); } EOF mpicxx -fopenmp hello.C
If the above build fails, and you have the correct Conda environment loaded (
conda activate moose
), then something is failing beyond the scope of this document, and you should now contact us via the disussion forum.If the build was successfull, attempt to execute the hello word example:
mpiexec -n 4 /tmp/a.out
You should receive a response similar to the following:
Hello world from processor my_hostname, rank 0 out of 4 processors Hello world from processor my_hostname, rank 1 out of 4 processors Hello world from processor my_hostname, rank 3 out of 4 processors Hello world from processor my_hostname, rank 2 out of 4 processors
If all of the above has succeeded, you should attempt to rebuild MOOSE or your application again. If you've made it this far, and the above is working, but MOOSE fails to build, then it is time to ask us why on the discussion forum.
Failing Tests
If many, or all tests are failing, it is a good chance the fix is simple. Follow through these steps to narrow down the possible cause.
First, run a test that should always pass:
cd moose/test
make -j 8
./run_tests -i always_ok -p 2
If make -j 8
fails, please proceed to Build Issues above. This is most likely why all your tests are failing.
This test, proves the TestHarness is available. That libMesh is built, and the TestHarness has a working MOOSE framework available to it. Meaning, your test that is failing may be beyond the scope of this troubleshooting guide. However, do continue to read through the bolded situations below. If the error is not listed, please submit your failed test results to the MOOSE Discussion forum for help.
If the test did fail, chances are your test and our test is failing for the same reason:
Environment Variables is somehow instructing the TestHarness to use improper paths. Try each of the following and re-run your test again. You may find you receive a different error each time. Simply continue troubleshooting using that new error, and work your way down. If the error is not listed here, then it is time to ask the MOOSE Discussion forum for help:
check if
echo $METHOD
returns anything. If it does, try unsetting it withunset METHOD
check if
echo $MOOSE_DIR
returns anything. If it does, try unsetting it withunset MOOSE_DIR
check if
echo $PYTHONPATH
returns anything. If it does, try unsetting it withunset PYTHONPATH
commentnote:METHOD and MOOSE_DIRIf these were set, it will be necessary to perform a rebuild. See Build Issues above.
Failed to import hit:
Verify you have activated the conda moose environment:
echo $CONDA_DEFAULT_ENV
. This command should return 'moose'. If not, see Conda Issues above.
Application not found
Your Application has not yet been built. You need to successfully perform a
make
. If make is failing, please see Build Issues above.Perhaps you have specified invalid arguments to run_tests? See TestHarness More Options. Specifically for help with:
--opt
--dbg
--oprof
gethostbyname failed, localhost (errno 3)
This is a fairly common occurrence which happens when your internal network stack / route, is not correctly configured for the local loopback device. Thankfully, there is an easy fix:
Obtain your hostname:
hostname mycoolname
Linux & Macintosh : Add the results of
hostname
to your/etc/hosts
file. Like so:sudo vi /etc/hosts 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.0.1 mycoolname # <--- add this line to the end of your hosts file
Everyones host file is different. But the results of adding the necessary line described above will be the same.
Macintosh only, 2nd method:
sudo scutil --set HostName mycoolname
We have received reports where the second method sometimes does not work.
TIMEOUT
If your tests fail due to timeout errors, it is most likely you have a good installation, but a slow machine (or slow filesystem). You can adjust the amount of time that the TestHarness allows a test to run before timing out, by adding a paramater to your test file:
[Tests] [./timeout] type = RunApp input = my_input_file.i max_time = 300 <-- time in seconds before a timeout occurs. 300 is the default for all tests. [../] []
CRASH
A crash indicates the TestHarness executed your application (correctly), but then your application exited with a non-zero return code. See Build Issues above for a possible solution.
EXODIFF
An exodiff indicates the TestHarness executed your application, and your application exited correctly. However, the generated results differs from the supplied gold file. If this test passes on some machines, and fails on others, this would indicate you may have applied too tight a tolerance to the acceptable error values for that specific machine. We call this phenomena machine noise.
CSVDIFF
A different file format following the same error checking paradigm as an exodiff test.