在計算的過程當中, 可能須要將某些任務暫停計算, 可使用 qalter 將其 "hold on"。node
man qalter -h | -h {u|s|o|n|U|O|S}... Available for qsub (only -h), qrsh, qalter and qresub (hold state is removed when not set explicitly). List of holds to place on a job, a task or some tasks of a job. `u' denotes a user hold. `s' denotes a system hold. `o' denotes a operator hold. `n' denotes no hold (requires manager privileges). As long as any hold other than `n' is assigned to the job the job is not eligible for execution. Holds can be released via qalter and qrls(1). In case of qalter this is supported by the following additional option speci‐ fiers for the -h switch: `U' removes a user hold. `S' removes a system hold. `O' removes a operator hold. Sun Grid Engine managers can assign and remove all hold types, Sun Grid Engine operators can assign and remove user and operator holds, and users can only assign or remove user holds. In the case of qsub only user holds can be placed on a job and thus only the first form of the option with the -h switch alone is allowed. As opposed to this, qalter requires the second form described above. An alternate means to assign hold is provided by the qhold(1) facility. If the job is a array job (see the -t option below), all tasks specified via -t are affected by the -h opera‐ tion simultaneously. Qalter allows changing this option even while the job executes. The modified parameter will only be in effect after a restart or migration of the job, however. If this option is specified with qsub or during the submission of a job in qmon then the parameter h with the value u will be passed to the defined JSV instances indicating that the job will be in user hold after the submission finishes.
如使用命令 qalter -h u jobid
將job暫停, 並在適合的時間從新啓動:ide
[testuser@login-node-1-0 ~]$qstat job-ID prior name user state submit/start at queue slots ja-task-ID ----------------------------------------------------------------------------------------------------------------- 3185678 0.00000 test.job testuser qw 02/12/2015 10:44:09 1 [testuser@login-node-1-0 ~]$ qalter -h u 3185678 modified hold of job 3185678 [testuser@login-node-1-0 ~]$ qstat job-ID prior name user state submit/start at queue slots ja-task-ID ----------------------------------------------------------------------------------------------------------------- 3185678 0.00000 test.job testuser hqw 02/12/2015 10:44:09
當須要從新運行該job時, 則能夠執行命令:ui
qalter -h U jobid
this