Link to this document's Jupyter Notebook

In order to successfully complete this assignment you need to participate both individually and in groups during class. If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class on Friday January 22. If you are attending asynchronously, turn in your assignment using D2L no later than _11:59pm on Friday January 22.


In-Class Assignment: Galaxy Example

Astronomical picture of a galaxy

Image from: https://phys.org/news/2018-08-astronomers-reveal-monster-star-forming-galaxies.html

Agenda for today's class (70 minutes)

  1. Pre class assignment review
  2. Running GalaxSee on HPCC

1. Pre class assignment review

0121--Command_Line_pre-class-assignment


2. Running GalaxSee on HPCC

Today we will practice what we have learned on Friday. As a reminder, here are the commands we used:

Step 1: Start an OpenOnDemand interactive desktop session.

  1. Go to http://OnDemand.hpcc.msu.edu, select "Interactive Apps-->Interactive Desktop". Set the number of hours to 1 and the number of cores to 1 and the memory to 1GB. Under advanced options set the node type to "Any". Leave everything else blank and hit "Launch".
  1. Select "Interactive Apps-->Interactive Desktop" again. This time set the number of hours to 1 and the number of cores to 4 and the memory to 1GB. Under advanced options set the node type to "Any". Leave everything else blank and hit "Launch".

  2. Wait for your sessions to start.

NOTE As is the case anytime we use the HPCC, there is no guarantee that these sessions will start during class. This is a shared system and we need to be flexible. You can also do the rest of this assignment on a development node.

Step 2: Open a Terminal app

Once you have a desktop up and running, open a terminal app from the main menu. Try navigating to "Applications-->System Tools-->Terminal". Explore this menu a bit to get familiar with some of the programs available inside the interactive desktop.

Step 3: Navigate to the GalaxSee Directory inside the BCCD-Example directory

There is a BCCD-Example directory inside your course git repository (You should have cloned the course git repository in the pre-class)

Let us Navigate to that folder using the following commands:

Command Description
cd Change Directory
ls list directory
pwd : print working directory
. Shortcut to indicate current directory
.. Shortcut to indicate parent directory
~ Shortcut to indicate home directory

These commands may be slightly different on your computer but here are common commands:

cd CMSE401-S21
ls
cd BCCD-Examples
ls
cd GalaxSee 
ls
pwd

Step 4: Compile the Galaxsee example code

Type the following command on the terminal. THis switches from the GNU compilers to the INTEL compilers. Some of the examples we are using in class today use the INTEL compilers.

module swap GNU INTEL

This example uses a Makefile to help the user know what commands are needed to compile. You an view the Makefile by using the cat (catalog) command:

cat Makefile

We run the commands inside the Makefile using the make program. All you need to do is type make and the program will read the Makefile in the current directory and run it for you.

make

You should see some compiler commands on your screen. This means it is working. Check for errors and debug them.

Step 5: Run the Galaxsee example code

Assuming everything is working, the build command made a few examples. Lets run the examples from the command line:

./galaxsee

This should run the Pandemic code inside your virtual desktop window.


Congratulations, we're done!

If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class. If you are attending asynchronously, turn in your assignment using D2L.

Course Resources:

Written by Dr. Dirk Colbry, Michigan State University Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.