Skip to content

Commit 54a3642

Browse files
authored
Merge pull request #56 from Eventdisplay/v2.2-dev2
v2.2 dev2 - maintenance
2 parents ce5ec09 + 993b4b0 commit 54a3642

File tree

3 files changed

+41
-33
lines changed

3 files changed

+41
-33
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
repos:
22
# https://pycqa.github.io/isort/docs/configuration/black_compatibility.html#integration-with-pre-commit
33
- repo: https://github.com/pycqa/isort
4-
rev: 5.13.2
4+
rev: 6.0.1
55
hooks:
66
- id: isort
77
args: ["--profile", "black", "--filter-files"]
88
- repo: https://github.com/psf/black
9-
rev: 24.8.0
9+
rev: 25.1.0
1010
hooks:
1111
- id: black
1212
args: ["--line-length=100"]
1313
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html?highlight=other%20tools#flake8
1414
- repo: https://github.com/PyCQA/flake8
15-
rev: 7.1.1
15+
rev: 7.2.0
1616
hooks:
1717
- id: flake8
1818
args: ["--max-line-length=100", "--extend-ignore=E203,E712"]
1919
# https://github.com/pre-commit/pre-commit-hooks
2020
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v4.6.0
21+
rev: v5.0.0
2222
hooks:
2323
- id: trailing-whitespace
2424
- id: end-of-file-fixer

install/prepareProductionBinaries.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
if [ $# -lt 1 ]; then
1010
echo "
11-
./prepareProductionBinaries.sh <data set> <Eventdisplay version>
11+
./prepareProductionBinaries.sh <data set> <Eventdisplay branch>
1212
1313
will install hessioxx, Eventdisplay analysis files and code
1414
@@ -118,7 +118,7 @@ mkdir -p $CODEDIR || return
118118
echo "Software installation into $CODEDIR"
119119
echo "Preparing binaries for $DSET"
120120

121-
echo
121+
echo
122122
echo "Getting Eventdisplay..."
123123
cd $CODEDIR
124124
if [[ $VERSION == "main" ]]; then

utilities/submit_scripts_to_htcondor.sh

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,45 @@ set -e
1212
if [ $# -lt 1 ]
1313
then
1414
echo "
15-
./submit_scripts_to_htcondor.sh <job directory> <submit/nosubmit>
15+
./submit_scripts_to_htcondor.sh <job directory> [submit/nosubmit] [priority]
1616
1717
"
1818
exit
1919
fi
2020

2121
JDIR=${1}
22-
23-
SUBMITF=${1}/submit.txt
24-
rm -f ${SUBMITF}
25-
touch ${SUBMITF}
26-
27-
echo "Writing HTCondor job submission file ${SUBMITF}"
28-
29-
echo "executable = \$(file)" >> ${SUBMITF}
30-
echo "log = \$(file).log" >> ${SUBMITF}
31-
echo "output = \$(file).output" >> ${SUBMITF}
32-
echo "error = \$(file).error" >> ${SUBMITF}
33-
34-
# assume that all condor files have similar requests
35-
CONDORFILE=$(find ${JDIR} -name "*.condor" | head -n 1)
36-
echo "$(grep -h request_memory $CONDORFILE)" >> ${SUBMITF}
37-
echo "$(grep -h request_disk $CONDORFILE)" >> ${SUBMITF}
38-
echo "getenv = True" >> ${SUBMITF}
39-
echo "max_materialize = 5000" >> ${SUBMITF}
40-
echo "priority = 150" >> ${SUBMITF}
41-
echo "queue file matching files *.sh" >> ${SUBMITF}
42-
43-
PDIR=$(pwd)
44-
if [[ ${2} == "submit" ]]; then
45-
cd ${JDIR}
46-
condor_submit submit.txt requirements='OpSysAndVer=="AlmaLinux9"'
47-
cd ${PDIR}
22+
PRIORITY="${3:-1}"
23+
24+
echo "Writing HTCondor job submission file ${SUBMITF} (job priority $PRIORITY) for ${JDIR}"
25+
if find "${JDIR}" -name "*.condor" -print -quit | grep -q .; then
26+
SUBMITF=${1}/submit.txt
27+
rm -f ${SUBMITF}
28+
touch ${SUBMITF}
29+
30+
mkdir -p ${JDIR}/log
31+
mkdir -p ${JDIR}/output
32+
mkdir -p ${JDIR}/error
33+
34+
echo "executable = \$(file)" >> ${SUBMITF}
35+
echo "log = log/\$(file).log" >> ${SUBMITF}
36+
echo "output = output/\$(file).output" >> ${SUBMITF}
37+
echo "error = error/\$(file).error" >> ${SUBMITF}
38+
39+
# assume that all condor files have similar requests
40+
CONDORFILE=$(find ${JDIR} -name "*.condor" | head -n 1)
41+
echo "$(grep -h request_memory $CONDORFILE)" >> ${SUBMITF}
42+
echo "$(grep -h request_disk $CONDORFILE)" >> ${SUBMITF}
43+
echo "getenv = True" >> ${SUBMITF}
44+
echo "max_materialize = 1800" >> ${SUBMITF}
45+
echo "priority = $PRIORITY" >> ${SUBMITF}
46+
echo "queue file matching files *.sh" >> ${SUBMITF}
47+
48+
PDIR=$(pwd)
49+
if [[ ${2} == "submit" ]]; then
50+
cd ${JDIR}
51+
condor_submit submit.txt requirements='OpSysAndVer=="AlmaLinux9"'
52+
cd ${PDIR}
53+
fi
54+
else
55+
echo "Error: no condor files found in ${JDIR}"
4856
fi

0 commit comments

Comments
 (0)