Create and submit a job

Updated at:

This guide shows you how to submit a PBS job on an E-HPC cluster. The example uses GROMACS to run a molecular dynamics simulation of water molecule motion across 4 MPI processes on a GPU-equipped compute node.

Prerequisites

Before you begin, make sure you have:

  • An E-HPC cluster named gromacs-test with at least one compute node (8 vCPUs, 1 P100 GPU)

  • A cluster user named gmx.test. See Create a user if you haven't created one

Prepare the simulation data

Connect to the cluster via SSH and download the example dataset.

  1. Log on to the E-HPC console.

  2. In the top navigation bar, select a region.

  3. On the Cluster page, find gromacs-test and click Connect.

  4. In the Connect panel, enter the username, password, and port for gromacs-test, then click Connect via SSH.

  5. Download and extract the water molecule simulation dataset:

    Note

    This dataset simulates the motion of water molecules in a confined space at a fixed temperature. The job runs from the 0096 subdirectory.

    cd /home/gmx.test
    wget https://public-ehpc-package.oss-cn-hangzhou.aliyuncs.com/water_GMX50_bare.tar.gz
    tar xzvf water_GMX50_bare.tar.gz
    chown -R gmx.test water-cut1.0_GMX50_bare
    chgrp -R users water-cut1.0_GMX50_bare

Submit the job

  1. On the Cluster page of the E-HPC console, find gromacs-test and click Connect.

  2. On the Job page, click the Submit Job tab.

  3. Set Job Template to pbs demo.

  4. Replace the job script with the following content, then click Submit Job:

    Note

    This example submits the job as user gmx.test on compute node compute000 (8 vCPUs, 1 P100 GPU). Adjust ncpus and mpiprocs to match your node configuration.

    #!/bin/sh
    #PBS -j oe                          # Merge stdout and stderr into one output file
    #PBS -l select=1:ncpus=8:mpiprocs=4 # Request 1 node with 8 CPUs; run 4 MPI processes
    #PBS -q workq                       # Submit to the workq queue
    
    export MODULEPATH=/opt/ehpcmodulefiles/  # Path where the module command searches for modules
    module load gromacs-gpu/2018.1
    module load openmpi/3.0.0
    module load cuda-toolkit/9.0
    export OMP_NUM_THREADS=1
    
    cd /home/gmx.test/water-cut1.0_GMX50_bare/0096
    
    # Preprocess input files and generate the TPR run input file
    /opt/gromacs-gpu/2018.1/bin/gmx_mpi grompp -f pme.mdp -c conf.gro -p topol.top -o topol_pme.tpr
    
    # Run the simulation: 4 MPI processes, 1 OpenMP thread each, 100,000 steps
    mpirun -np 4 /opt/gromacs-gpu/2018.1/bin/gmx_mpi mdrun -ntomp 1 -nsteps 100000 -pin on -s topol_pme.tpr

Verify the result

After submission, the job appears on the Job page.

To check status and details, find the job and click Details in the Actions column. The Job Details panel shows the job name, job ID, start time, last updated time, and runtime information.

What's next

View the performance and result of a job