Hackathon Menu

Welcome!

This workshop is part of the focus meeting "New horizons at the interface between computational astrophysics and big data". In this hackathon: "A first taste of MESA - an open source tool box for experiments in stellar astrophysics", we will explore some of the essentials of the open-source stellar evolution code MESA .

★ Created by: Lieke van Son, Aleksandra Olejak, and Shelley Cheng

Before getting started

This tutorial uses MESA version mesa-r24.03.1 together with MESA SDK x86_64-linux-23.7.3. We have pre-installed this for you on the Ilifu cluster. If you would like to install MESA on your own computer or cluster, you can find the installation instructions here.

To gain access to the cluster, please contact the Hack leaders for your username and password.
You can access the cluster either through the Binder environment, or through ssh. We recommend you run MESA through the ssh connection, an use the Binder environment to edit files and make plots.

How to use the Binder environment

Once you've received your personal username and password, you can access the Binder environment through the following link: http://ga2024-mesa-test2.idia.ac.za . The environment will look like the image below.

Example of what your binder environment will look like.

You have access to a few different tools, including a terminal, Jupyter notebook, and text editor. On the left, you can see the file structure of your home environment. When we ask you to copy-paste files, they will appear here, and you can edit them in the text editor of this environment.

You will be able to run MESA from the terminal in this environment, but pgstar (the native plotting tool from MESA) will not work! In order for pgstar plots to pop up, you will need to ssh into the Ilifu cluster directly.


How to SSH into the Ilifu cluster

SSH (Secure Shell) is used to securely send commands over a network. Use SSH to log into the Ilifu cluster and run MESA.

Unix/Linux/macOS

SSH is typically pre-installed. To check, open a terminal and type: ssh -V.
If SSH is not installed, you can install it using:

  • Debian/Ubuntu: sudo apt-get update && sudo apt-get install openssh-client
  • Fedora: sudo dnf install openssh-clients
  • macOS: Enable the SSH client in System Settings > Sharing and turn on Remote Login

Windows

Open Command Prompt or PowerShell and type: ssh -V to check for SSH.
If SSH is not installed, you can install it using:

  • Go to Settings > Apps > Optional Features > Add a feature > OpenSSH Client
  • Or using PowerShell: Add-WindowsCapability -Online -Name OpenSSH.Client*

To log in to the Ilifu cluster:

Open a terminal (or Command Prompt/PowerShell on Windows) and type:

ssh -Y USERNAME@MACINE_NAME.idia.ac.za
The -Y flag is used to enable X11 forwarding, which allows you to display graphics from the Ilifu cluster on your local machine.

Installing additional python packages

If you find yourself needing to install additional python packages into your team's shared virtualenv (located in /shared/venv) so that you can use it in the jupyter sessions, you can run the following command in a jupyter cell:
	!/shared/venv/bin/python -m pip install PACKAGE