Obtaining and Building MOOSE
MOOSE is hosted on GitHub and should be cloned directly from there using git. We recommend creating a projects directory to contain all of your MOOSE related work. But you are free to choose any location you wish:
~/projects
To clone MOOSE, run the following commands in a terminal:
mkdir -p ~/projects
cd ~/projects
git clone https://github.com/idaholab/moose.git
cd moose
git checkout master
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.
Build PETSc and libMesh
cd ~/projects/moose/scripts
export MOOSE_JOBS=6 METHODS=opt
./update_and_rebuild_petsc.sh || return
./update_and_rebuild_libmesh.sh || return
./update_and_rebuild_wasp.sh || return
MOOSE_JOBS
is a loose influential environment variable that dictates how many cores to use when executing many of our scripts. While operating on INL HPC login nodes alongside everyone else, it is courtesy to limit your CPU core usage. We prefer that users limit themselves to 6:
export MOOSE_JOBS=6
METHODS
is an influential environment variable that dictates how to build libMesh. If this variable is not set, libMesh will by default build 4 methods (taking 4x longer to finish). Most of the time, folks will want to use optimized methods:
export METHODS=opt
Compile and Test MOOSE
To test MOOSE, run the following commands:
cd ~/projects/moose/test
./run_tests -j 6
Some tests are SKIPPED. This is normal as some tests are specific to available resources, or some other constraint your machine does not satisfy. If you see failures, or you see MAX FAILURES
, thats a problem! And it needs to be addressed before continuing:
Supply a report of the actual failure (scroll up a ways). For example the following snippet does not give the full picture (created with
./run_tests -i always_bad
):Final Test Results: -------------------------------------------------------------------------------- tests/test_harness.always_ok .................... FAILED (Application not found) tests/test_harness.always_bad .................................. FAILED (CODE 1) -------------------------------------------------------------------------------- Ran 2 tests in 0.2 seconds. Average test time 0.0 seconds, maximum test time 0.0 seconds. 0 passed, 0 skipped, 0 pending, 2 FAILED
Instead, you need to scroll up and report the actual error:
tests/test_harness.always_ok: Working Directory: /Users/me/projects/moose/test/tests/test_harness tests/test_harness.always_ok: Running command: tests/test_harness.always_ok: tests/test_harness.always_ok: #################################################################### tests/test_harness.always_ok: Tester failed, reason: Application not found tests/test_harness.always_ok: tests/test_harness.always_ok .................... FAILED (Application not found) tests/test_harness.always_bad: Working Directory: /Users/me/projects/moose/test/tests/test_harness tests/test_harness.always_bad: Running command: false tests/test_harness.always_bad: tests/test_harness.always_bad: ################################################################### tests/test_harness.always_bad: Tester failed, reason: CODE 1 tests/test_harness.always_bad: tests/test_harness.always_bad .................................. FAILED (CODE 1)
If the installation was successful you should see most of the tests passing (some tests will be skipped depending on your system environment), and no failures.
Now that you have a working MOOSE, proceed to 'New Users' to begin your tour of MOOSE!