-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GPU geometry transfer fix and stack limit configuration option (#312)
- Fix for the copy of the surface model to GPU, which was being called from all threads - Removed the hardcoded device stack limit and added a configuration option in the macro - Added the line `SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags")` to `Example1/CMakeLists.txt` which solves an issue where Geant4 libraries would not be properly linked in some systems
- Loading branch information
1 parent
c2a5fe8
commit 5ea9d08
Showing
12 changed files
with
127 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# SPDX-FileCopyrightText: 2023 CERN | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# example23.in | ||
# | ||
|
||
## ============================================================================= | ||
## Geant4 macro for modelling simplified sampling calorimeters | ||
## ============================================================================= | ||
## | ||
/run/numberOfThreads 1 | ||
/control/verbose 0 | ||
/run/verbose 0 | ||
/process/verbose 0 | ||
/tracking/verbose 0 | ||
/event/verbose 0 | ||
## | ||
/adept/setSeed 1 | ||
|
||
/detector/filename @GDML@ | ||
# Temporary workaround since we don't have a G4 to VecGeom converter | ||
/adept/setVecGeomGDML @GDML@ | ||
/adept/setVerbosity 0 | ||
## Threshold for buffering tracks before sending to GPU | ||
/adept/setTransportBufferThreshold 2000 | ||
## Total number of GPU track slots (not per thread) | ||
/adept/setMillionsOfTrackSlots 1 | ||
/adept/setMillionsOfHitSlots 1 | ||
/adept/setCUDAStackLimit 8192 | ||
|
||
# If true, particles are transported on the GPU across the whole geometry, GPU regions are ignored | ||
/adept/setTrackInAllRegions true | ||
# In order to do the GPU transport only in specific regions | ||
/adept/addGPURegion EcalRegion | ||
/adept/addGPURegion HcalRegion | ||
|
||
|
||
## ----------------------------------------------------------------------------- | ||
## Optionally, set a constant magnetic filed: | ||
## ----------------------------------------------------------------------------- | ||
/detector/setField 0 0 0 tesla | ||
#/detector/setField 0 0 3.8 tesla | ||
|
||
## ----------------------------------------------------------------------------- | ||
## Set secondary production threshold, init. the run and set primary properties | ||
## ----------------------------------------------------------------------------- | ||
/run/setCut 0.7 mm | ||
/run/initialize | ||
|
||
## User-defined Event verbosity: 1 = total edep, 2 = energy deposit per placed sensitive volume | ||
/eventAction/verbose 2 | ||
|
||
/gun/setDefault | ||
/gun/particle e- | ||
/gun/energy 10 GeV | ||
/gun/number 200 | ||
/gun/position 0 0 0 | ||
/gun/print true | ||
|
||
# If false, the following parameters are ignored | ||
/gun/randomizeGun true | ||
# Usage: /gun/addParticle type ["weight" weight] ["energy" energy unit] | ||
/gun/addParticle e- weight 1 energy 10 GeV | ||
/gun/addParticle proton weight 0 energy 10 GeV | ||
/gun/minPhi 0 deg | ||
/gun/maxPhi 360 deg | ||
/gun/minTheta 10 deg | ||
/gun/maxTheta 170 deg | ||
|
||
## ----------------------------------------------------------------------------- | ||
## Run the simulation with the given number of events and print list of processes | ||
## ----------------------------------------------------------------------------- | ||
|
||
/adept/setSeed 1 | ||
|
||
# run events with parametrised simulation | ||
# by default all created models are active | ||
/run/beamOn 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters