Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
cepc
CEPCSW
Commits
484e3b68
Commit
484e3b68
authored
4 years ago
by
lintao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
WIP: add a run.sh script and update the README.
parent
3d8b9253
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-5
3 additions, 5 deletions
README.md
run.sh
+72
-0
72 additions, 0 deletions
run.sh
with
75 additions
and
5 deletions
README.md
+
3
−
5
View file @
484e3b68
...
@@ -12,14 +12,12 @@ $ /cvmfs/container.ihep.ac.cn/bin/hep_container shell SL6
...
@@ -12,14 +12,12 @@ $ /cvmfs/container.ihep.ac.cn/bin/hep_container shell SL6
Before run following commands, please make sure you setup the CVMFS:
Before run following commands, please make sure you setup the CVMFS:
```
```
$ source /cvmfs/cepcsw.ihep.ac.cn/prototype/releases/externals/97.0.2/setup.sh
$ git clone git@github.com:cepc/CEPCSW.git
$ git clone git@github.com:cepc/CEPCSW.git
$ cd CEPCSW
$ cd CEPCSW
$ git checkout master # branch name
$ git checkout master # branch name
$ mkdir build && cd build
$ source setup.sh
$ cmake .. -DHOST_BINARY_TAG=${BINARY_TAG}
$ ./build.sh
$ make
$ ./run.sh Examples/options/helloalg.py
$ ./run gaudirun.py '$EXAMPLESROOT/options/helloalg.py'
```
```
## Packages
## Packages
...
...
This diff is collapsed.
Click to expand it.
run.sh
0 → 100755
+
72
−
0
View file @
484e3b68
#!/bin/bash
##############################################################################
# Run script for CEPCSW:
# - run a simple job
#
# Usage:
# $ ./run.sh Examples/options/helloalg.py
# or:
# $
#
# Author: Tao Lin <lintao@ihep.ac.cn>
##############################################################################
function
info:
()
{
echo
"INFO:
$*
"
1>&2
}
function
error:
()
{
echo
"ERROR:
$*
"
1>&2
}
function
check-cepcsw-envvar
()
{
# CEPCSWEXTERNAL is defined in /cvmfs/cepcsw.ihep.ac.cn/prototype/releases/externals/
if
[
-z
"
${
CEPCSWEXTERNAL
}
"
]
;
then
error:
"The CEPCSW is not setup. Please source setup.sh."
return
1
fi
}
function
build-dir
()
{
local
blddir
=
build
# If detect the extra env var, append it to the build dir
if
[
-n
"
${
lcg_version
}
"
]
;
then
blddir
=
${
blddir
}
.
${
lcg_version
}
fi
if
[
-n
"
${
lcg_platform
}
"
]
;
then
blddir
=
${
blddir
}
.
${
lcg_platform
}
fi
echo
$blddir
}
function
check-working-builddir
()
{
local
blddir
=
$(
build-dir
)
if
[
!
-d
"
$blddir
"
]
;
then
mkdir
$blddir
||
{
error:
"Failed to create
$blddir
"
return
1
}
fi
}
function
run-job
()
{
local
blddir
=
$(
build-dir
)
$blddir
/run gaudirun.py
$*
}
##############################################################################
# Parse the command line options
##############################################################################
# The current default platform
lcg_platform
=
x86_64-slc6-gcc8-opt
lcg_version
=
97.0.2
check-cepcsw-envvar
||
exit
-1
check-working-builddir
||
exit
-1
run-job
$*
||
exit
-1
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