-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI improvement and more documentation
- Loading branch information
Showing
5 changed files
with
118 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,32 @@ | ||
# psub | ||
Submit array jobs without all the suffering | ||
Submit array jobs without all the suffering. | ||
|
||
Stands for petko-submit, OG ernstlab member who came up with the idea. | ||
psub provides an intutitive way to submit array jobs on a SGE cluster (particularly UCLA's Hoffman2). Instead of trying to write scripts that generate scripts that in turn gets submitted to the scheduler or dealing with environmental variables, you can do this with psub and forget about the rest: | ||
|
||
## New API (alpha): | ||
|
||
There's a new (unstable) API that allows submitting jobs directly in Python. | ||
|
||
## Installation: | ||
|
||
Must be installed under ~/utils like this: | ||
``` | ||
mkdir ~/utils; cd ~/utils | ||
git clone [email protected]:udincer/psub.git | ||
psub --mem 4G --time 12:00:00 "./my_script.py -p {} {} ::: p1 p2 p3 ::: arg1 arg2" | ||
``` | ||
|
||
Add alias: | ||
This will submit a job array with 6 jobs for each combination of `arg` and `p` and request 4 GB of memory and 12 hours from the scheduler: | ||
``` | ||
# Optional: add psub as an alias | ||
# Add the following to .bashrc | ||
alias psub='/u/home/d/<your_username>/utils/psub/psub_main.sh ' | ||
./my_script.py -p p1 arg1 | ||
./my_script.py -p p1 arg2 | ||
./my_script.py -p p2 arg1 | ||
./my_script.py -p p2 arg2 | ||
./my_script.py -p p3 arg1 | ||
./my_script.py -p p3 arg2 | ||
``` | ||
|
||
## How to use: | ||
psub keeps all stdouts and stderrs in a nice tidy directory for each job array. | ||
|
||
See `psub --help` for all features. | ||
|
||
psub is still in _alpha_, there will be bugs. | ||
|
||
## Installation: | ||
|
||
Make script containing each command you want to run in parallel in exactly one line: | ||
``` | ||
# the_jobs.sh | ||
python run_analysis.py theta1 | ||
python run_analysis.py theta2 | ||
python run_analysis.py theta3 | ||
python run_analysis.py theta4 | ||
python run_analysis.py theta5 | ||
pip install psub | ||
``` | ||
|
||
Run psub like this, will batch 3 commands to one SGE job (for short jobs): | ||
``` | ||
psub the_jobs.py 3 | ||
``` | ||
psub stands for petko-submit, OG ernstlab member who came up with the core idea. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="psub", | ||
version="0.0.4_alpha", | ||
version="0.0.5_alpha", | ||
author="Tev Dincer", | ||
author_email="[email protected]", | ||
description="Submit array jobs to a SGE cluster without all the suffering", | ||
|