-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from spencerkclark/moab
Add MoabCluster
- Loading branch information
Showing
4 changed files
with
68 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from .core import docstrings | ||
from .pbs import PBSCluster | ||
|
||
|
||
class MoabCluster(PBSCluster): | ||
__doc__ = docstrings.with_indents("""Launch Dask on a Moab cluster | ||
Parameters | ||
---------- | ||
queue : str | ||
Destination queue for each worker job. Passed to `#PBS -q` option. | ||
project : str | ||
Accounting string associated with each worker job. Passed to | ||
`#PBS -A` option. | ||
resource_spec : str | ||
Request resources and specify job placement. Passed to `#PBS -l` | ||
option. | ||
walltime : str | ||
Walltime for each worker job. | ||
job_extra : list | ||
List of other PBS options, for example -j oe. Each option will be | ||
prepended with the #PBS prefix. | ||
%(JobQueueCluster.parameters)s | ||
Examples | ||
-------- | ||
>>> import os | ||
>>> from dask_jobqueue import MoabCluster | ||
>>> cluster = MoabCluster(processes=6, threads=1, project='gfdl_m', | ||
memory='16G', resource_spec='96G', | ||
job_extra=['-d /home/First.Last', '-M none'], | ||
local_directory=os.getenv('TMPDIR', '/tmp')) | ||
>>> cluster.start_workers(10) # this may take a few seconds to launch | ||
>>> from dask.distributed import Client | ||
>>> client = Client(cluster) | ||
This also works with adaptive clusters. This automatically launches and | ||
kill workers based on load. | ||
>>> cluster.adapt() | ||
""", 4) | ||
submit_command = 'msub' | ||
cancel_command = 'canceljob' | ||
|
||
def _job_id_from_submit_output(self, out): | ||
return out.strip() |
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ API | |
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
MoabCluster | ||
PBSCluster | ||
SLURMCluster | ||
SGECluster |
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