Simple jobs¶
Jobs and slots¶
HTCondor calls any single computing task a “job”, described by several attributes such as the executable and the input and output files. Each computing node (worker) of the cluster has a fixed amount of resources (CPUs, GPUs, memory, etc.) that can be split into “slots” where jobs run. As the job scheduler, HTCondor continuously reviews job attributes and slot availability, and matches jobs to slots.
Submitting a simple job¶
Simple jobs are jobs that use CPUs on a single machine. Other kinds of jobs are described on dedicated pages.
Detailed documentation is available at https://htcondor.readthedocs.io/en/latest/users-manual/submitting-a-job.html. The instructions below cover what you need to submit simple jobs.
Use a shared filesystem:
/lapp_datafor LAPP/LAPTh users/univ_homefor all other users
Specify an HTCondor Universe: a universe in HTCondor defines the execution environment of a job. HTCondor supports several universes, but the vanilla universe is intended for most programs and shell scripts. It should be used for all local jobs (except MPI jobs) submitted to the MUST cluster, as shown in the submit description file below.
Create a test.sh file with execution permissions (chmod u+x test.sh), for example:
#! /bin/sh
echo "HT-condor testprog01"
echo "I'm process id $$ on" `hostname`
echo "This is sent to standard error" 1>&2
date
echo "Running as binary $0" "$@"
echo "My name (argument 1) is $1"
echo "My sleep duration (argument 2) is $2"
sleep $2
echo "Sleep of $2 seconds finished. Exiting"
exit 0
Create the associated test.submit description file:
# To specify the name of the script to run
executable=test.sh
# The following line is mandatory and all the local jobs (except MPI jobs) should be part of the vanilla universe.
# For MPI jobs, please refer to the "Parallel jobs (MPI)" page of this documentation.
universe=vanilla
# To add parameters
arguments=Example.$(Cluster).$(Process) 100
output=results.output.$(Process)
error=results.error.$(Process)
log=results.log
# resource requests
request_cpus = 1
request_memory = 2GB
request_disk = 0
# To receive a notification e-mail
#notification=never
notification=complete
notify_user=<your_e-mail>
# To use your environment in the job
getenv = True
# To give some environment variables to the job
#environment = one=1;two=2;three="quotes have no 'special' meaning"
# To specify queue NUMBER with the number of jobs to be launched simultaneously
queue
Run the test: