-
Notifications
You must be signed in to change notification settings - Fork 14
Differentiate timing per run type #239
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?
Conversation
b1d2108
to
5f5f468
Compare
@pabloseleson can you run 1. any PD only case 2. DEM only powder fill and 3. hybrid fragmentation? |
70a939f
to
c8ec68e
Compare
c8ec68e
to
301bbaf
Compare
|
||
template <typename ContactType> | ||
struct TimingOutput< | ||
ContactType, NoContact, |
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 Line 98, we have "ForceType, NoContact," and in Line 234 we have "ForceType, ContactType,"
What is "ContactType, NoContact," for? It is also awkward to have "NoContact" and then enable if contact.
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.
There are 3 options: PD only, DEM only, and PD+contact (in that order in this file). The naming is clear to me, but if you have a specific suggestion that's fine with me.
For your last point, it checks whether the first model ContactType
is a contact model. The second NoContact
is unused here
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.
Well, the different cases are clear from the log, e.g., "log( out, "Running DEM only.\n" );"
Regarding:
PD only: ForceType, NoContact
DEM only: ContactType, NoContact
PD+contact: ForceType, ContactType
I see now that "ForceType" refers to PD and "ContactType" to DEM.
So, while "NoContact" in DEM-only initially seemed awkward, it's probably fine.
if constexpr ( is_fracture<ForceType>::value ) | ||
log( out, std::fixed, std::setprecision( 6 ), step, "/", num_steps, | ||
" ", std::scientific, std::setprecision( 2 ), step * dt, " ", | ||
W, " ", relative_damage, " ", std::fixed, total, " ", force, |
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.
What is relative_damage? Same in Line 261.
Same in Cabana_PD_Solver.hpp Line 543.
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.
See #238
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 see:
double relative_damage = global_damage / particles.numGlobal();
Is this the total damage divided by the total number of particles? In that case, would that be the "average damage"? Why "relative"?
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.
Notably not related to this PR.
But just word choice - either way it's scaled so that zero broken bonds returns zero and every bond broken is one
@@ -411,13 +422,16 @@ class Solver | |||
} | |||
|
|||
// Final output and timings. | |||
_total_timer.stop(); |
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 see total_timer starts and stops in multiple times. However, when do we store the partial times for individual components?
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 don't understand the question
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 guess the other timers, e.g., force, do not appear here because they were not changed?
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.
Yes those are unchanged
src/CabanaPD_Solver.hpp
Outdated
"Integrate-Time(s) Energy-Time(s) Output-Time(s) " | ||
"Particle*steps/s" ); | ||
// Add timings that aren't included elsewhere (particles are created | ||
// external to the solver). |
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.
Comment "(particles are created external to the solver)" is unclear to me. Same in Line 533.
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.
Tried to clarify
Results for Elastic Wave (8 threads) CabanaPD Thu Aug 21 11:58:11 2025 Host Parallel Execution Space: Threads Runtime Configuration: Running PD only. Init-Time(s): 0.05586 #Procs Particles | Total Force Neighbor Comm Integrate Energy Output Other | #Steps/s Particle-steps/s Particle-steps/proc/s Results for Crack Branching (8 threads) Host Parallel Execution Space: Threads Runtime Configuration: Running PD only. Init-Time(s): 0.914002 #Procs Particles | Total Force Neighbor Comm Integrate Energy Output Other | #Steps/s Particle-steps/s Particle-steps/proc/s Results for Powder Fill (1 thread) CabanaPD Thu Aug 21 11:21:24 2025 Host Parallel Execution Space: Threads Runtime Configuration: Running DEM only. Init-Time(s): 0.050676 #Procs Particles | Total Force Neighbor Comm Integrate Output Other | #Steps/s Particle-steps/s Particle-steps/proc/s Results for Fragmenting Cylinder (8 thread) Host Parallel Execution Space: Threads Runtime Configuration: Running hybrid DEM-PD. Init-Time(s): 0.471343 At the end of the run I got a Segmentation fault. |
I updated the final time for now
|
Shorter version of outputs: Results for Elastic Wave (8 threads) Running PD only. Init-Time(s): 0.05586 #Procs Particles | Total Force Neighbor Comm Integrate Energy Output Other | #Steps/s Particle-steps/s Particle-steps/proc/s Results for Crack Branching (8 threads) Running PD only. Init-Time(s): 0.914002 #Procs Particles | Total Force Neighbor Comm Integrate Energy Output Other | #Steps/s Particle-steps/s Particle-steps/proc/s Results for Powder Fill (1 thread) Running DEM only. Init-Time(s): 0.050676 #Procs Particles | Total Force Neighbor Comm Integrate Output Other | #Steps/s Particle-steps/s Particle-steps/proc/s Results for Fragmenting Cylinder (8 thread) Running hybrid DEM-PD. Init-Time(s): 0.471343 |
Force-Contact-Time(s) Neighbor-Contact-Time(s) seems to be missing in Running DEM only. |
I just labeled that as Force and Neighbor (and only differentiated for the hybrid case) |
Timings differ for:
Simplify internal solver timers as well