Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precooking random seeds for U4Random #69

Open
ggalgoczi opened this issue Dec 1, 2024 · 2 comments
Open

Precooking random seeds for U4Random #69

ggalgoczi opened this issue Dec 1, 2024 · 2 comments

Comments

@ggalgoczi
Copy link
Collaborator

./opticks/qudarap/tests/rng_sequence.sh run should load/create the random numbers that we need but it relies on QSim/QSimTest

QSim::rng_sequence function precooks the seeds that we need to have in order to use the same random numbers on GPU and Geant4. I tried to compile the QSimTest using opticks/qudarap/tests/CMakeLists.txt but got some errors.

@ggalgoczi
Copy link
Collaborator Author

Could you take a look at this @plexoos ?

@ggalgoczi
Copy link
Collaborator Author

Created random numbers by adding the following code to opticks/g4cx/G4CXOpticks.cc

unsigned ni = 1000000;
int ni_tranche_size_ = 100000;
unsigned nj = 16 ;
unsigned nk = 16 ;
unsigned ni_tranche_size = ni_tranche_size_ > 0 ? ni_tranche_size_ : ni ;
const char* udir = "$HOME/.opticks/precooked/QSimTest/rng_sequence";
qsg->rng_sequence(udir, ni, nj, nk, ni_tranche_size, false );

Will add this code to our fork of Opticks. However when trying to use these random numbers in simg4ox I get:

simg4ox: /esi/opticks/u4/U4Random.cc:607: virtual void U4Random::flatArray(int, double*): Assertion `0' failed.
Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant