Conda MOOSE Environment

Our preferred method for obtaining libraries necessary for MOOSE based Application development, is via Conda's myriad array of libraries. Follow these instructions to create an environment on your machine using Conda. At this time, an option to install MOOSE directly on a Windows system is not yet supported. On-going efforts are being made to add a conda installation option for Windows, and an experimental WSL option is available.

Minimum System Requirements

In general, the following is required for MOOSE-based development:

  • GCC/Clang C++14 compliant compiler (GCC @ 5.1.0, Clang @ 3.5.1 or greater)

    • Note: Intel compilers are not supported.

  • Memory: 16 GBs (debug builds)

  • Processor: 64-bit x86

  • Disk: 30GB

Prerequisites

Transitional step for pre-existing users

For those of you who have previously installed the moose-environment package, you should remove it. Removal of the moose-environment package only needs to be performed once.

note:Step not applicable to first-time users

If you are a first time MOOSE user, please skip down to Install Miniconda.

  • Using Conda, it is no longer necessary to have /opt/moose present on your machine. Depending on the type of machine you have, please do the following:

    Operating SystemCommand
    CentOSsudo yum remove moose-environment
    Fedorasudo dnf remove moose-environment
    OpenSUSEsudo zypper remove moose-environment
    Debian (Ubuntu, Mint)sudo dpkg -r moose-environment
    Macintoshsudo rm -rf /opt/moose
    warning:sudo is dangerous

    Be especially carful with the above commands! Verify twice that what you have entered in your terminal is what the instructions are asking you to do.

Install Miniconda3

Installing Miniconda3 is straight forward. Download, install, and configure. If you run into issues during these steps, please visit our troubleshooting guide for Conda.

  • Linux Users:

    
    curl -L -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3
    

  • Macintosh Users:

    
    curl -L -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
    bash Miniconda3-latest-MacOSX-x86_64.sh -b -p ~/miniconda3
    

With Miniconda installed to your home directory, export PATH, so that it may be used:


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

Configure Conda to work with conda-forge, and our mooseframework.org channel:


conda config --add channels conda-forge
conda config --add channels idaholab
warning:sudo conda

If you find yourself using sudo conda... something's 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 Conda Packages

Install the moose-libmesh and moose-tools package from mooseframework.org, and name your environment 'moose':


conda create --name moose moose-libmesh moose-tools

Activate the moose environment (do this for any new terminal opened):


conda activate moose

You may receive an error, accompanied by additional instructions when attempting to activate a profile. Follow those on-screen instructions, and try to activate the moose environment again. If you are unsure how to proceed, please see conda activate moose section in our troubleshooting guide for Conda.

You will have successfully activated the moose environment when you see (moose) prefixed within your prompt.

note

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

Cloning MOOSE

MOOSE is hosted on GitHub and should be cloned directly from there using git. We recommend creating a directory named projects to put all of your MOOSE related work.

To install MOOSE run the following commands in a terminal.


mkdir ~/projects
cd ~/projects
git clone https://github.com/idaholab/moose.git
cd moose
git checkout master
note

The master branch of MOOSE is the stable branch that will only be updated after all tests are passing. This protects you from the day-to-day changes in the MOOSE repository.

Compile and Test MOOSE


cd ~/projects/moose/test
make -j 4
./run_tests -j 4

If the installation was successful you should see most of the tests passing (some tests will be skipped depending on your system environment).

Head back over to the Getting Started page to continue your tour of MOOSE.

Uninstall Conda MOOSE Environment

If you wish to remove the moose environment at any time, you may do so using the following commands:


conda deactivate   # if 'moose' was currently activated
conda remove --name moose --all