Skip to content
Snippets Groups Projects
Commit e063c00d authored by David Verelst's avatar David Verelst
Browse files

launch.py: tweak default values, add tsleep_short to command line options

parent 35e782d9
No related branches found
No related tags found
No related merge requests found
...@@ -414,7 +414,7 @@ class Scheduler: ...@@ -414,7 +414,7 @@ class Scheduler:
self.cpu_user_queue = cpu_user_queue self.cpu_user_queue = cpu_user_queue
self.tsleep = tsleep self.tsleep = tsleep
self.dryrun = dryrun self.dryrun = dryrun
self.tsleep_short = 0.1 self.tsleep_short = 1.0
self.c0, self.c1, self.c2 = 8, 8, 17 self.c0, self.c1, self.c2 = 8, 8, 17
self.logfile = logfile self.logfile = logfile
self.qsub_cmd = qsub_cmd self.qsub_cmd = qsub_cmd
...@@ -851,8 +851,12 @@ if __name__ == '__main__': ...@@ -851,8 +851,12 @@ if __name__ == '__main__':
parser.add_argument('--dry', action='store_true', dest='dry', default=False, parser.add_argument('--dry', action='store_true', dest='dry', default=False,
help='dry run: do not alter pbs files, do not launch') help='dry run: do not alter pbs files, do not launch')
parser.add_argument('--tsleep', action='store', dest='tsleep', type='float', parser.add_argument('--tsleep', action='store', dest='tsleep', type='float',
default=5.00, help='Sleep time [s] after qsub command.' default=5.00, help='Sleep time [s] when cluster is too '
' Default=5 seconds') 'bussy to launch new jobs. Default=5 seconds')
parser.add_argument('--tsleep_short', action='store', dest='tsleep_short',
type='float', default=0.5, help='Sleep time [s] '
'between between successive job launches. Default=0.5 '
'seconds.')
parser.add_argument('--logfile', action='store', dest='logfile', parser.add_argument('--logfile', action='store', dest='logfile',
default=None, help='Save output to file.') default=None, help='Save output to file.')
parser.add_argument('-c', '--cache', action='store_true', dest='cache', parser.add_argument('-c', '--cache', action='store_true', dest='cache',
...@@ -864,11 +868,11 @@ if __name__ == '__main__': ...@@ -864,11 +868,11 @@ if __name__ == '__main__':
'room for others on the cluster, but might mean less ' 'room for others on the cluster, but might mean less '
'cpus available for you. Default=48') 'cpus available for you. Default=48')
parser.add_argument('--cpu_user_queue', action='store', dest='cpu_user_queue', parser.add_argument('--cpu_user_queue', action='store', dest='cpu_user_queue',
type='int', default=500, help='No more jobs will be ' type='int', default=5, help='No more jobs will be '
'launched after having cpu_user_queue number of jobs ' 'launched after having cpu_user_queue number of jobs '
'in the queue. This prevents users from filling the ' 'in the queue. This prevents users from filling the '
'queue, while still allowing to aim for a high cpu_free ' 'queue, while still allowing to aim for a high cpu_free '
'target. Default=500') 'target. Default=5')
parser.add_argument('--qsub_cmd', action='store', dest='qsub_cmd', parser.add_argument('--qsub_cmd', action='store', dest='qsub_cmd',
default='qsub %s', default='qsub %s',
help='Is set automatically by --node flag') help='Is set automatically by --node flag')
...@@ -964,6 +968,7 @@ if __name__ == '__main__': ...@@ -964,6 +968,7 @@ if __name__ == '__main__':
cache=options.cache, cpu_free=options.cpu_free, cache=options.cache, cpu_free=options.cpu_free,
qsub_cmd=options.qsub_cmd, sort=options.sort, qsub_cmd=options.qsub_cmd, sort=options.sort,
debug=options.debug, cpu_user_queue=options.cpu_user_queue) debug=options.debug, cpu_user_queue=options.cpu_user_queue)
ss.tsleep_short = options.tsleep_short
if options.crontab: if options.crontab:
if not os.path.exists(os.path.join(os.getcwd(), 'launch_crontab.sh')): if not os.path.exists(os.path.join(os.getcwd(), 'launch_crontab.sh')):
write_crontab(every_min=options.every_min) write_crontab(every_min=options.every_min)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment