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
Snippets
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
Rene Caspart
jdl_creator
Commits
76f07b36
Commit
76f07b36
authored
8 years ago
by
Matthias Schnepf
Browse files
Options
Downloads
Patches
Plain Diff
add feature input_file
parent
05b682ab
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/JDLCreator.py
+23
-2
23 additions, 2 deletions
classes/JDLCreator.py
example_belle2.py
+28
-0
28 additions, 0 deletions
example_belle2.py
with
51 additions
and
2 deletions
classes/JDLCreator.py
+
23
−
2
View file @
76f07b36
...
...
@@ -57,7 +57,6 @@ class JDLCreator(object):
# public attributes - user is allowed to change these values
###
print
(
"
asdfasdghrgasgoqhiohioht90!!!!!
"
)
self
.
executable
=
executable
###
...
...
@@ -68,6 +67,7 @@ class JDLCreator(object):
self
.
_memory
=
0
self
.
_job_folder
=
job_folder
self
.
_output_files
=
output_files
self
.
_input_files
=
""
self
.
_remote_job
=
False
if
len
(
extra_lines
)
>
0
:
self
.
_extra_lines
=
extra_lines
...
...
@@ -272,6 +272,23 @@ class JDLCreator(object):
# type: (str) -> None
self
.
_output_files
=
file_string
@property
def
input_files
(
self
):
# type: () -> str
"""
Files or directories which should be transferred to workernode by HTCondor.
"""
return
self
.
_input_files
@input_files.setter
def
input_files
(
self
,
file_string
):
# type: (str) -> None
self
.
_input_files
=
file_string
def
SetInputFiles
(
self
,
file_string
):
# type: (str) -> None
self
.
_input_files
=
file_string
@property
def
remote_job
(
self
):
# type: () -> boolean
...
...
@@ -325,7 +342,11 @@ class JDLCreator(object):
# do docker stuff for exe
jdl_content
.
append
(
"
executable = ./
"
+
exe
)
jdl_content
.
append
(
"
should_transfer_files = YES
"
)
jdl_content
.
append
(
"
transfer_input_files =
"
+
self
.
executable
)
if
self
.
_input_files
!=
""
:
jdl_content
.
append
(
"
transfer_input_files =
"
+
self
.
executable
+
'
,
'
+
self
.
_input_files
)
else
:
jdl_content
.
append
(
"
transfer_input_files =
"
+
self
.
executable
)
else
:
jdl_content
.
append
(
"
executable =
"
+
exe
)
...
...
This diff is collapsed.
Click to expand it.
example_belle2.py
0 → 100644
+
28
−
0
View file @
76f07b36
#!/usr/bin/env python
from
classes.JDLCreator
import
JDLCreator
# import the class to create and submit JDL files
import
numpy
def
main
():
jobs
=
JDLCreator
()
#run jobs on condocker cloude site
jobs
.
image
=
"
ipython:v1_r26519_v01-01-07_r28283
"
##################################
# submit job
##################################
jobs
.
SetExecutable
(
"
job.sh
"
)
# set job script
#build list of arguments
arguments
=
[]
for
i
in
numpy
.
arange
(
0
,
5
,
1
):
arguments
.
append
(
i
)
jobs
.
SetArguments
(
arguments
)
# set arguments
jobs
.
requirements
=
"
(TARGET.PROVIDES_CPU == True) && (TARGET.PROVIDES_EKP_RESOURCES == True) && (TARGET.PROVIDES_BELLE_2 == True)
"
jobs
.
wall_time
=
1
*
60
*
60
# set walltime to 1h in sec
jobs
.
memory
=
2048
# set memory to 2048 MB
jobs
.
SetFolder
(
'
condor_jobs/
'
)
# set folder
jobs
.
WriteJDL
()
# write an JDL file and create folder for log files
if
__name__
==
"
__main__
"
:
main
()
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