Conda MOOSE Environment

Our preferred method for obtaining libraries necessary for MOOSE based Application development, is through Conda. Follow these instructions to create an environment on your machine using Conda. At this time, a Conda install via Windows is not supported.

Minimum System Requirements

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

  • GCC/Clang C++11 compliant compiler (GCC @ 4.8.4, 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. If you are a first time MOOSE user, please skip down to Install Conda. Removal of the moose-envirnment package, is only needed to be performed once.

  • Using Conda, it is no longer neccessary 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 Conda

  • Install Miniconda or Anaconda (we recommend Miniconda)

  • Configure Conda to work with conda-forge, and our Idaholab channel:

    
    conda config --add channels conda-forge
    conda config --add channels https://mooseframework.org/conda/moose
    

  • Install the moose-env package from Idaholab and name your environment 'moose':

    
    conda create --name moose moose-env
    

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

    
    conda activate moose
    

    Some folks may receive additional instructions when attempting to activate a profile. Follow those instructions, and try to activate the moose environment again.

    You will have successfully activated the moose environment when you see 'moose' within your prompt.

If you close, and then re-open this terminal window, know that you will need to conda activate moose again. You will need to do this for every terminal you open. If you wish to make this automatic, you can append conda activate moose to your bash or zsh profile.

The MOOSE team will make periodic updates to the conda packages. To stay up-to-date, activate the moose environment, and perform an update:


conda activate moose
conda update --all
note:sudo is not necessary

If you find yourself applying the use of sudo for any of the above conda commands... something's not right. The most common reason for needing sudo, is due to an improper installation. Conda should be installed to your home directory, and without any use of sudo.

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).

Update MOOSE

MOOSE does not use traditional versioning, is under heavy development, and is being updated continuously. Therefore, it is important that you continue to update MOOSE as you use it to develop your application(s), we recommend weekly updates.

To update MOOSE use the following commands.


cd ~/projects/moose
git fetch origin
git rebase origin/master

Then return to your application, re-compile, and test.


cd ~/projects/YourAppName
make -j4
./run_tests -j4

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