-
Notifications
You must be signed in to change notification settings - Fork 1
Performance studies #142
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
base: main
Are you sure you want to change the base?
Performance studies #142
Conversation
5c85f89 to
7b8a75d
Compare
5142852 to
b60690d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/src/g4appmt.h b/src/g4appmt.h
index f0f0020..88258fc 100644
--- a/src/g4appmt.h
+++ b/src/g4appmt.h
@@ -125,2 +125 @@ struct PhotonHit : public G4VHit
- G4cout << "Detector id: " << fid << " energy: " << fenergy << " nm"
- << " time: " << ftime << " ns"
+ G4cout << "Detector id: " << fid << " energy: " << fenergy << " nm" << " time: " << ftime << " ns"
Have any feedback or feature suggestions? Share it here.
c50baae to
c9db7a7
Compare
c9db7a7 to
fb9a812
Compare
|
Added PATH so the script can be called from anywehere. @plexoos do you know why I do not see all the output in does not capture all output for some reason? when I call
|
Added logging functionality to capture G4 printouts from the performance run. Including number of Opticks hits
|
previous problem solved in 4096e4e |
Added section on user-defined inputs and geometry loading.
Clarified the explanation of setStackPhotons and added details about GDML geometry import.
Added explanation for performance studies comparing EIC-Opticks and G4 simulations.
|
@plexoos can you review and merge the changes into main? I am done. |
|
@ggalgoczi I am testing this PR |
| /process/optical/cerenkov/setStackPhotons {flag} | ||
| /run/initialize | ||
| /run/beamOn 50000 | ||
| /run/beamOn 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this number reduced? What small GPU RAM are you referring to? For consistency, we should be able to reproduce the published results using the same number of events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this repository, the event count is set to a conservative default because the goal of this example is to help users get a first successful run with EIC-Opticks and understand the workflow, not to serve as a paper quality reproduction test. Since users run on a wide range of hardware, a high default can fail on GPUs with limited VRAM and lead to crashes/segfaults that are frustrating to debug as a first step.
Also, because we swapped the geometry, the performance and scaling will not match the paper one-to-one anyway, the achievable speedup depends on geometry and workload characteristics.
To keep things consistent and reproducible, the README explicitly notes that users should set the event count themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what kind of speedup do you see with this geometry? Is it far from the public numbers?
If I use pfrich_min_FINAL.gdml and the patch for open cones, should I expect to reproduce the numbers in the paper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I did not check. Can you check how much speedup you get?
-
Yes. I tested it and sent you the example result Dec 8. 3:58 PM in mattermost chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 9801725..3bc042d 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101 +101 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
+ const float t_cand = fminf(roots);
Have any feedback or feature suggestions? Share it here.
|
You need to modify the eic-opticks code by running the cone modification script , building eic-opticks and the executable again if you want to run the performance script on pfrich. Did you do all? If yes I will check this out. |
A cone modification script? Do you mean there’s something in addition to applying this patch 04f4d4a that I should run? |
|
Okay, I rebuilt everything from scratch to make sure there were no leftovers from previous tests, and I’m still seeing a speed-up factor of about ~30 between single-threaded G4 and OptiX, as shown in the plot above. Please check. |
|
Why did you do those modifications in 04f4d4a ? It is different from I did when I got the code working. See my modification script: Now I am seeing the following speedup: 170x speedup wrt to single thread G4 and 10x wrt to 20 MT G4. How did I get these number:
Also if you modify eic-opticks or the example source code do not forget to build, eg. in my case I used:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Used clang-format v18.1.3
Click here for the full clang-format patch
diff --git a/CSG/csg_intersect_leaf_newcone.h b/CSG/csg_intersect_leaf_newcone.h
index 01a9845..fe8068e 100644
--- a/CSG/csg_intersect_leaf_newcone.h
+++ b/CSG/csg_intersect_leaf_newcone.h
@@ -101,2 +101,2 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- const float t_cand = fminf(roots) ;
-
+ const float t_cand = fminf(roots) ;
+
@@ -106,11 +106,3 @@ void intersect_leaf_newcone( bool& valid_isect, float4& isect, const quad& q0, c
- float3 intersection_point = make_float3(
- o.x + t_cand * d.x,
- o.y + t_cand * d.y,
- o.z + t_cand * d.z
- );
- float3 n = normalize(make_float3(
- intersection_point.x,
- intersection_point.y,
- (z0 - intersection_point.z)*tth2
- ));
-
+ float3 intersection_point = make_float3(o.x + t_cand * d.x, o.y + t_cand * d.y, o.z + t_cand * d.z);
+ float3 n =
+ normalize(make_float3(intersection_point.x, intersection_point.y, (z0 - intersection_point.z) * tth2));
Have any feedback or feature suggestions? Share it here.
This reverts commit 8936907.
Move gun so the opticks_raindrop.gdml has photons created
|
I confirm that when moving the particlegun to 0,0,0 mm (I just pushed this change into the branch) and running I see performance data created in |
|
@plexoos could you take a look? |

No description provided.