INL HPC Cluster

The following instructions are for those operating on INL HPC machines.

Requesting access (shell account) to INL HPC machines is handled by the NCRC group.

For information on developing or running MOOSE-based NCRC applications (not the scope of this document), please head over to NCRC Applications instead, and choose the application applicable to you.

Environment

While operating on one of our INL HPC clusters, you need only load a couple of modules to obtain a proper developer environment:

  • HPC Sawtooth or Lemhi (required each time you log in):

    
    module load use.moose moose-dev
    

If you would prefer not having to perform the above step each time you log in, you can append the above command to your shell initialization file:


echo "module load use.moose moose-dev" >> ~/.bash_profile

Cloning MOOSE

Follow the below instructions, and replace cluster_name placeholder with either lemhi or sawtooth accordingly.

warningwarning:Replace 'cluster_name' accordingly!

INL HPC machines use a shared home directory structure (things you create/do on Lemhi will be available on Sawtooth). If you do not separate your projects directory based on the cluster you are operating on (or some other identifier), you risk developing under one environment and then executing on another. Mistakes like this will cause the odd failure and cost you time to solve/fix.

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

To clone MOOSE, run the following commands in a terminal:


mkdir -p ~/cluster_name/projects
cd ~/cluster_name/projects
git clone https://github.com/idaholab/moose.git
cd moose
git checkout master
commentnote

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

MOOSE requires several support libraries in order to build or run properly. Both of these libraries (PETSc and libMesh) can be built using our supplied scripts:


cd ~/cluster_name/projects/moose/scripts
export MOOSE_JOBS=6 METHODS=opt
./update_and_rebuild_petsc.sh  
./update_and_rebuild_libmesh.sh 
schooltip

MOOSE_JOBS is a loose influential environment variable that dictates how many cores to use when executing many of our scripts.

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

Build and Test MOOSE

To build MOOSE run the following commands:


cd ~/cluster_name/projects/moose/test
make -j 6

To test MOOSE, run the following commands:


cd ~/cluster_name/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)
    

Now that you have a working MOOSE, proceed to 'New Users' to begin your tour of MOOSE!