Submit jobs to your E-HPC cluster using the console, the command-line interface (CLI), or E-HPC Portal.
Prerequisites
Before you begin, make sure that you have:
-
A cluster and cluster nodes in the Running state
-
A cluster user (see Manage users)
-
(Console only) A job file prepared on the cluster
-
(CLI only) A cluster scheduler that is Slurm or OpenPBS
Submit a job using the console
-
Go to the Cluster Details page.
-
Log on to the E-HPC console.
-
In the left part of the top navigation bar, select a region.
-
In the left-side navigation pane, click Cluster.
-
On the Cluster List page, find the cluster you want to manage and click its cluster ID.
-
-
In the left-side navigation pane, click Job Management.
-
Click Create Job and configure the following parameters.
Basic settings
Parameter Required Description Job Name Yes A name for the job. Scheduler Queue Yes The scheduler queue to run the job in. Start Job Array No Enables the job array feature. Set Minimum Value (start index), Maximum Value (end index), and Step Size (increment between indexes; default: 1). Job Priority No An integer greater than 0. A higher value means higher priority. Jobs with higher priority run first when the cluster scheduling policy is set to prioritize by job priority. Run Command Yes The command or script to run. Use a relative path for a script file (e.g., ./job.pbs), or prefix a text command with--(e.g.,--/opt/mpi/bin/mpirun /home/test/job.pbs).Nodes No Number of compute nodes to allocate for the job. Requested CPUs No vCPUs per node. Allocate enough resources for the job — insufficient resources may cause the job to fail. Requested Memory No Advanced settings
Parameter Required Description Stdout Path No File path for stdout output. The cluster user must have write permission on this path. If left blank, the scheduler generates the output file automatically. Stderr Path No Environment Variables No Runtime variables passed to the job, accessible via environment variables in the executable. -
Click Confirm Create.
Submit a job using the CLI
-
Connect to the logon node of your cluster (see Connect to a cluster).
-
Write a job script and submit it. The commands differ by scheduler.
In auto scaling scenarios, E-HPC does not support memory-based scaling. Specify the number of required vCPUs when submitting a job.
Submit a job with OpenPBS
A PBS job script has three parts: the shell interpreter line, #PBS directives that set resource requirements and options, and the commands to run.
-
Create a job script file.
vim jobscript.pbsThe following is a sample
jobscript.pbs. For the full list of PBS directives, see the OpenPBS documentation.#!/bin/sh # PBS -l ncpus=4,mem=1gb # Computing resources: CPUs and memory # PBS -l walltime=00:10:00 # Maximum run time (HH:MM:SS) # PBS -o test_pbs.log # stdout output file # PBS -j oe # Merge stderr into the stdout file cd $HOME test.py -i test.data -
Submit the job.
qsub jobscript.pbs
Submit a job with Slurm
A Slurm job script has three parts: the shell interpreter line, #SBATCH directives that set resource requirements and options, and the commands to run.
-
Create a job script file.
vim jobscript.slurmThe following is a sample
jobscript.slurm. For the full list of Slurm directives, see the Slurm documentation.#!/bin/sh # SBATCH --job-name=slurm-quickstart # Job name # SBATCH --output=test_slurm.log # stdout output file # SBATCH --nodes=1 # Number of nodes # SBATCH --ntasks=1 # Number of tasks # SBATCH --cpus-per-task=1 # vCPUs per task # SBATCH --time=00:10:00 # Maximum run time (HH:MM:SS) # SBATCH --mem-per-cpu=1024 # Memory per vCPU (MB) cd $HOME test.py test.data -
Submit the job.
sbatch jobscript.slurm
Submit a job using E-HPC Portal
For steps on submitting jobs through E-HPC Portal, see Submit jobs by using submitter.
What's next
-
Call the CreateJob API operation to submit jobs programmatically.