Description
Project description
Simply start oar job array on nef cluster
Install
pip install --upgrade OarLauncher
Usage
import treefiles as tf
from OarLauncher import ArrayJob
# Choose a directory where script and logs are dumped
out_dir = tf.Tree.new(__file__, "generated").dump(clean=True)
# Create parameters array
nb_jobs, data = 10, ArrayJob.Data
for i in range(nb_jobs):
data["simu_dir"].append(f"d_{i}")
data["infos"].append(f"this is job {i}")
# Path of the script that will be called by each job of the array
# Each line of data will be sent to this script as json command line argument
job_script = tf.curDirs(__file__, "job.py")
# Create the job array
jobs = ArrayJob(out_dir, data, job_script)
# Setup jobs conf
jobs.build_oar_command(minutes=100, queue=tf.oar.Queue.BESTEFFORT)
# Write scripts
jobs.dump()
# Start the job array (blocking operation)
shell_out = jobs.run()
print(shell_out)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
OarLauncher-0.1.8.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for OarLauncher-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ece4d8a5fea2fa5ce512d94bf46fee1de7c35550b7be52f6e3213f30e5ba13e4 |
|
MD5 | c14748d8b6bb88f043f67afbac30eceb |
|
BLAKE2b-256 | 12d82a2418f096d79a5d0b0d94d48250aa6155decbe758790b4d1484259b78a3 |