Rate This Document
Findability
Accuracy
Completeness
Readability

Writing a Script

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Write a script.
    1. Open the script.

      vi test.slurm

    2. Press i to enter the insert mode and add the following content:
      #!/bin/bash
      #SBATCH -J slurmtest
      #SBATCH -o %J.out
      #SBATCH -e %J.err
      #SBATCH -N 1
      #SBATCH --exclusive
      #SBATCH -p X86
      
      for x in {0..10}
      do
      echo "This is a slurmtest for `arch`!"
      sleep 5
      done
    3. Press Esc, type :wq!, and press Enter to save the script and exit.