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
4a9fbaa4
Commit
4a9fbaa4
authored
4 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
Changes to be committed:
modified: bin/build_detector.sh modified: bin/env.sh modified: bin/print_env.sh
parent
8458e02d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/build_detector.sh
+34
-23
34 additions, 23 deletions
bin/build_detector.sh
bin/env.sh
+11
-0
11 additions, 0 deletions
bin/env.sh
bin/print_env.sh
+2
-0
2 additions, 0 deletions
bin/print_env.sh
with
47 additions
and
23 deletions
bin/build_detector.sh
+
34
−
23
View file @
4a9fbaa4
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
## =============================================================================
## =============================================================================
## make sure we launch this script from the project root directory
## make sure we launch this script from the project root directory
PROJECT_ROOT
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
/..
#
PROJECT_ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/..
pushd
${
PROJECT_ROOT
}
#
pushd ${PROJECT_ROOT}
## =============================================================================
## =============================================================================
## Load the environment variables. To build the detector we need the following
## Load the environment variables. To build the detector we need the following
...
@@ -21,7 +21,7 @@ pushd ${PROJECT_ROOT}
...
@@ -21,7 +21,7 @@ pushd ${PROJECT_ROOT}
##
##
## You can read options/env.sh for more in-depth explanations of the variables
## You can read options/env.sh for more in-depth explanations of the variables
## and how they can be controlled.
## and how they can be controlled.
source
bin
/env.sh
source
$(
dirname
"
$0
"
)
/env.sh
## =============================================================================
## =============================================================================
## Step 1: download/update the detector definitions (if needed)
## Step 1: download/update the detector definitions (if needed)
...
@@ -29,44 +29,55 @@ pushd ${DETECTOR_PREFIX}
...
@@ -29,44 +29,55 @@ pushd ${DETECTOR_PREFIX}
## We need an up-to-date copy of the detector
## We need an up-to-date copy of the detector
## start clean to avoid issues...
## start clean to avoid issues...
if
[
-d
${
JUGGLER_DETECTOR
}
]
;
then
if
[
-d
"
${
JUGGLER_DETECTOR
}
"
]
;
then
echo
"cleaning up
${
JUGGLER_DETECTOR
}
"
echo
"cleaning up
${
JUGGLER_DETECTOR
}
"
rm
-rf
${
JUGGLER_DETECTOR
}
mv
"
${
JUGGLER_DETECTOR
}
"
/tmp/.
fi
fi
echo
"Fetching
${
JUGGLER_DETECTOR
}
"
echo
"Fetching
${
JUGGLER_DETECTOR
}
"
git clone
-b
${
JUGGLER_DETECTOR_VERSION
}
https://eicweb.phy.anl.gov/EIC/detectors/
${
JUGGLER_DETECTOR
}
.git
git clone
-b
${
JUGGLER_DETECTOR_VERSION
}
--depth
1 https://eicweb.phy.anl.gov/EIC/detectors/
${
JUGGLER_DETECTOR
}
.git
#else
#echo "Updating ${JUGGLER_DETECTOR}"
## We need an up-to-date copy of the detector
#pushd ${JUGGLER_DETECTOR}
## start clean to avoid issues...
#git pull --ff-only
if
[
-d
"
${
BEAMLINE_CONFIG
}
"
]
;
then
#popd
echo
"cleaning up
${
BEAMLINE_CONFIG
}
"
#fi
mv
"
${
BEAMLINE_CONFIG
}
"
/tmp/.
fi
echo
"Fetching
${
BEAMLINE_CONFIG
}
"
echo
"git clone -b
${
BEAMLINE_CONFIG_VERSION
}
--depth 1 https://eicweb.phy.anl.gov/EIC/detectors/
${
BEAMLINE_CONFIG
}
.git"
git clone
-b
${
BEAMLINE_CONFIG_VERSION
}
--depth
1 https://eicweb.phy.anl.gov/EIC/detectors/
${
BEAMLINE_CONFIG
}
.git
## We also need an up-to-date copy of the accelerator. For now this is done
## We also need an up-to-date copy of the accelerator. For now this is done
## manually. Down the road we could maybe automize this with cmake
## manually. Down the road we could maybe automize this with cmake
if
[
-d
accelerator
]
;
then
if
[
-d
accelerator
]
;
then
echo
"cleaning up accelerator"
echo
"cleaning up accelerator"
rm
-rf
accelerator
mv
accelerator
/tmp/.
fi
fi
echo
"Fetching accelerator"
echo
"Fetching accelerator"
git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git
git clone
--depth
1 https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git
#else
# echo "Updating accelerator"
# pushd accelerator
# git pull --ff-only
# popd
#fi
## Now symlink the accelerator definition into the detector definition
## Now symlink the accelerator definition into the detector definition
echo
"Linking accelerator definition into detector definition"
echo
"Linking accelerator definition into detector definition"
ln
-s
-f
${
DETECTOR_PREFIX
}
/accelerator/eic
${
DETECTOR_PATH
}
/eic
ln
-s
-f
${
DETECTOR_PREFIX
}
/accelerator/eic
${
DETECTOR_PATH
}
/eic
ln
-s
-f
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
/
${
BEAMLINE_CONFIG
}
${
DETECTOR_PATH
}
/
${
BEAMLINE_CONFIG
}
popd
## =============================================================================
## =============================================================================
## Step 2: Compile and install the detector definition
## Step 2: Compile and install the detector definition
echo
"Building and installing the
${
JUGGLER_DETECTOR
}
package"
echo
"Building and installing the
${
JUGGLER_DETECTOR
}
package"
mkdir
-p
${
DETECTOR_PREFIX
}
/build
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
JUGGLER_DETECTOR
}
_
build
pushd
${
DETECTOR_PREFIX
}
/build
pushd
${
DETECTOR_PREFIX
}
/
${
JUGGLER_DETECTOR
}
_
build
cmake
${
DETECTOR_PATH
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
&&
make
-j30
install
||
exit
1
cmake
${
DETECTOR_PATH
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
&&
make
-j30
install
||
exit
1
cmake
${
DETECTOR_PATH
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
&&
make
-j30
install
popd
rm
-rf
${
DETECTOR_PREFIX
}
/
${
JUGGLER_DETECTOR
}
_build
mkdir
-p
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
_build
pushd
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
_build
cmake
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
-DCMAKE_INSTALL_PREFIX
=
${
LOCAL_PREFIX
}
-DCMAKE_CXX_STANDARD
=
17
&&
make
-j30
install
||
exit
1
popd
rm
-rf
${
DETECTOR_PREFIX
}
/
${
BEAMLINE_CONFIG
}
_build
## =============================================================================
## =============================================================================
## Step 3: That's all!
## Step 3: That's all!
...
...
This diff is collapsed.
Click to expand it.
bin/env.sh
+
11
−
0
View file @
4a9fbaa4
...
@@ -32,6 +32,15 @@ echo "Setting up the Physics Benchmarks environment"
...
@@ -32,6 +32,15 @@ echo "Setting up the Physics Benchmarks environment"
## in case you would like to modify the detector package or
## in case you would like to modify the detector package or
## number of events to be analyzed during the benchmark
## number of events to be analyzed during the benchmark
if
[
!
-n
"
${
BEAMLINE_CONFIG
}
"
]
;
then
export
BEAMLINE_CONFIG
=
"ip6"
fi
if
[
!
-n
"
${
BEAMLINE_CONFIG_VERSION
}
"
]
;
then
export
BEAMLINE_CONFIG_VERSION
=
"master"
fi
## Detector package to be used during the benchmark process
## Detector package to be used during the benchmark process
if
[
!
-n
"
${
JUGGLER_DETECTOR
}
"
]
;
then
if
[
!
-n
"
${
JUGGLER_DETECTOR
}
"
]
;
then
export
JUGGLER_DETECTOR
=
"topside"
export
JUGGLER_DETECTOR
=
"topside"
...
@@ -110,6 +119,8 @@ echo "LOCAL_DATA_PATH: ${LOCAL_DATA_PATH}"
...
@@ -110,6 +119,8 @@ echo "LOCAL_DATA_PATH: ${LOCAL_DATA_PATH}"
echo
"DETECTOR_PREFIX:
${
DETECTOR_PREFIX
}
"
echo
"DETECTOR_PREFIX:
${
DETECTOR_PREFIX
}
"
echo
"DETECTOR_PATH:
${
DETECTOR_PATH
}
"
echo
"DETECTOR_PATH:
${
DETECTOR_PATH
}
"
echo
"ROOT_BUILD_DIR:
${
ROOT_BUILD_DIR
}
"
echo
"ROOT_BUILD_DIR:
${
ROOT_BUILD_DIR
}
"
echo
"BEAMLINE_CONFIG:
${
BEAMLINE_CONFIG
}
"
echo
"BEAMLINE_CONFIG_VERSION:
${
BEAMLINE_CONFIG_VERSION
}
"
## =============================================================================
## =============================================================================
## Setup PATH and LD_LIBRARY_PATH to include our prefixes
## Setup PATH and LD_LIBRARY_PATH to include our prefixes
...
...
This diff is collapsed.
Click to expand it.
bin/print_env.sh
+
2
−
0
View file @
4a9fbaa4
...
@@ -11,3 +11,5 @@ echo "LOCAL_PREFIX: ${LOCAL_PREFIX}"
...
@@ -11,3 +11,5 @@ echo "LOCAL_PREFIX: ${LOCAL_PREFIX}"
echo
"LOCAL_DATA_PATH:
${
LOCAL_DATA_PATH
}
"
echo
"LOCAL_DATA_PATH:
${
LOCAL_DATA_PATH
}
"
echo
"DETECTOR_PREFIX:
${
DETECTOR_PREFIX
}
"
echo
"DETECTOR_PREFIX:
${
DETECTOR_PREFIX
}
"
echo
"DETECTOR_PATH:
${
DETECTOR_PATH
}
"
echo
"DETECTOR_PATH:
${
DETECTOR_PATH
}
"
echo
"BEAMLINE_CONFIG:
${
BEAMLINE_CONFIG
}
"
echo
"BEAMLINE_CONFIG_VERSION:
${
BEAMLINE_CONFIG_VERSION
}
"
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