Commit 19414570 authored by Alex Waite's avatar Alex Waite

Merge branch 'master' into 'master'

add python example

See merge request !1
parents ab45cb56 7678cd15
......@@ -8,4 +8,5 @@ If you see something that is missing or should be improved, please contribute!
| name | description |
| ---- | ----------- |
| [matlab](matlab/) | |
| [python](python/) | |
# Python
The `python.submit` file submits one job that calls `analyze_subject.py` ---
which simply prints out the subject ID that is passed to it.
## Prerequisites
This example assumes that it is located in `~/htcondor-templates/python`. If you
have cloned it elsewhere, adjust the submit file as necessary.
Otherwise, this example is entirely self contained.
import sys
def analyze_subject(sub):
print(f"Beginning analysis of: {sub}")
print("...")
print("Done")
subject = sys.argv[1]
analyze_subject(subject)
# The environment
universe = vanilla
getenv = True
request_cpus = 1
request_memory = 5G
# Execution
initialdir = $ENV(HOME)/htcondor-templates/python
executable = /usr/bin/python3
transfer_executable = False
# Job
arguments = analyze_subject.py sub-127
log = $ENV(HOME)/htcondor-templates/python/logs/$(Cluster).$(Process).log
output = $ENV(HOME)/htcondor-templates/python/logs/$(Cluster).$(Process).out
error = $ENV(HOME)/htcondor-templates/python/logs/$(Cluster).$(Process).err
Queue
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment