Updated 2023-02-24

Run PLplot on the Cluster

Overview

  • PLplot is a library of subroutines that are often used to make scientific plots in compiled languages such as C, C++, D, Fortran, Ada, OCaml and Java. PLplot can also be used interactively by interpreted languages such as Octave, Python, Perl and Tcl.
  • This guide will cover how to run PLplot on the Cluster and display the generated plot.
  • You can find PLplot's homepage here.
  • You can see examples in all the different languages PLplot supports here.

Summary

  • In this guide we will run PLplot in python as an example. Using an interpreted language allows us to run PLplot interactively, but for the purposes of this guide, we will generate a 2D line plot with no interactive elements.
  • Since PLplot is a graphical application, we will need to run it through the Interactive Desktop on Phoenix OnDemand.

Walkthrough: Run PLplot on the Cluster

  • This walkthrough will use Python and PLplot to generate a 2D line plot that will be viewed through VNC.
  • The code used in this example comes from PLplot's GitHub repo.
  • plplotTest.py can be found here
  • plplotTestViewer.py can be found here
  • You can transfer the file to your account on the cluster to follow along. The file transfer guide may be helpful.

Set up Interactive Desktop on Phoenix OnDemand

  • In order to access Phoenix OnDemand you must be connected to the GT VPN. If you do not already have the VPN set up, visit Configure the GT VPN
  • Once connected to the VPN you can access the application at Phoenix OnDemand.
  • Choose the Slurm Interactive Apps tab and select Interactive Desktop to setup and launch.
  • Setting up Interactive Desktop:
    • Charge Account: gts-<PI username> ("phx-pace-staff" works for trial. Required.)
    • Quality of Service: inferno
    • Node Type: GPU Tesla V100-16B or GPU Tesla V100-32B
    • Nodes: 1
    • Cores Per Node: 8 (Number of cores (CPUs) per node. Max: 24 cores per node.)
    • GPUs Per Node: 1
    • Memery Per Crore (GB): Leave blank if unsure. Total memory for job is: nodes × cores × memory per core
    • Number of hours: 1
  • After the preceding details are entered, clik the Launch button
  • Once the Launch Interactive Desktop is an available option, click the button to open a Phoenix OnDemand Interactive Desktop to use for PlPlot

Part 2: Load and Start PLplot on VNC

  • Open terminal in the Interactive Desktop by clicking top left Activities > search for terminal
  • All commands here on will be typed in the terminal
  • You will need to load the gcc, plplot module and the Python 3.9.12 module.
  • You can find which versions are available for any module with module avail [software].
  • Run the following commands to load the necessary modules:
    • module load gcc/10.3.0
    • module load python/3.9.12
    • module load plplot/5.9.9
  • Navigate to the directory containing the plplotTest.py and plplotTestViewer.py files which create and display the graph, respectively.
  • View the graph with python plplotTestViewer.py.
  • You will be prompted with the following: Screenshot
  • Enter 1
  • You should see a display that looks like the following:

Screenshot

  • Congratulations! You successfully ran PLplot on the cluster.