Skip to content

Running BEAM on BYU Supercomputer

Greg Macfarlane edited this page Jun 23, 2021 · 2 revisions

Running BEAM on the SuperComputer:

To run BEAM with a scenario on the SuperComputer, follow these steps:

  1. Make sure you have an account with the BYU Research Computing Department. https://rc.byu.edu/ If they ask for a sponsor, find the netID of your professor you're researching with. Set up your account with a password and authentication keys.

  2. You will need to build BEAM as a JAR through Gradle. See down below. You will not be able to use IntelliJ on the SuperComputer, so you will need to use a FatJar, which includes all packages in the JAR.

  3. You will need a few extra files: the common folder (test/input/common), the dtd folder (test/input/dtd) and the scenario folder (test/input/beamville).

  4. Your files should be positioned like this:

    • folder name
      • test
        • input
          • beamville (or the scenario you're running)
          • common
          • dtd
      • beam jar
  5. Once you have your files positioned, secure-copy your files to the SuperComputer. Open a terminal like Windows Powershell or a Linux Terminal:

    • Navigate to your file that contains the jar and test folder. Hint: "cd .\folder"
    • Use the command "scp -r ./ your_username@ssh.rc.byu.edu:/fslhome/your_username"
    • Type in your password and verification code according to the terminal prompts.
  6. Login to the SuperComputer.

    • Go to https://viz.rc.byu.edu:3443/
      • This is a desktop interface for the SuperComputer.
    • Start a new session by clicking on the blue + button on the left side of the screen.
    • Click "Cinnamon" and "Launch".
    • You're now viewing a graphical interface for the SuperComputer you're going to run scenarios on.
  7. Write the Slurm Script to run your Jar.

    • Slurm is how your job gets allocated resources. You need to build a .sh script for it.
    • In your Home Directory in the SuperComputer, type vim nameOfScript.sh
    • For the first half of your script, go to https://rc.byu.edu/documentation/slurm/script-generator
      • In the parameters section, put in what resources you will need.
      • Example: image
      • This will generate the first half of your script. Copy and paste it into the .sh file you created. Be sure to familiarize yourself with vim commands.
    • For the second half of your script, you will need to:
      1. Load some modules. Type on separate lines:
        • module purge
        • module load java
        • module list
      2. Type the command to get into your scenario's file directory
        • Example: cd beamville
        • Otherwise, your script won't be able to access the jar.
      3. Type the command "java -jar -Xmx8g .\build\libs\beam-0.8.0-all.jar --config test/input/beamville/beam.conf"
        • Xmx8g = 8 GB. Bigger scenarios will 100% need more RAM.
        • --config is directed at the beamville config. Adjust for your scenario's config.
  8. Run the script with some additional commands to view log output in the terminal.

    • sbatch shell_script.sh // This runs your script
      • You will see "Submitted batch job ##########"
    • tail -f slurm-######## //This puts your script log into the terminal
      • Make sure the slurm file that you put in this command aligns with the batch job ID you just saw.
  9. Zip the created outputfiles.

    • Use the command "7z a outputs.7z output/*"

TODO: Using RClone to mount a Box Drive on your node so you don't have to SCP massive output files.