Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
0e65a1dd
Commit
0e65a1dd
authored
3 years ago
by
Izzard, Robert Dr (Maths & Physics)
Browse files
Options
Downloads
Patches
Plain Diff
add batchname to condor script
parent
b0c53017
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
binarycpython/utils/condor.py
+10
-10
10 additions, 10 deletions
binarycpython/utils/condor.py
with
10 additions
and
10 deletions
binarycpython/utils/condor.py
+
10
−
10
View file @
0e65a1dd
...
...
@@ -174,7 +174,7 @@ class condor():
# run a grid of stars only, leaving the results
# in the appropriate outfile
return
False
elif
self
.
grid_options
[
'
condor
'
]
==
3
:
# joining : set the evolution type to "join" and return
# False to continue
...
...
@@ -184,7 +184,7 @@ class condor():
elif
self
.
grid_options
[
'
condor
'
]
==
1
:
# if condor=1, we should have no evolution type, we
# set up the Condor scripts and get them evolving
# in a Condor queue
# in a Condor queue
self
.
grid_options
[
'
evolution_type
'
]
=
None
# make dirs
...
...
@@ -202,18 +202,18 @@ class condor():
# get job array index
Process
=
self
.
grid_options
[
'
condor_Process
'
]
if
self
.
grid_options
[
'
condor_Process
'
]
!=
""
else
'
$Process
'
if
self
.
grid_options
[
'
condor_njobs
'
]
==
0
:
print
(
"
binary_c-python Condor : You must set grid_option condor_njobs to be non-zero
"
)
self
.
exit
(
code
=
1
)
# find the path to the Python script that we are running
pyscriptpath
=
str
(
lib_programname
.
get_path_executed_script
())
# set the condor initial dir to be our current working directory
if
not
self
.
grid_options
[
'
condor_initial_dir
'
]:
self
.
grid_options
[
'
condor_initial_dir
'
]
=
os
.
getcwd
()
# build the grid command
grid_command
=
[
os
.
path
.
join
(
"
/usr
"
,
"
bin
"
,
"
env
"
),
...
...
@@ -306,7 +306,7 @@ echo {condor_dir}/results/$ClusterID.$Process.gz >> {condor_dir}/results/$Cluste
key
=
key
,
value
=
self
.
grid_options
[
'
condor_extra_settings
'
][
key
]
)
jobid
=
'
$(Cluster).$(Process)
'
condor_submit_script
=
"""
executable = {usr_bin_env}
...
...
@@ -324,8 +324,9 @@ request_cpus = {request_cpus}
should_transfer_files = {should_transfer_files}
when_to_transfer_output = {when_to_transfer_output}
requirements = {requirements}
JobBatchName = {batchname}
{extra_settings}
queue {njobs}
queue {njobs}
"""
.
format
(
usr_bin_env
=
self
.
grid_options
[
'
condor_usr_bin_env
'
],
bash
=
self
.
grid_options
[
'
condor_bash
'
],
...
...
@@ -349,6 +350,7 @@ queue {njobs}
should_transfer_files
=
self
.
grid_options
[
'
condor_should_transfer_files
'
],
when_to_transfer_output
=
self
.
grid_options
[
'
when_to_transfer_output
'
],
requirements
=
self
.
grid_options
[
'
condor_requirements
'
],
batchname
=
self
.
grid_options
[
'
condor_batchname
'
],
extra_settings
=
extra_settings
,
njobs
=
self
.
grid_options
[
'
condor_njobs
'
],
)
...
...
@@ -400,7 +402,5 @@ queue {njobs}
print
(
"
Condor jobs launched.
"
)
print
(
"
All done in condor_grid().
"
)
# return True so we exit immediately
# return True so we exit immediately
return
True
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