'Git'-ting Bison: Working with Git

These instructions are meant to help users of both local machines and INL High Performance Computing (HPC) get started with Bison. The installation and build processes are the same for both with the exception of the MOOSE package, which is prebuilt on HPC.

note

These instructions are designed for new users that have never forked Bison. If you already have a Bison fork and need to clone to a new machine, skip to the section on Cloning Bison.

Bison and MOOSE use git for code management and distribution. For that reason you will need to learn a little bit about git even if you are not planning on contributing to the code. You will also need access to the Bison repository and a license agreement. Instructions for this are below.

Requesting Access

Contact a member of the Bison team to get HPC access and a licensing agreement for your institution. This process may take a few weeks. Bison is housed at https://hpcgitlab.inl.gov which lives on the INL HPC system, therefore HPC access is required. Continue on to the next step once HPC access is obtained.

Install the MOOSE Package

This step is only needed if you are running on a local machine. Skip to the next section, Adding your SSH keys, if you will be using Bison only on an INL HPC system machine.

Adding your SSH keys

If you are working from outside INL you will need to create a tunnel to INL using your HPC account and the instructions that were included when you received your account. See Help/INL HPC Connectivity for more information.

If you can log in to https://hpcgitlab.inl.gov and then access the idaholab/bison project you may continue. Contact the Bison department for repository access if you are unable to access the project.

Open the terminal on the machine that you intend to use and enter the following commands:

  • ssh-keygen -t rsa -C 'your_email' Press "Enter" when you are asked for a passphrase. You may enter a passphrase, but you will need to enter it whenever you connect to the repository.

  • cat ~/.ssh/id_pub and copy what is displayed.

  • Log on to https://hpcgitlab.inl.gov using your HPC credentials and paste the key to 'SSH Keys' under 'Profile Settings' on hpcgitlab.

  • Paste this key to your github.com account as well, in the same manner.

note

These steps are necessary for repository authentication.

Git Overview

This is a pictorial diagram of the git environment. In this diagram 'local machine' represents either a physical, local machine or the HPC system. The two upper circles represent space on https://hpcgitlab.inl.gov. The dotted arrows 'upstream' and 'origin' represent git remotes which are just aliases for paths.

Fork Bison

On hpcgitlab, search for 'idaholab/bison' and then click 'Fork'. This makes a personal version of the Bison project denoted 'username/bison'.

warning

Do not delete your fork. Recovery is a troublesome process.

Click on the gear icon (settings) and then 'Members' and add 'moosetest' as a 'Developer'. This change is required for the testing system to work, which is necessary for contributing to the code. If you will not be contributing to the code, it is not required.

If you wish to grant access to your fork to other Bison team members (helpful if you want them to review changes in your branch before submitting a merge request), add specific Bison team members as 'Developer'. This is optional and can be skipped if you will be running Bison but not changing the code.

Load Modules

HPC

The HPC compute nodes will not automatically load the MOOSE modules needed to build and run Bison. Once you log into a compute node, run the command


module load use.moose moose-dev-gcc

You may also want to add this command to your logon script.

Local Machine

As long as you installed the MOOSE package with the default settings the necessary modules were added to your bash profile. You can double-check they are installed by opening a terminal and typing module list. This should list a bunch of MOOSE related modules.

Now you're ready to move to the next step of Cloning Bison.