Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
inference
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HH
tools
inference
Commits
72fffc49
Commit
72fffc49
authored
3 years ago
by
Marcel Rieger
Browse files
Options
Downloads
Patches
Plain Diff
Add htcondor-flavor for INFN.
parent
be464100
No related branches found
No related tags found
No related merge requests found
Pipeline
#3520448
skipped
Stage: docs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dhi/tasks/base.py
+14
-5
14 additions, 5 deletions
dhi/tasks/base.py
with
14 additions
and
5 deletions
dhi/tasks/base.py
+
14
−
5
View file @
72fffc49
...
...
@@ -181,15 +181,15 @@ class HTCondorWorkflow(law.htcondor.HTCondorWorkflow):
htcondor_mem
=
luigi
.
FloatParameter
(
default
=
law
.
NO_FLOAT
,
significant
=
False
,
description
=
"
amount of memory in
Mi
B to request; empty value leads to the cluster default
"
description
=
"
amount of memory in
G
B to request; empty value leads to the cluster default
"
"
setting; no default
"
,
)
htcondor_flavor
=
luigi
.
ChoiceParameter
(
default
=
os
.
getenv
(
"
DHI_HTCONDOR_FLAVOR
"
,
"
cern
"
),
choices
=
(
"
cern
"
,
"
naf
"
),
choices
=
(
"
cern
"
,
"
naf
"
,
"
infn
"
),
significant
=
False
,
description
=
"
the
'
flavor
'
(i.e. configuration name) of the batch system; choices:
"
"
cern,naf; default: {}
"
.
format
(
os
.
getenv
(
"
DHI_HTCONDOR_FLAVOR
"
,
"
cern
"
)),
"
cern,naf
,infn
; default: {}
"
.
format
(
os
.
getenv
(
"
DHI_HTCONDOR_FLAVOR
"
,
"
cern
"
)),
)
htcondor_getenv
=
luigi
.
BoolParameter
(
default
=
False
,
...
...
@@ -231,8 +231,13 @@ class HTCondorWorkflow(law.htcondor.HTCondorWorkflow):
def
htcondor_job_config
(
self
,
config
,
job_num
,
branches
):
# use cc7 at CERN (http://batchdocs.web.cern.ch/batchdocs/local/submit.html#os-choice)
if
self
.
htcondor_flavor
==
"
cern
"
:
# and NAF
if
self
.
htcondor_flavor
in
(
"
cern
"
,
"
naf
"
):
config
.
custom_content
.
append
((
"
requirements
"
,
'
(OpSysAndVer =?=
"
CentOS7
"
)
'
))
# architecture at INFN
if
self
.
htcondor_flavor
==
"
infn
"
:
config
.
custom_content
.
append
((
"
requirements
"
,
'
TARGET.OpSys ==
"
LINUX
"
&& (TARGET.Arch !=
"
DUMMY
"
)
'
))
# copy the entire environment when requests
if
self
.
htcondor_getenv
:
config
.
custom_content
.
append
((
"
getenv
"
,
"
true
"
))
...
...
@@ -261,7 +266,11 @@ class HTCondorWorkflow(law.htcondor.HTCondorWorkflow):
self
.
logger
.
warning
(
"
--htcondor-mem has no effect on CERN resources, use
"
"
--htcondor-cpus instead
"
)
else
:
config
.
custom_content
.
append
((
"
RequestMemory
"
,
self
.
htcondor_mem
))
# default unit is GB, but NAF uses MB
mem
=
self
.
htcondor_mem
if
self
.
htcondor_flavor
==
"
naf
"
:
mem
*=
1024
config
.
custom_content
.
append
((
"
RequestMemory
"
,
mem
))
# accounting group for priority on the cluster
if
self
.
htcondor_group
and
self
.
htcondor_group
!=
law
.
NO_STR
:
...
...
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