Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
adfc4031
Commit
adfc4031
authored
2 years ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
fix batch atrm / kill scripts
parent
d80cf230
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
parametricJob.py
+7
-7
7 additions, 7 deletions
parametricJob.py
with
7 additions
and
7 deletions
parametricJob.py
+
7
−
7
View file @
adfc4031
...
...
@@ -326,24 +326,24 @@ class ParametricJob(PRMSet):
if
m
:
#cfgFileName, cfgFileExtension = os.path.splitext(self.cfgfile)
#os.system("cp %s %s%s%s"%(self.cfgfile, cfgFileName, batchId, cfgFileExtension))
self
.
atrmScript
(
batchId
)
self
.
atrmScript
(
batchId
,
launchId
)
print
(
"
\t
use
'
atq
'
and find job number %s to check the status of your job
"
%
batchId
)
print
(
"
\t\t
-
'
a
'
means waiting in the queue
'
a
'"
)
print
(
"
\t\t
-
'
=
'
means running
"
)
print
(
"
\t
use
'
atrm %s to kill the job
"
%
batchId
)
print
(
"
\t\t
or
'
atrm%s.py
'
to kill the job
"
%
bat
chId
)
print
(
"
\t\t
or
'
atrm%s.py
'
to kill the job
"
%
laun
chId
)
# to avoid closing the gui
if
not
(
re
.
match
(
r
'
(.+)Gui.pyw
'
,
sys
.
argv
[
0
])):
sys
.
exit
()
def
atrmScript
(
self
,
pi
d
):
filename
=
"
atrm%s.py
"
%
pi
d
def
atrmScript
(
self
,
batchId
,
launchI
d
):
filename
=
"
atrm%s.py
"
%
launchI
d
file
=
open
(
filename
,
"
w
"
)
file
.
write
(
"
#!/usr/bin/env python
\n
"
)
file
.
write
(
"
import os
\n
"
)
file
.
write
(
"
os.system(
'
atrm %s
'
)
\n
"
%
pi
d
)
file
.
write
(
"
if os.path.isfile(
'
kill%s.py
'
):
\n
"
%
pi
d
)
file
.
write
(
"
\t
execfile(
'
kill%s.py
'
)
\n
"
%
pi
d
)
file
.
write
(
"
os.system(
'
atrm %s
'
)
\n
"
%
batchI
d
)
file
.
write
(
"
if os.path.isfile(
'
kill%s.py
'
):
\n
"
%
launchI
d
)
file
.
write
(
"
\t
execfile(
'
kill%s.py
'
)
\n
"
%
launchI
d
)
file
.
close
()
os
.
chmod
(
filename
,
0o700
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment