Pre-Built MOOSE

If you are not interested in developing your own MOOSE based application, and wish to use MOOSE's many available physics solvers, you can install the pre-built fully-featured MOOSE binary.

If you are operating on a Windows machine, please first follow Windows Subsystem for Linux, and then come back to these instructions.

Install Conda

Our preferred method for delivering pre-built MOOSE binaries is via Conda.

Follow the steps below depending on your platform to install Miniforge. If you run into issues during these steps, please visit our Conda Troubleshooting guide.

  • Linux Users:

    
    curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
    bash Miniforge3-Linux-x86_64.sh -b -p ~/miniforge
    

  • Macintosh Users with Intel processors:

    
    curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh
    bash Miniforge3-MacOSX-x86_64.sh -b -p ~/miniforge
    

  • Macintosh Users with Apple Silicon processors:

    
    curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
    bash Miniforge3-MacOSX-arm64.sh -b -p ~/miniforge
    

With Miniforge installed in your home directory, export PATH so that it may be used:


export PATH=$HOME/miniforge/bin:$PATH

Now that we can execute conda, initialize it and then exit the terminal:


conda init --all
exit

Upon restarting your terminal, you should see your prompt prefixed with (base). This indicates you are in the base environment, and Conda is ready for operation:


$ (base) ~>

The next thing you should do after a fresh install, is perform an update to the base Conda environment:


conda update --all --yes

Add INL's public channel to gain access to INL's Conda package library:


conda config --add channels https://conda.software.inl.gov/public
warningwarning:Do not use sudo

If you find yourself using sudo commands while engaging Conda commands... something is not right. The most common reason for needing sudo is due to an improper Conda installation. Conda should be installed to your home directory, without any use of sudo.

Install MOOSE

With Conda initialized, create the moose environment and install moose:


conda create -n moose moose

After the installation completes, activate the new environment:


conda activate moose
commentnote

Know that you will need to conda activate moose for each terminal window you open, and each time you wish to perform MOOSE related work. If you wish to make this automatic, you can add that command to the end of your shell profile.

Verify moose is available:


moose --help

Should produce the help page. This simple command demonstrates that you have successfully installed the MOOSE Conda package.

Run an Example

A MOOSE installation binary comes with several examples you can run to make sure everything is sound, as well as moving some of the example inputs into a safe location you can play with.

There are examples for each physics solver available by name, in the following directory:


ls $CONDA_PREFIX/moose/share/moose
commentnote

Not everything you find in this directory is a physics library. We are working on an elegant way to ask moose for all available solvers.

For now, lets copy the heat_conduction into a safe location for editing:


mkdir -p ~/projects/examples
cd ~/projects/examples
moose --copy-inputs heat_conduction
  <output trimmed>
Directory successfully copied into ./moose/heat_conduction/
commentnote:Directory successfully copied into...

Take note of the information being displayed in the output. moose is alerting to the directory structure it created (the last line), and sometimes may not represent the exact wordage in the following instructions. e.g. Linux machines will report "combined", Macintosh machines will report "moose".

With the heat_conduction's examples and inputs copied, move into the heat_conduction directory and instruct moose to run the tests:


cd ./moose/heat_conduction
moose --run -j 6

Testing will commence and take a few moments to finish. There may be several skipped tests for one reason or another. This is normal. However none of the tests should fail.

Next, we will run a single input file manually, to demonstrate how you will ultimately use moose. Peruse the subdirectories and find an input file you wish to run:

schooltip

You can list all available input files by running:


# be sure to be in the heat_conduction's directory
find . -name '*.i'


# cd into the directory containing the input file you wish to run
moose -i <the input file you chose>.i --mesh-only

You will see some information scroll by, and ultimately end back at your prompt. If you perform a directory listing (ls) you should see an exodus file was generated in the process (a file with the same input filename but with _in.e suffix).

Viewing Results

<the input file you chose>_in.e can be opened with Paraview. A free tool available for all major operating systems for viewing mesh files of many sorts (including Exodus). Paraview is also available from Conda!

warningwarning

If you are interested in installing this package using Conda, you will need to do so in a new environment. As the moose environment you are using now is incompatible with some of the dependencies required. This means while you are running moose problems, you will need to be in the moose Conda environment. When you want to view results, you will need to be in paraview's environment. Conda makes this easy, but it will be up to you to watch your prompt and understand when to activate one or the other.

The easiest solution is to open two terminal windows. While in one, you have moose activated. While in the other, you have paraview activated. Open a new terminal window now, and create the new paraview environment:


conda activate base # just in case you have `moose` auto-activating
conda create -n paraview paraview
conda activate paraview

With paraview installed, you can now open <the input file you chose>_in.e with the following command:


paraview <the input file you chose>_in.e
commentnote

The very first time you attempt to run paraview it can take minutes before it launches. Consecutive launches are quick.

More Examples

Continue on to see more examples and tutorials using MOOSE! However, most of the next section is geared towards developing your own application.