-
Notifications
You must be signed in to change notification settings - Fork 631
FDS Daily Workflow
###Introduction
In this wiki we will describe how to work within "our system" in the firemodels group. As a prerequisite, read the Git Notes Getting Started wiki. Here we will assume you have forked the firemodels/fds-smv repository to <your GitHub username>/fds-smv
and have cloned your repo to your local account on our linux cluster "blaze".
The purpose of this workflow is to keep your repository up-to-date with the latest changes to the development version of FDS. We expect developers in our group and all collaborators doing research to work with the latest development version of the code. The build status for the latest version is given here: Firebot_Build_Staus. If the build status is "Build Failure!", you should skip updating for that particular day.
If you are brand new to working on unix/linux systems, it will be very helpful if you do a little homework and get up to speed on some basic commands. Note: Be very careful with rm
. And, unless you really know what you are doing, do not type rm *
. You will be very disappointed. There is no "undo" from this operation in linux.
###Adding Aliases to Your .bashrc File
It will be handy to have a couple of aliases established for running different versions of FDS.
If you have not already, open a shell (Terminal on Mac, Putty on Windows) and ssh
into blaze. Type
$ ssh <hostname>
Enter password
Now you are in your home directory. Open your .bashrc
file with vim
(here is a vi cheat sheet). Type
$ vi .bashrc
and make sure your have the following lines.
export FDSSMV=~/<YOUR REPO NAME HERE>
alias fds_db="$FDSSMV/FDS_Compilation/intel_linux_64_db/fds_intel_linux_64_db"
alias fds_dv="$FDSSMV/FDS_Compilation/intel_linux_64_dv/fds_intel_linux_64_dv"
alias qfds.sh="$FDSSMV/Utilities/Scripts/qfds.sh"
If you do not have any of these lines, type i
to enter "insert mode" and copy these lines into your file. Then type :wq
to "write" and "quit" the file.
Close your terminal and reopen it so that new aliases will become active. Now you will be able to simply type, for example, fds_db
to run the "debug" version of FDS (once it is compiled, see below).
###Daily Workflow
Setting aliases is a one-time thing. In this section, we will describe what we do on a daily basis.
####Step 0: Get Some Coffee
####Step 1: Update Your Repository
For this example, I will be the user with an account on blaze.
If you have not already, open a shell (Terminal on Mac, Putty on Windows) and ssh
into blaze. Type
$ ssh <hostname>
Enter password
Change directories ("cd") into your repo's directory. I keep my forked repo in ~/GitHub/fds-smv_rmcdermo/
. So, I type
$ cd GitHub/fds-smv_rmcdermo
First, make sure you are on the development branch of your repo. Type
$ git branch -a
* development
remotes/firemodels/development
remotes/firemodels/gh-pages
remotes/firemodels/nist-pages
remotes/origin/HEAD -> origin/development
remotes/origin/development
If you do not see the output shown above -- most importantly the asterisk next to development
-- then something went wrong in your repo setup; revisit Git Notes Getting Started.
Next, fetch changes from the firemodels central repository. Again, this assumes you have correctly setup the development branch firemodels/fds-smv for remote tracking (see Git Notes Getting Started).
$ git remote update
Fetching origin
...
Fetching firemodels
...
Merge any changes from firemodels into your local repo.
$ git merge firemodels/development
...
Push these changes to your forked repo on GitHub so that this repo also stays up-to-date.
$ git push origin development
...
This is an important step because if and when you find a problem with the code or documentation we would like YOUR help in fixing it. This involves your making changes, committing those changes, pushing the changes to your forked repo, and sending a pull request (see Git Notes Topic Branches, which the project maintainers will then evaluate (again, see Git Notes Getting Started). If your forked repo is not up-to-date with the firemodels central repo, your pull request will be impossible to accept.