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

test: change from CPU to GPU SEvt #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

test: change from CPU to GPU SEvt #94

wants to merge 1 commit into from

Conversation

plexoos
Copy link
Member

@plexoos plexoos commented Jan 15, 2025

No description provided.

@plexoos
Copy link
Member Author

plexoos commented Jan 15, 2025

This change triggers a runtime error:

simg4ox: /esi/opticks/sysrap/SEvt.cc:2182: void SEvt::hostside_running_resize(): Assertion `is_self_provider' failed.
2025-01-15 00:49:26.695 FATAL [380] [SEvt::hostside_running_resize@2175]  NOT-is_self_provider SEvt::descProvider provider.getTypeName QEvent that address is: another object
/__w/_temp/282a72ae-71d4-4728-9193-70d2b0b58e2f.sh: line 3:   380 Aborted                 (core dumped) build/src/simg4ox -g geom/raindrop.gdml -m run.mac
Error: Process completed with exit code 134.

@ggalgoczi
Copy link
Collaborator

Getting error for the same thing for TorchTest. See #89

However this change works for GenSteps.

We need to change per Simon: https://groups.io/g/opticks/topic/sgenerate_with_torch_rtx_on/109912833

Note that SGenerate.h exists to enable comparisons between Opticks
and Geant4 by providing a way of giving some types of
Opticks gensteps to Geant4.

Because of this comparison there are two SEvt instances
to be aware of (with enum EGPU:0 and ECPU:1).

Opticks mostly follows the convention that static method names
are capitalized. Your method AddOpticksHits
looks to be confusing the EGPU and ECPU SEvt instances
and being unaware that you are using static methods.::

    SEvt *sev = SEvt::Get_ECPU();
    unsigned int num_hits = sev->GetNumHit(0);
                            ^^^^^^^^^^^^^^^^^
                 static method : returning EGPU hits despite sev being ECPU event

    unsigned num_hits_gpu = SEvt::GetNumHit(EGPU);
    unsigned num_hits_cpu = SEvt::GetNumHit(ECPU);

It's better to use the _ECPU() _EGPU() methods or the enum to be
clearer.

@plexoos
Copy link
Member Author

plexoos commented Jan 16, 2025

Actually, Simon’s comment makes sense. However, I don’t think we want to run Opticks simulations on the CPU or let Geant4 execute them at this point. If we can get hits from EGPU SEvt, that should suffice.

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

Successfully merging this pull request may close these issues.

2 participants