qdo (1930:d7836f59a02c) qdo (1940:6f54e570db58)
1#! /usr/bin/env python
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 46 unchanged lines hidden (view full) ---

55 help='command execution timeout', default=600*60)
56
57(options, cmd) = optparser.parse_args()
58
59if cmd == []:
60 print >>sys.stderr, "%s: missing command" % progname
61 sys.exit(1)
62
1#! /usr/bin/env python
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 46 unchanged lines hidden (view full) ---

55 help='command execution timeout', default=600*60)
56
57(options, cmd) = optparser.parse_args()
58
59if cmd == []:
60 print >>sys.stderr, "%s: missing command" % progname
61 sys.exit(1)
62
63if not options.job_name:
64 options.job_name = cmd[0]
63# If we want to do this, need to add check here to make sure cmd[0] is
64# a valid PBS job name, else qsub will die on us.
65#
66#if not options.job_name:
67# options.job_name = cmd[0]
65
66cwd = os.getcwd()
67
68# Deal with systems where /n is a symlink to /.automount
69if cwd.startswith('/.automount/'):
70 cwd = cwd.replace('/.automount/', '/n/', 1)
71
72if not cwd.startswith('/n/poolfs/'):

--- 66 unchanged lines hidden (view full) ---

139# Hack to do link on poolfs... disabled for now since
140# compiler/linker/library versioning problems between poolfs and
141# nodes. May never work since poolfs is x86-64 and nodes are 32-bit.
142if False and len(cmd) > 50:
143 shell_cmd = 'ssh -t poolfs /bin/sh -l'
144 print "%s: running %s on poolfs" % (progname, cmd[0])
145else:
146 shell_cmd = 'qsub -I -S /bin/sh'
68
69cwd = os.getcwd()
70
71# Deal with systems where /n is a symlink to /.automount
72if cwd.startswith('/.automount/'):
73 cwd = cwd.replace('/.automount/', '/n/', 1)
74
75if not cwd.startswith('/n/poolfs/'):

--- 66 unchanged lines hidden (view full) ---

142# Hack to do link on poolfs... disabled for now since
143# compiler/linker/library versioning problems between poolfs and
144# nodes. May never work since poolfs is x86-64 and nodes are 32-bit.
145if False and len(cmd) > 50:
146 shell_cmd = 'ssh -t poolfs /bin/sh -l'
147 print "%s: running %s on poolfs" % (progname, cmd[0])
148else:
149 shell_cmd = 'qsub -I -S /bin/sh'
147 shell_cmd += ' -N "%s"' % options.job_name
150 if options.job_name:
151 shell_cmd += ' -N "%s"' % options.job_name
148 if options.dest_queue:
149 shell_cmd += ' -q ' + options.dest_queue
150
151shell = Shell(shell_cmd)
152
153try:
154 # chdir to cwd
155 (output, status) = shell.do_command('cd ' + cwd)

--- 60 unchanged lines hidden ---
152 if options.dest_queue:
153 shell_cmd += ' -q ' + options.dest_queue
154
155shell = Shell(shell_cmd)
156
157try:
158 # chdir to cwd
159 (output, status) = shell.do_command('cd ' + cwd)

--- 60 unchanged lines hidden ---