qsub


How to specify a fixed job name for jobs submitted by qsub


I use -N option to specify the name for the job when submitting through qsub. The qsub, however, adds some numeric string after thejob name as described in the man page:
By default the file name for standard output has the
form job_name.ojob_id and job_name.ojob_id.task_id for
array job tasks (see -t option below).
Therefore, whenever I submit a new job with same job name, a new suffix .ojob_id is added to the job name and a new output file is created.
What I trying to achieve is to have same output file each time a job is submitted through qsub. How can I do that? I have to run a job several time and I want the output from a run to overwrite the output file generated in the previous run. How can I achieve that?
See the example below:
First time command is given to run script hello_world to output in log_hello_world:
qsub -cwd -N log_hello_world hello_world.sh
It creates two output files:
log_hello_world.e7584345
log_hello_world.o7584345
Second time the same command is given: It creates two more output files
log_hello_world.e7584366
log_hello_world.o7584366
What can I do to get the output in just one file log_hello_world.
I was able to resolve this issue by using options -o and -e to save the log and the error files respectively. With these options, the log and the errors from the job are written into same file every time from this command.
qsub -cwd -N job_hello_world -o log.hello_world -e error.hello_world hello_world.sh

Related Links

SGE Issue qstat qsub not working
Checking output from qsub : Sungrid cluster
qsub: get last job id submitted
Job summited with qsub does not write output and enters E status
Qsub job runs but doesn't write to file
Qsub job not running - possible issue in submission script
How do I know where my qsub job is running/being written
Pipe Symbol in qsub Job name
SLURM how to qsub a task when another task is finished?
Can multiple qsub submissions read the same group of files?
SGE faild to submit job, attribute is not a memory value
How do you submit a job on multiple queues with Torque?
Maui - preventing jobs from running on the same node
qsub: What is the standard when to get occasional updates on a submitted job?
Submitting a job to qsub generates an error, “Warning: no access to tty”
Running samtools from a qsub

Categories

HOME
sql-server-2008
elixir
rotation
freepascal
vs-team-services
aem
tomcat7
azureservicebus
jrebel
pygame
window
wordpress-theming
ssms-2016
r-lavaan
grub2
google-people
linq-to-sql
ip-camera
aws-cognito
distance
onsen-ui
image-quality
cortex-m3
autofill
spring-insight
m2e
spreedly
ocs
ksoap
autocompletetextview
equivalence
cross-entropy
exiftool
nsexception
median
lftp
encapsulation
estimation
sapui
jenkins-jira-trigger
maintenance
slidesjs
uicollectionviewlayout
castle-dynamicproxy
gmt
emgu
laravel-query-builder
inject
gradle-script-kotlin
audioqueue
easing
gameanalytics
linkageerror
ng2-material
codesign
logcat
jenkins-scriptler
python-winshell
built-in
playscape
apache-mina
httpie
subversion-edge
es2015
uptodate
low-level
kallithea
belongs-to
formvalidation-plugin
funq
csplit
map-force
osx-snow-leopard
fortran77
gdataxml
android-4.0
mvccontrib
n-layer
objective-c-protocol
supersized
shared-objects
coff
qtembedded
requestfactory
mvccontrib-grid
webrat
web-statistics

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App