Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdl_creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Matthias Schnepf
jdl_creator
Commits
97ed8c45
Commit
97ed8c45
authored
7 years ago
by
Matthias Schnepf
Browse files
Options
Downloads
Patches
Plain Diff
add disk space
parent
6147b282
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/JDLCreator.py
+21
-0
21 additions, 0 deletions
classes/JDLCreator.py
create_jdl.py
+2
-1
2 additions, 1 deletion
create_jdl.py
with
23 additions
and
1 deletion
classes/JDLCreator.py
+
21
−
0
View file @
97ed8c45
...
@@ -65,6 +65,7 @@ class JDLCreator(object):
...
@@ -65,6 +65,7 @@ class JDLCreator(object):
self
.
_cloud_site
=
CloudSite
(
site_name
.
lower
())
self
.
_cloud_site
=
CloudSite
(
site_name
.
lower
())
self
.
_wall_time
=
int
(
wall_time
)
self
.
_wall_time
=
int
(
wall_time
)
self
.
_memory
=
0
self
.
_memory
=
0
self
.
_disk_space
=
0
self
.
_job_folder
=
job_folder
self
.
_job_folder
=
job_folder
self
.
_output_files
=
[]
self
.
_output_files
=
[]
self
.
_input_files
=
[]
self
.
_input_files
=
[]
...
@@ -214,6 +215,23 @@ class JDLCreator(object):
...
@@ -214,6 +215,23 @@ class JDLCreator(object):
"""
Set requested number of cores
"""
"""
Set requested number of cores
"""
self
.
cpus
=
cpus_
self
.
cpus
=
cpus_
@property
def
disk_space
(
self
):
"""
Requested disk space in MB
"""
return
self
.
_disk_space
@memory.setter
def
disk_space
(
self
,
disk_space_
):
# type: (int) -> None
"""
Expected maximum disk_space (upper limit) in MB
"""
self
.
_disk_space
=
disk_space_
def
SetMemory
(
self
,
disk_space_
):
# type: (int) -> None
"""
Expected maximum disk space (upper limit) in MB
"""
self
.
memory
=
disk_space_
@property
@property
def
accounting_group
(
self
):
def
accounting_group
(
self
):
"""
Get accounting group
"""
"""
Get accounting group
"""
...
@@ -461,6 +479,9 @@ class JDLCreator(object):
...
@@ -461,6 +479,9 @@ class JDLCreator(object):
if
self
.
_cpus
>
1
:
if
self
.
_cpus
>
1
:
jdl_content
.
append
(
'
request_cpus = %d
'
%
self
.
_cpus
)
jdl_content
.
append
(
'
request_cpus = %d
'
%
self
.
_cpus
)
if
self
.
_disk_space
>
0
:
jdl_content
.
append
(
'
request_disk = %d
'
%
(
1024
*
self
.
_disk_space
))
# add accounting group, if set
# add accounting group, if set
if
self
.
_accounting_group
is
not
""
:
if
self
.
_accounting_group
is
not
""
:
jdl_content
.
append
(
'
accounting_group = %s
'
%
self
.
_accounting_group
)
jdl_content
.
append
(
'
accounting_group = %s
'
%
self
.
_accounting_group
)
...
...
This diff is collapsed.
Click to expand it.
create_jdl.py
+
2
−
1
View file @
97ed8c45
...
@@ -15,6 +15,7 @@ def main():
...
@@ -15,6 +15,7 @@ def main():
jobs
.
executable
=
"
job.sh
"
# name of the job script
jobs
.
executable
=
"
job.sh
"
# name of the job script
jobs
.
wall_time
=
10
*
60
*
60
# job will finish in 10 hours
jobs
.
wall_time
=
10
*
60
*
60
# job will finish in 10 hours
jobs
.
memory
=
2048
# Our regular 2 GB per core
jobs
.
memory
=
2048
# Our regular 2 GB per core
jobs
.
disk_space
=
200
# build list of arguments: 1,2,3,4,5
# build list of arguments: 1,2,3,4,5
arguments
=
[
x
for
x
in
range
(
0
,
5
)]
arguments
=
[
x
for
x
in
range
(
0
,
5
)]
...
@@ -23,7 +24,7 @@ def main():
...
@@ -23,7 +24,7 @@ def main():
jobs
.
arguments
=
arguments
# set arguments for condor job
jobs
.
arguments
=
arguments
# set arguments for condor job
# Our job requires lots of CPU resources and needs access to the local EKP resources
# Our job requires lots of CPU resources and needs access to the local EKP resources
jobs
.
requirements
=
"
(Target.P
ROVIDES_
CPU ==True) && (TARGET.P
ROVIDES_EKP_RESOURCES
== True)
"
jobs
.
requirements
=
"
(Target.P
rovides
CPU ==True) && (TARGET.P
rovidesEKPResources
== True)
"
jobs
.
job_folder
=
"
condor_jobs
"
# set name of the folder, where files and information are stored
jobs
.
job_folder
=
"
condor_jobs
"
# set name of the folder, where files and information are stored
jobs
.
WriteJDL
()
# write an JDL file and create folder for log files
jobs
.
WriteJDL
()
# write an JDL file and create folder for log files
...
...
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