Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hepmc3
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
EIC
campaigns
hepmc3
Commits
27cb355a
Commit
27cb355a
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: run against xrootd files (same filename pattern)
parent
e09be6c1
No related branches found
No related tags found
1 merge request
!23
feat: run against xrootd files (same filename pattern)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+58
-2
58 additions, 2 deletions
.gitlab-ci.yml
scripts/run.sh
+63
-38
63 additions, 38 deletions
scripts/run.sh
test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root
+0
-0
0 additions, 0 deletions
...1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root
with
121 additions
and
40 deletions
.gitlab-ci.yml
+
58
−
2
View file @
27cb355a
...
...
@@ -11,7 +11,7 @@ stages:
-
"
nightly"
image
:
eicweb.phy.anl.gov:4567/containers/eic_container/jug_xl:${TAG}
run_hepmc3_local
:
run_hepmc3_local
_hepmc
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc EVGEN/CI/
...
...
@@ -19,7 +19,7 @@ run_hepmc3_local:
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.eicrecon.tree.edm4eic.root
run_hepmc3_local_0001
:
run_hepmc3_local_
hepmc_
0001
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc EVGEN/CI/
...
...
@@ -27,6 +27,32 @@ run_hepmc3_local_0001:
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.0001.eicrecon.tree.edm4eic.root
run_hepmc3_local
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc EVGEN/CI/
-
gzip EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc
20
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.eicrecon.tree.edm4eic.root
run_hepmc3_local_hepmc3
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc
20
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.eicrecon.tree.edm4eic.root
run_hepmc3_local_hepmc3_gz
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3
-
gzip EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc
20
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.eicrecon.tree.edm4eic.root
run_hepmc3_s3
:
extends
:
.test
script
:
...
...
@@ -54,3 +80,33 @@ run_hepmc3_s3_gz_0001:
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc.gz 20
1
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.0001.eicrecon.tree.edm4eic.root
run_hepmc3_root_local
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root EVGEN/CI/
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root
20
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.eicrecon.tree.edm4eic.root
run_hepmc3_root_local_0001
:
extends
:
.test
script
:
-
mkdir -p EVGEN/CI/ && cp -f test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root EVGEN/CI/
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root 20
1
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.0001.eicrecon.tree.edm4eic.root
run_hepmc3_root_remote
:
extends
:
.test
script
:
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root
20
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.eicrecon.tree.edm4eic.root
run_hepmc3_root_remote_0001
:
extends
:
.test
script
:
-
COPYRECO=true RECONSTRUCTION=*.py scripts/run.sh EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root 20
1
-
ls -al RECO/*/*/CI/
-
test -f RECO/*/*/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.0001.eicrecon.tree.edm4eic.root
This diff is collapsed.
Click to expand it.
scripts/run.sh
+
63
−
38
View file @
27cb355a
...
...
@@ -82,6 +82,7 @@ function retry {
# S3 locations
MC
=
"/usr/local/bin/mc"
XRDURL
=
"root://dtn-eic.jlab.org//work/eic2/EPIC"
S3URL
=
"https://dtn01.sdcc.bnl.gov:9000"
S3RO
=
"S3"
S3RW
=
"S3rw"
...
...
@@ -111,10 +112,12 @@ mkdir -p ${TMPDIR}
ls -al
${
TMPDIR
}
# Input file parsing
if [[
"
${
INPUT_FILE
}
"
=~ \.hepmc\.gz ]] ; then
EXTENSION=
".hepmc.gz"
elif [[
"
${
INPUT_FILE
}
"
=~ \.hepmc ]] ; then
EXTENSION=
".hepmc"
if [[
"
${
INPUT_FILE
}
"
=~ \.hepmc3\.tree\.root ]] ; then
EXTENSION=
"
${
BASH_REMATCH
}
"
elif [[
"
${
INPUT_FILE
}
"
=~ \.hepmc[3]?\.gz ]] ; then
EXTENSION=
"
${
BASH_REMATCH
}
"
elif [[
"
${
INPUT_FILE
}
"
=~ \.hepmc[3]? ]] ; then
EXTENSION=
"
${
BASH_REMATCH
}
"
else
echo
"Error:
${
INPUT_FILE
}
has unknown extension!"
exit 1
...
...
@@ -184,42 +187,61 @@ export JUGGLER_N_EVENTS=2147483647
export JUGGLER_SIM_FILE=
"
${
FULL_TEMP
}
/
${
TASKNAME
}
.edm4hep.root"
export JUGGLER_REC_FILE=
"
${
RECO_TEMP
}
/
${
TASKNAME
}
.edm4eic.root"
# Retrieve input file if S3_ACCESS_KEY and S3_SECRET_KEY in environment
if [ ! -f
${
INPUT_FILE
}
] ; then
if [ -x
${
MC
}
] ; then
if [ -n
"
${
ONLINE
:-}
"
] ; then
if [ -n
"
${
S3_ACCESS_KEY
:-}
"
-a -n
"
${
S3_SECRET_KEY
:-}
"
] ; then
MC_CONFIG=
$(
mktemp
-d
$PWD
/mc_config.XXXX
)
retry
${
MC
}
-C
${
MC_CONFIG
}
config host add
${
S3RO
}
${
S3URL
}
${
S3_ACCESS_KEY
}
${
S3_SECRET_KEY
}
retry
${
MC
}
-C
${
MC_CONFIG
}
config host list
${
S3RO
}
| grep -v SecretKey
echo
"Downloading hepmc file at
${
INPUT_S3RO
}
/
${
BASENAME
}${
EXTENSION
}
"
retry
${
MC
}
-C
${
MC_CONFIG
}
cp --disable-multipart --insecure
${
INPUT_S3RO
}
/
${
BASENAME
}${
EXTENSION
}
${
INPUT_DIR
}
ls -al
${
INPUT_FILE
}
retry
${
MC
}
-C
${
MC_CONFIG
}
config host remove
${
S3RO
}
else
echo
"No S3 credentials. Provide (readonly) S3 credentials."
exit -1
fi
else
echo
"No internet connection. Pre-cache input file."
exit -1
# Retrieve input file if available
if [ ! -f
"
${
INPUT_FILE
}
"
] ; then
# Fail if not online
if [ -z
"
${
ONLINE
:-}
"
] ; then
echo
"No internet connection. Pre-cache input file."
exit -1
else
# If hepmc or hepmc.gz file, download from S3
if [[
"
${
EXTENSION
}
"
=~ \.hepmc[3]?
$
||
"
${
EXTENSION
}
"
=~ \.hepmc[3]?\.gz
$
]] ; then
if [ -x
"
${
MC
}
"
] ; then
if [ -n
"
${
S3_ACCESS_KEY
:-}
"
-a -n
"
${
S3_SECRET_KEY
:-}
"
] ; then
MC_CONFIG=
$(
mktemp
-d
$PWD
/mc_config.XXXX
)
retry
${
MC
}
-C
${
MC_CONFIG
}
config host add
${
S3RO
}
${
S3URL
}
${
S3_ACCESS_KEY
}
${
S3_SECRET_KEY
}
retry
${
MC
}
-C
${
MC_CONFIG
}
config host list
${
S3RO
}
| grep -v SecretKey
echo
"Downloading hepmc file at
${
INPUT_S3RO
}
/
${
BASENAME
}${
EXTENSION
}
"
retry
${
MC
}
-C
${
MC_CONFIG
}
cp --disable-multipart --insecure
${
INPUT_S3RO
}
/
${
BASENAME
}${
EXTENSION
}
${
INPUT_DIR
}
ls -al
${
INPUT_FILE
}
retry
${
MC
}
-C
${
MC_CONFIG
}
config host remove
${
S3RO
}
else
echo
"No S3 credentials. Provide (readonly) S3 credentials."
exit -1
fi
fi
fi
fi
fi
# Copy input to temp location
if [ ! -f
"
${
INPUT_TEMP
}
"
] ; then
cp -n
${
INPUT_FILE
}
${
INPUT_TEMP
}
fi
# Unzip if needed
if [[
${
EXTENSION
}
==
".hepmc.gz"
]] ; then
gunzip
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
EXTENSION=
".hepmc"
fi
# Move files to temporary location
if [ -f
"
${
INPUT_FILE
}
"
] ; then
# Copy input to temp location
if [ ! -f
"
${
INPUT_TEMP
}
"
] ; then
cp -n
${
INPUT_FILE
}
${
INPUT_TEMP
}
fi
# Unzip if needed
if [[
${
EXTENSION
}
=~ (.hepmc[3]?)\.gz
$
]] ; then
gunzip
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
EXTENSION=
${
BASH_REMATCH
[1]
}
fi
# Sanitize hepmc
if [[
${
EXTENSION
}
=~ \.hepmc[3]?
$
]] ; then
cat
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
| sanitize_hepmc3 >
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
.new
mv
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
.new
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
fi
# Sanitize hepmc
cat
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
| sanitize_hepmc3 >
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
.new
mv
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
.new
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
# Input file points to temporary location
ls -al
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
INPUT_FILE=
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
# If remote hepmc.tree.root file, use xrootd protocol
elif [[
"
${
EXTENSION
}
"
=~ \.hepmc3\.tree\.root
$
]] ; then
# Prefix with xrootd protocol and URL
INPUT_FILE=
${
XRDURL
}
/
${
INPUT_FILE
}
fi
# Remove any output files if they exist
if [ -x
${
MC
}
] ; then
...
...
@@ -241,7 +263,6 @@ if [ -x ${MC} ] ; then
fi
# Run simulation
ls -al
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
date
prmon \
--filename
${
LOG_TEMP
}
/
${
TASKNAME
}
.npsim.prmon.txt \
...
...
@@ -258,11 +279,15 @@ npsim \
--filter.tracker
'edep0'
\
--hepmc3.useHepMC3
${
USEHEPMC3
:-
true
}
\
--compactFile
${
DETECTOR_PATH
}
/
${
DETECTOR_CONFIG
}
.xml \
--inputFiles
${
INPUT_
TEMP
}
/
${
BASENAME
}${
EXTENSION
}
\
--inputFiles
${
INPUT_
FILE
}
\
--outputFile
${
FULL_TEMP
}
/
${
TASKNAME
}
.edm4hep.root
rm -f
${
INPUT_TEMP
}
/
${
BASENAME
}${
EXTENSION
}
ls -al
${
FULL_TEMP
}
/
${
TASKNAME
}
.edm4hep.root
# Remove temporary input file again
if [ -f
${
INPUT_FILE
}
] ; then
rm -f
${
INPUT_FILE
}
fi
# Data egress if S3RW_ACCESS_KEY and S3RW_SECRET_KEY in environment
if [
"
${
UPLOADFULL
:-
false
}
"
==
"true"
] ; then
if [ -x
${
MC
}
] ; then
...
...
This diff is collapsed.
Click to expand it.
test/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc3.tree.root
0 → 100644
+
0
−
0
View file @
27cb355a
File added
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