Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amadio/g4run
Simple Generic Program to Run Geant4 Simulations
https://github.com/amadio/g4run
geant4 performance-monitoring performance-visualization
Last synced: 19 days ago
JSON representation
Simple Generic Program to Run Geant4 Simulations
- Host: GitHub
- URL: https://github.com/amadio/g4run
- Owner: amadio
- License: bsd-2-clause
- Created: 2020-04-20T12:41:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T09:55:08.000Z (about 2 years ago)
- Last Synced: 2024-10-22T23:28:45.003Z (2 months ago)
- Topics: geant4, performance-monitoring, performance-visualization
- Language: Perl
- Homepage:
- Size: 6.69 MB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# g4run - simple generic runner for Geant4 simulations
This program takes as input a GDML file, a primary particle type and its
initial energy (position is always the origin), an optional a reference physics
list (default is `FTFP_BERT`), and runs an event loop in batch mode or an
interactive session. Its intented use is in profiling and benchmarking Geant4
performance.# Installation
The g4run can be built on your system by either manually compiling geant4 or by using the Jenkins CI and CVMFS.
To get started with the build , you need to first set up the CVMFS and mount Geant4 in it and get the bare clone of Geant4 to g4run.Please install the CVMFS on your machine reffering the [ CVMFS Installation Guide ](https://cvmfs.readthedocs.io/en/stable/cpt-quickstart.html).
After installing it, you need to mount the Geant4 into the CVMFS
```
$ mount -t cvmfs geant4.cern.ch /cvmfs/geant4.cern.ch
$ cvmfs_config probeProbing /cvmfs/geant4.cern.ch... OK
```
If you get the last line as the output then your geant4 was successfully mounted on your CVMFS.
Go ahead into the `/g4run` directory and then create a `g4run/git` directory inside it. Now get the bare clone of Geant4 into this directory for allowing the Jenkins Scripts later to identify the head from this.Inside the `/g4run` directory
```
$ mkdir git
$ cd git
$ git clone --bare https://github.com/geant4/geant4.git
```
Next you need to take a look at the different versions available using the `$git tag` command into `git/geant4.git` and set the variables for the GIT_PREVIOUS_COMMIT and the GIT_COMMIT which will be pointing towards two different versions of Geant4. `env GIT_PREVIOUS_COMMIT=version1 GIT_COMMIT=version2 ci/jenkins.sh` where version1 and version2 are two git tags from the Geant4 git repository.Again into the `/g4run` directory
```
$ env GIT_PREVIOUS_COMMIT=v11.0.0 GIT_COMMIT=v11.0.2 ci/jenkins.sh
```# Running the Tests
In order to make perf work as expected, You need to modify some of your kernel parameters.```
$ sudo sysctl kernel.kptr_restrict=0
$ sudo sysctl kernel.perf_event_paranoid=-2
```
In order to run the tests, You need to install and build [Pythia](https://pythia.org/) as instructed. After successfully installing Pythia you are all set to run the tests using the command
```$ ctest```.
In case if you need a detailed test logs then you can do it as verbose by running
```$ ctest --VV```
and now you can run the reports with
```$ ctest -R report```### Visualizing the reports
You can already generate the perf reports by running the `ctest`. Further, Those perf reports are converted into the CSV data file with the help of scripts present in `g4run/perf/scripts` directory. For hierarchical data used for TreeMaps or Sunbursts, You can use the perf2treemap script.
```
$ ./perf2csv filename.perf
$ ./perf2treemap filename.perf
```
This will generate the CSV files.Make a new data directory inside `g4run/perf/g4Web` Generate those CSVs to the path `g4run/perf/g4Web/data` and now from the `/g4Web` directory run the HTTP server
`$ python -m http.server `
And now you can visualize your data file into the dedicated tab into the g4Web.