Skip to content

Commit

Permalink
ongoing
Browse files Browse the repository at this point in the history
  • Loading branch information
KAUST-KSL committed Jan 5, 2018
1 parent a119b97 commit 52b1144
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 12 deletions.
67 changes: 63 additions & 4 deletions docs/use.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ cancel the execution of the workflow.
Submitting workflow
-------------------

*Decimate* **dbatch** command accepts the same `options`_ as the SLURM
*Decimate* **dbatch** command accepts the same options_ as the SLURM
**sbatch** command and extends it in two ways:

.. _options: https://slurm.schedmd.com/sbatch.html
.. _options:

- it transparently submits the user job within a fauit-tolerant framework
- it adds new options to manage the workflow execution if a problem occurs
Expand All @@ -31,5 +31,64 @@ Submitting workflow
How to submit
-------------

>>> print "This is a doctest block."
This is a doctest block.
Let *my_job.sh* be the following example job:

::

#!/bin/bash
#SBATCH -n 1
#SBATCH -t 0:05:00

echo job running on...
hostname
sleep 10

echo job DONE

If not done yet, we first load the *Decimate* module:

::

module load decimate

Then submission of jobs follows the same syntax than with the **sbatch** command:

::
dbatch --job-name=job_1 my_job.sh

::

[MSG ] submitting job job_1 (for 1) --> Job # job_1-0-1 <-depends-on None
[INFO ] launch-0!0:submitting job job_1 [1] --> Job # job_1-0-1 <-depends-on None
Submitted batch job job_1-0-1
[1] --> Job # job_1-0-1 <-depends-on None

::
dbatch --dependency=job_1 --job-name=job_2 my_job.sh
[INFO ] launch-0!0:Workflow has already run in this directory, trying to continue it
[MSG ] submitting job job_2 (for 1) --> Job # job_2-0-1 <-depends-on 218459
[INFO ] launch-0!0:submitting job job_2 [1] --> Job # job_2-0-1 <-depends-on 218459
Submitted batch job job_2-0-1
[1] --> Job # job_2-0-1 <-depends-on 218459

::
dstat

::
[MSG ] step job_1-0:1-1 SUCCESS SUCCESS: 100% FAILURE: 0% -> []
[MSG ] step job_2-0:1-1 RUNNING SUCCESS: 0% FAILURE: 0% -> []

::

dstat
[MSG ] CHECKING step : job_2-0 task 1
[INFO ] launch-0!0:no active job in the queue, changing all WAITING in ABORTED???
[MSG ] step job_1-0:1-1 SUCCESS SUCCESS: 100% FAILURE: 0% -> []
[MSG ] step job_2-0:1-1 SUCCESS SUCCESS: 100% FAILURE: 0% -> []


17 changes: 9 additions & 8 deletions module/decimate.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ set-alias dsa "decimate -sl"
set-alias de "decimate --explore "


set-alias se "dbatch --decimate --explore "
set-alias sb "dbatch"
set-alias sl "dbatch --decimate -l"
set-alias slog "dbatch --decimate -l"
set-alias ss "dbatch --decimate -s"
set-alias sstatus "dbatch --decimate -s"
set-alias ssa "dbatch --decimate -sa"
set-alias ssl "dbatch --decimate -sl"
set-alias de "dbatch --decimate --explore "
set-alias db "dbatch"
set-alias dl "dbatch --decimate -l"
set-alias dlog "dbatch --decimate -l"
set-alias ds "dbatch --decimate -s"
set-alias dstat "dbatch --decimate -s"
set-alias dkill "dbatch --decimate --kill"
set-alias dsa "dbatch --decimate -sa"
set-alias dsl "dbatch --decimate -sl"

prepend-path PYTHONPATH $DECIMATE_PATH
prepend-path PATH $prefix/bin
Expand Down
12 changes: 12 additions & 0 deletions tests/my_job.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#SBATCH -J yyy123
#SBATCH -p debug
#SBATCH -n 1
#SBATCH -t 0:01:00


echo job running on...
hostname
sleep 10

echo job DONE

0 comments on commit 52b1144

Please sign in to comment.