Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gridtk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
software
gridtk
Commits
931decce
Commit
931decce
authored
11 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Improved behavior when multiple jobs are re-submitted at the same time.
parent
4a1fbb81
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
gridtk/models.py
+2
-2
2 additions, 2 deletions
gridtk/models.py
gridtk/script/jman.py
+10
-2
10 additions, 2 deletions
gridtk/script/jman.py
gridtk/sge.py
+2
-1
2 additions, 1 deletion
gridtk/sge.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
15 additions
and
6 deletions
gridtk/models.py
+
2
−
2
View file @
931decce
...
...
@@ -292,9 +292,9 @@ class Job(Base):
deps
=
str
(
sorted
(
list
(
set
([
dep
.
unique
for
dep
in
self
.
get_jobs_we_wait_for
()]))))
if
dependencies
<
len
(
deps
):
deps
=
deps
[:
dependencies
-
3
]
+
'
...
'
return
format
.
format
(
self
.
unique
,
job_id
,
queue
,
status
,
self
.
name
,
deps
,
command_line
)
return
format
.
format
(
self
.
unique
,
job_id
,
queue
[:
12
]
,
status
,
self
.
name
,
deps
,
command_line
)
else
:
return
format
.
format
(
self
.
unique
,
job_id
,
queue
,
status
,
self
.
name
,
command_line
)
return
format
.
format
(
self
.
unique
,
job_id
,
queue
[:
12
]
,
status
,
self
.
name
,
command_line
)
...
...
This diff is collapsed.
Click to expand it.
gridtk/script/jman.py
+
10
−
2
View file @
931decce
...
...
@@ -90,6 +90,14 @@ def get_ids(jobs):
return
indexes
def
get_memfree
(
memory
,
parallel
):
"""
Computes the memory required for the memfree field.
"""
number
=
int
(
memory
.
rstrip
(
string
.
ascii_letters
))
memtype
=
memory
.
lstrip
(
string
.
digits
)
if
not
memtype
:
memtype
=
"
G
"
return
"
%d%s
"
%
(
number
*
parallel
,
memtype
)
def
submit
(
args
):
"""
Submission command
"""
...
...
@@ -115,7 +123,7 @@ def submit(args):
if
args
.
qname
!=
'
all.q
'
:
kwargs
[
'
hvmem
'
]
=
args
.
memory
if
args
.
parallel
is
not
None
:
kwargs
[
'
pe_opt
'
]
=
"
pe_mth %d
"
%
args
.
parallel
kwargs
[
'
memfree
'
]
=
"
%d%s
"
%
(
int
(
args
.
memory
.
rstrip
(
string
.
ascii_letters
))
*
args
.
parallel
,
args
.
memory
.
lstrip
(
string
.
digits
)
)
kwargs
[
'
memfree
'
]
=
get_memfree
(
args
.
memory
,
args
.
parallel
)
kwargs
[
'
dry_run
'
]
=
args
.
dry_run
kwargs
[
'
stop_on_failure
'
]
=
args
.
stop_on_failure
...
...
@@ -140,7 +148,7 @@ def resubmit(args):
kwargs
[
'
hvmem
'
]
=
args
.
memory
if
args
.
parallel
is
not
None
:
kwargs
[
'
pe_opt
'
]
=
"
pe_mth %d
"
%
args
.
parallel
kwargs
[
'
memfree
'
]
=
"
%d%s
"
%
(
int
(
args
.
memory
.
rstrip
(
string
.
ascii_letters
))
*
args
.
parallel
,
args
.
memory
.
lstrip
(
string
.
digits
)
)
kwargs
[
'
memfree
'
]
=
get_memfree
(
args
.
memory
,
args
.
parallel
)
if
args
.
io_big
:
kwargs
[
'
io_big
'
]
=
True
if
args
.
no_io_big
:
...
...
This diff is collapsed.
Click to expand it.
gridtk/sge.py
+
2
−
1
View file @
931decce
...
...
@@ -154,6 +154,7 @@ class JobManagerSGE(JobManager):
logger
.
debug
(
"
Re-submitting job
'
%s
'
with dependencies
'
%s
'
to the grid.
"
%
(
job
,
deps
))
self
.
_submit_to_grid
(
job
,
job
.
name
,
job
.
get_array
(),
deps
,
job
.
log_dir
,
**
arguments
)
# commit after each job to avoid failures of not finding the job during execution in the grid
self
.
session
.
commit
()
self
.
unlock
()
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
931decce
...
...
@@ -9,7 +9,7 @@ if sys.version_info[:2] < (2, 7) or ((3,0) <= sys.version_info[:2] < (3,2)):
setup
(
name
=
'
gridtk
'
,
version
=
'
1.1.
3
a0
'
,
version
=
'
1.1.
4
a0
'
,
description
=
'
SGE Grid and Local Submission and Monitoring Tools for Idiap
'
,
url
=
'
http://github.com/idiap/gridtk
'
,
...
...
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