#NEWLINE# def _get_slurm_cmds( args ) : #NEWLINE# #INDENT# cmds = [ '--cpus-per-task=1' , '--mem=2000' , ( '-p %s' % args . queue ) ] #NEWLINE# timelimit = ( '0' if ( args . queue in AWS_QUEUES ) else '1-00:00:00' ) #NEWLINE# for r in args . resources : #NEWLINE# #INDENT# if r . startswith ( 'timelimit' ) : #NEWLINE# #INDENT# ( _ , timelimit ) = r . split ( '=' ) #NEWLINE# #UNINDENT# #UNINDENT# cmds += [ ( '-t %s' % timelimit ) ] #NEWLINE# if args . tag : #NEWLINE# #INDENT# cmds += [ ( '-J %s-submit' % args . tag ) ] #NEWLINE# #UNINDENT# return '\n' . join ( ( ( '#SBATCH %s' % x ) for x in cmds ) )