File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,28 @@ class MoabSpawner(TorqueSpawner):
483483 state_running_re = Unicode (r'State="Running"' ).tag (config = True )
484484 state_exechost_re = Unicode (r'AllocNodeList="([^\r\n\t\f :"]*)' ).tag (config = True )
485485
486+ class PBSSpawner (TorqueSpawner ):
487+ batch_script = Unicode ("""#!/bin/sh
488+ {% if queue or host %}#PBS -q {% if queue %}{{queue}}{% endif %}\
489+ {% if host %}@{{host}}{% endif %}{% endif %}
490+ #PBS -l walltime={{runtime}}
491+ #PBS -l select=1:ncpus={{nprocs}}:mem={{memory}}
492+ #PBS -N jupyterhub-singleuser
493+ #PBS -v {{keepvars}}
494+ {% if options %}#PBS {{options}}{% endif %}
495+
496+ {{prologue}}
497+ {{cmd}}
498+ {{epilogue}}
499+ """ ).tag (config = True )
500+
501+ # outputs job data XML string
502+ batch_query_cmd = Unicode ('qstat -fx {job_id}' ).tag (config = True )
503+
504+ state_pending_re = Unicode (r'job_state = [QH]' ).tag (config = True )
505+ state_running_re = Unicode (r'job_state = R' ).tag (config = True )
506+ state_exechost_re = Unicode (r'exec_host = ([\w_-]+)/' ).tag (config = True )
507+
486508class UserEnvMixin :
487509 """Mixin class that computes values for USER, SHELL and HOME in the environment passed to
488510 the job submission subprocess in case the batch system needs these for the batch script."""
You can’t perform that action at this time.
0 commit comments