Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common_bench
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
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
Show more breadcrumbs
EIC
benchmarks
common_bench
Commits
9bb0f094
Commit
9bb0f094
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
fix: migrate from JUGGLER_DETECTOR to simply DETECTOR
parent
3281c7b8
Branches
Branches containing commit
No related tags found
1 merge request
!54
fix: migrate from JUGGLER_DETECTOR to simply DETECTOR
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+11
-11
11 additions, 11 deletions
.gitlab-ci.yml
bin/build_detector.sh
+19
-19
19 additions, 19 deletions
bin/build_detector.sh
bin/env.sh
+7
-21
7 additions, 21 deletions
bin/env.sh
bin/print_env.sh
+3
-3
3 additions, 3 deletions
bin/print_env.sh
with
40 additions
and
54 deletions
.gitlab-ci.yml
+
11
−
11
View file @
9bb0f094
...
...
@@ -75,23 +75,23 @@ detector_benchmarks:
-
if
:
'
$CI_SERVER_HOST
==
"eicweb.phy.anl.gov"'
needs
:
[
"
common:variables"
]
variables
:
JUGGLER_
DETECTOR
:
"
ecce"
JUGGLER_
DETECTOR_CONFIG
:
"
ecce"
DETECTOR
:
"
ecce"
DETECTOR_CONFIG
:
"
ecce"
COMMON_BENCH_VERSION
:
"
$COMMON_BENCH_VERSION"
trigger
:
project
:
EIC/benchmarks/detector_benchmarks
strategy
:
depend
parallel
:
matrix
:
-
JUGGLER_
DETECTOR
:
'
athena'
JUGGLER_
DETECTOR_CONFIG
:
'
athena'
JUGGLER_
DETECTOR_VERSION
:
'
master'
-
JUGGLER_
DETECTOR
:
'
ecce'
JUGGLER_
DETECTOR_CONFIG
:
'
ecce_imaging'
JUGGLER_
DETECTOR_VERSION
:
'
main'
-
JUGGLER_
DETECTOR
:
'
ecce'
JUGGLER_
DETECTOR_CONFIG
:
'
ecce_sciglass'
JUGGLER_
DETECTOR_VERSION
:
'
main'
-
DETECTOR
:
'
athena'
DETECTOR_CONFIG
:
'
athena'
DETECTOR_VERSION
:
'
master'
-
DETECTOR
:
'
ecce'
DETECTOR_CONFIG
:
'
ecce_imaging'
DETECTOR_VERSION
:
'
main'
-
DETECTOR
:
'
ecce'
DETECTOR_CONFIG
:
'
ecce_sciglass'
DETECTOR_VERSION
:
'
main'
pages
:
image
:
eicweb.phy.anl.gov:4567/containers/eic_container/alpine
...
...
This diff is collapsed.
Click to expand it.
bin/build_detector.sh
+
19
−
19
View file @
9bb0f094
#!/bin/bash
## =============================================================================
## Build and install the
JUGGLER_
DETECTOR detector package into our local prefix
## Build and install the DETECTOR detector package into our local prefix
## =============================================================================
## =============================================================================
## Load the environment variables. To build the detector we need the following
## variables:
##
## -
JUGGLER_
DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR: the detector package we want to use for this benchmark
## - LOCAL_PREFIX: location where local packages should be installed
## - LOCAL_DATA_PATH: local storage for pipeline jobs
## - DETECTOR_PREFIX: prefix for the detector definitions
## - DETECTOR_PATH: full path for the detector definitions
## this is the same as ${DETECTOR_PREFIX}/${
JUGGLER_
DETECTOR}
## this is the same as ${DETECTOR_PREFIX}/${DETECTOR}
if
[
-n
"
${
LOCAL_PREFIX
}
"
]
;
then
source
.local/bin/env.sh
...
...
@@ -29,23 +29,23 @@ pushd ${DETECTOR_PREFIX}
## We need an up-to-date copy of the detector
## start clean to avoid issues...
if
[
-d
"
${
JUGGLER_
DETECTOR
}
"
]
;
then
echo
"cleaning up
${
JUGGLER_
DETECTOR
}
"
mv
"
${
JUGGLER_
DETECTOR
}
"
"
$(
mktemp
)
-
${
JUGGLER_
DETECTOR
}
"
if
[
-d
"
${
DETECTOR
}
"
]
;
then
echo
"cleaning up
${
DETECTOR
}
"
mv
"
${
DETECTOR
}
"
"
$(
mktemp
)
-
${
DETECTOR
}
"
fi
echo
"Fetching
${
JUGGLER_
DETECTOR
}
"
if
[
-n
"
${
JUGGLER_
DETECTOR_DEPLOY_TOKEN_USERNAME
:-}
"
-a
-n
"
${
JUGGLER_
DETECTOR_DEPLOY_TOKEN_PASSWORD
:-}
"
]
;
then
DEPLOY_TOKEN
=
"
${
JUGGLER_
DETECTOR_DEPLOY_TOKEN_USERNAME
}
:
${
JUGGLER_
DETECTOR_DEPLOY_TOKEN_PASSWORD
}
@"
echo
"Deploy token for
${
JUGGLER_
DETECTOR_DEPLOY_TOKEN_USERNAME
}
is masked in the next line."
echo
"Fetching
${
DETECTOR
}
"
if
[
-n
"
${
DETECTOR_DEPLOY_TOKEN_USERNAME
:-}
"
-a
-n
"
${
DETECTOR_DEPLOY_TOKEN_PASSWORD
:-}
"
]
;
then
DEPLOY_TOKEN
=
"
${
DETECTOR_DEPLOY_TOKEN_USERNAME
}
:
${
DETECTOR_DEPLOY_TOKEN_PASSWORD
}
@"
echo
"Deploy token for
${
DETECTOR_DEPLOY_TOKEN_USERNAME
}
is masked in the next line."
else
DEPLOY_TOKEN
=
""
fi
echo
"git clone -b
${
JUGGLER_
DETECTOR_VERSION
}
--depth 1
${
JUGGLER_
DETECTOR_REPOSITORYURL
:-
https
://eicweb.phy.anl.gov/EIC/detectors/
${
JUGGLER_
DETECTOR
}
.git
}
"
git clone
-b
${
JUGGLER_
DETECTOR_VERSION
}
--depth
1
${
JUGGLER_
DETECTOR_REPOSITORYURL
:-
https
://
${
DEPLOY_TOKEN
}
eicweb
.phy.anl.gov/EIC/detectors/
${
JUGGLER_
DETECTOR
}
.git
}
if
[
-f
"
${
JUGGLER_
DETECTOR
}
/requirements.txt"
]
;
then
python
-m
pip
install
-r
${
JUGGLER_
DETECTOR
}
/requirements.txt
echo
"git clone -b
${
DETECTOR_VERSION
}
--depth 1
${
DETECTOR_REPOSITORYURL
:-
https
://eicweb.phy.anl.gov/EIC/detectors/
${
DETECTOR
}
.git
}
"
git clone
-b
${
DETECTOR_VERSION
}
--depth
1
${
DETECTOR_REPOSITORYURL
:-
https
://
${
DEPLOY_TOKEN
}
eicweb
.phy.anl.gov/EIC/detectors/
${
DETECTOR
}
.git
}
if
[
-f
"
${
DETECTOR
}
/requirements.txt"
]
;
then
python
-m
pip
install
-r
${
DETECTOR
}
/requirements.txt
fi
rm
-rf
"
${
JUGGLER_
DETECTOR
}
/.git"
rm
-rf
"
${
DETECTOR
}
/.git"
## We need an up-to-date copy of the detector
## start clean to avoid issues...
...
...
@@ -86,13 +86,13 @@ ln -s -f ${DETECTOR_PREFIX}/${BEAMLINE_CONFIG}/${BEAMLINE_CONFIG} ${DETECTOR_PAT
popd
## =============================================================================
## Step 2: Compile and install the detector definition
echo
"Building and installing the
${
JUGGLER_
DETECTOR
}
package"
echo
"Building and installing the
${
DETECTOR
}
package"
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
JUGGLER_
DETECTOR
}
_build
pushd
${
DETECTOR_PREFIX
}
/
${
JUGGLER_
DETECTOR
}
_build
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
_build
pushd
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
_build
cmake
${
DETECTOR_PATH
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
&&
make
-j
$((
$(
nproc
)
/
4
+
1
))
install
||
exit
1
popd
rm
-rf
${
DETECTOR_PREFIX
}
/
${
JUGGLER_
DETECTOR
}
_build
rm
-rf
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
_build
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
_build
pushd
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
_build
...
...
This diff is collapsed.
Click to expand it.
bin/env.sh
+
7
−
21
View file @
9bb0f094
...
...
@@ -7,9 +7,9 @@
##
## - BEAMLINE_CONFIG: compact detector files for the interaciton point beamline
## - BEAMLINE_CONFIG_VERSION: compact detector files for the interaciton point beamline
## -
JUGGLER_
DETECTOR: detector package to be used for the benchmark
## -
JUGGLER_
DETECTOR_CONFIG: detector package config to be used for the benchmark
## -
JUGGLER_
DETECTOR_VERSION: detector package to be used for the benchmark
## - DETECTOR: detector package to be used for the benchmark
## - DETECTOR_CONFIG: detector package config to be used for the benchmark
## - DETECTOR_VERSION: detector package to be used for the benchmark
## - JUGGLER_N_EVENTS: events processed by simulation/reconstruction
## - JUGGLER_INSTALL_PREFIX: location where Juggler (digi/recon) is installed
## - JUGGLER_N_THREADS: Number of threads/processes to spawn in parallel
...
...
@@ -56,20 +56,6 @@ if [ ! -n "${DETECTOR_VERSION}" ] ; then
fi
## Detector package to be used during the benchmark process
if
[
!
-n
"
${
JUGGLER_DETECTOR
}
"
]
;
then
export
JUGGLER_DETECTOR
=
"ecce"
fi
if
[
!
-n
"
${
JUGGLER_DETECTOR_CONFIG
}
"
]
;
then
export
JUGGLER_DETECTOR_CONFIG
=
"
${
JUGGLER_DETECTOR
}
"
fi
if
[
!
-n
"
${
JUGGLER_DETECTOR_VERSION
}
"
]
;
then
export
JUGGLER_DETECTOR_VERSION
=
"main"
fi
## Number of events that will be processed by the reconstruction
if
[
!
-n
"
${
JUGGLER_N_EVENTS
}
"
]
;
then
export
JUGGLER_N_EVENTS
=
100
...
...
@@ -129,16 +115,16 @@ export DETECTOR_PREFIX="${LOCAL_PREFIX}/detector"
mkdir
-p
${
DETECTOR_PREFIX
}
## detector path: actual detector definition path
export
DETECTOR_PATH
=
"
${
DETECTOR_PREFIX
}
/
${
JUGGLER_
DETECTOR
}
"
export
DETECTOR_PATH
=
"
${
DETECTOR_PREFIX
}
/
${
DETECTOR
}
"
## build dir for ROOT to put its binaries etc.
export
ROOT_BUILD_DIR
=
$LOCAL_PREFIX
/root_build
export
ROOT_INCLUDE_PATH
=
${
LOCAL_PREFIX
}
/include:
${
ROOT_INCLUDE_PATH
}
echo
"
JUGGLER_
DETECTOR:
${
JUGGLER_
DETECTOR
}
"
echo
"
JUGGLER_
DETECTOR_CONFIG:
${
JUGGLER_
DETECTOR_CONFIG
}
"
echo
"
JUGGLER_
DETECTOR_VERSION:
${
JUGGLER_
DETECTOR_VERSION
}
"
echo
"DETECTOR:
${
DETECTOR
}
"
echo
"DETECTOR_CONFIG:
${
DETECTOR_CONFIG
}
"
echo
"DETECTOR_VERSION:
${
DETECTOR_VERSION
}
"
echo
"JUGGLER_N_EVENTS:
${
JUGGLER_N_EVENTS
}
"
echo
"JUGGLER_N_THREADS:
${
JUGGLER_N_THREADS
}
"
echo
"JUGGLER_RNG_SEED:
${
JUGGLER_RNG_SEED
}
"
...
...
This diff is collapsed.
Click to expand it.
bin/print_env.sh
+
3
−
3
View file @
9bb0f094
#!/bin/bash
echo
"JUGGLER_TAG:
${
JUGGLER_TAG
}
"
echo
"
JUGGLER_
DETECTOR:
${
JUGGLER_
DETECTOR
}
"
echo
"
JUGGLER_
DETECTOR_CONFIG:
${
JUGGLER_
DETECTOR_CONFIG
}
"
echo
"
JUGGLER_
DETECTOR_VERSION:
${
JUGGLER_
DETECTOR_VERSION
}
"
echo
"DETECTOR:
${
DETECTOR
}
"
echo
"DETECTOR_CONFIG:
${
DETECTOR_CONFIG
}
"
echo
"DETECTOR_VERSION:
${
DETECTOR_VERSION
}
"
echo
"JUGGLER_N_EVENTS:
${
JUGGLER_N_EVENTS
}
"
echo
"JUGGLER_N_THREADS:
${
JUGGLER_N_THREADS
}
"
echo
"JUGGLER_RNG_SEED:
${
JUGGLER_RNG_SEED
}
"
...
...
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