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 13.
Image from: https://phys.org/news/2018-08-astronomers-reveal-monster-star-forming-galaxies.html
Today we will practice what we have learned on Friday. As a reminder, here are the commands we used:
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".
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.
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.
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
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.
Assuming everything is working, the build command made a few examples. Lets run the examples from the command line:
././GalaxSee.cxx-mpi
This should run the GalaxSee code inside your virtual desktop window.
To simulate a 100 stars do:
././GalaxSee.cxx-mpi 100
To simulate a 100 stars that are 10 solar masses each do:
././GalaxSee.cxx-mpi 100 10
To simulate a 100 stars that are 10 solar masses each for 10000 timesteps do:
././GalaxSee.cxx-mpi 100 10 10000
To time a simulation of 100 stars that are 10 solar masses each for 10000 timesteps without vizualization do:
time ./GalaxSee.cxx-mpi 100 10 10000 0
✅ QUESTION: If you increase the number of stars by a factor of 2 how much does the compute time increase? Do a few increses by 2 to see the trend.
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.
Written by Dr. Dirk Colbry, Michigan State University
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.