Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gridtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
gridtk
Commits
4fc6bd7e
Commit
4fc6bd7e
authored
Aug 28, 2019
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically remove G from memory commands in GPU queues
parent
12a4fc76
Pipeline
#32829
passed with stage
in 6 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
gridtk/script/jman.py
gridtk/script/jman.py
+24
-17
No files found.
gridtk/script/jman.py
View file @
4fc6bd7e
...
...
@@ -24,7 +24,26 @@ from ..tools import make_shell, logger
from
..
import
local
,
sge
from
..models
import
Status
QUEUES
=
[
'all.q'
,
'q1d'
,
'q1w'
,
'q1m'
,
'q1dm'
,
'q1wm'
,
'gpu'
,
'lgpu'
,
'sgpu'
,
'gpum'
]
GPU_QUEUES
=
[
'gpu'
,
'lgpu'
,
'sgpu'
,
'gpum'
]
QUEUES
=
[
'all.q'
,
'q1d'
,
'q1w'
,
'q1m'
,
'q1dm'
,
'q1wm'
]
+
GPU_QUEUES
def
appropriate_for_gpu
(
args
,
kwargs
):
# don't set these for GPU processing or the maximum virtual memory will be
# set on ulimit
kwargs
.
pop
(
'memfree'
,
None
)
kwargs
.
pop
(
'hvmem'
,
None
)
if
args
.
memory
is
None
:
return
# if this is a GPU queue and args.memory is provided, we set gpumem flag
# remove 'G' last character from the args.memory string
if
args
.
memory
.
isdigit
():
kwargs
[
'gpumem'
]
=
args
.
memory
# assign directly
elif
args
.
memory
.
endswith
(
'G'
):
kwargs
[
'gpumem'
]
=
args
.
memory
[:
-
1
]
# remove G at the end
def
setup
(
args
):
"""Returns the JobManager and sets up the basic infrastructure"""
...
...
@@ -128,14 +147,8 @@ def submit(args):
if
args
.
log_dir
is
not
None
:
kwargs
[
'log_dir'
]
=
args
.
log_dir
if
args
.
dependencies
is
not
None
:
kwargs
[
'dependencies'
]
=
args
.
dependencies
if
args
.
qname
!=
'all.q'
:
kwargs
[
'hvmem'
]
=
args
.
memory
# if this is a GPU queue and args.memory is provided, we set gpumem flag
# remove 'G' last character from the args.memory string
if
args
.
qname
in
(
'gpu'
,
'lgpu'
,
'sgpu'
,
'gpum'
)
and
args
.
memory
is
not
None
:
kwargs
[
'gpumem'
]
=
args
.
memory
# don't set these for GPU processing or the maximum virtual memroy will be
# set on ulimit
kwargs
.
pop
(
'memfree'
,
None
)
kwargs
.
pop
(
'hvmem'
,
None
)
if
args
.
qname
in
GPU_QUEUES
:
appropriate_for_gpu
(
args
,
kwargs
)
if
args
.
parallel
is
not
None
:
kwargs
[
'pe_opt'
]
=
"pe_mth %d"
%
args
.
parallel
if
args
.
memory
is
not
None
:
...
...
@@ -168,14 +181,8 @@ def resubmit(args):
kwargs
[
'memfree'
]
=
args
.
memory
if
args
.
qname
not
in
(
None
,
'all.q'
):
kwargs
[
'hvmem'
]
=
args
.
memory
# if this is a GPU queue and args.memory is provided, we set gpumem flag
# remove 'G' last character from the args.memory string
if
args
.
qname
in
(
'gpu'
,
'lgpu'
,
'sgpu'
,
'gpum'
)
and
args
.
memory
is
not
None
:
kwargs
[
'gpumem'
]
=
args
.
memory
# don't set these for GPU processing or the maximum virtual memroy will be
# set on ulimit
kwargs
.
pop
(
'memfree'
,
None
)
kwargs
.
pop
(
'hvmem'
,
None
)
if
args
.
qname
in
GPU_QUEUES
:
appropriate_for_gpu
(
args
,
kwargs
)
if
args
.
parallel
is
not
None
:
kwargs
[
'pe_opt'
]
=
"pe_mth %d"
%
args
.
parallel
kwargs
[
'memfree'
]
=
get_memfree
(
args
.
memory
,
args
.
parallel
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment