Skip to content

Conversation

@vincepandolfo
Copy link
Contributor

@vincepandolfo vincepandolfo commented Aug 6, 2016

The aim of this PR is to improve the profiling capabilities of Devito (also fixing issue #65 )

  • Profiling information are now stored in a numpy array in the Propagator instead of being printed to stdout
  • Profiles the kernel, the time loop stencils (before and after space loops) and the space loops.
  • The logic for executing Propagator.cfunction has been moved down to the propagator. This should also make easier to execute it when the user uses the low level Propagator interface directly.

if time_stepping or time_loop_stencils_b else [])
initial_block = initial_block + start_time_stmt
end_block = end_time_stmt + omp_single + ([cgen.Block(time_loop_stencils_a)]
if time_loop_stencils_a else end_time_stmt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omp_single should have been inside the parenthesis here :
(omp_single + [cgen.Block(time_stepping + time_loop_stencils_b)] if time_stepping or time_loop_stencils_b else [])
to avoid empty omp sigle section breaking the compilation. Does your change fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I didn't know that. I think my changes breaks it.

return self.propagator.timings[2]

@property
def total_post_loops_time(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we document pre_loops and post_loops ? what do they mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre_loop and post_loop are operations done outside of the spacial loop :
for (t=...)
pre_loop
for (x=.., y=...)
stencils, factors,...
endforxyz
post_loop
endfort

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm what I am saying but I believe pre and post loops were old names for these variables which were later changed to time_loop_stencils. During some rebase/merge conflict resolution these old names seem to have crept back in and right now both versions of these names exist in the code creating redundancy. AFAIK, these old names pre_loop and post_loop are not being used anywhere in the code and I have been meaning to open a PR to remove them (again).

If you can confirm the above, please feel free to remove this.

Copy link
Contributor Author

@vincepandolfo vincepandolfo Aug 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I have not seen those names anywhere in the code. I used them just because they were much shorter than time_loops_stencils.

Right now I am working on completely redoing the profiler by making a profiler class. I will close this PR until the new version is ready (it should be ready tomorrow) if it's not urgent to have this one merged.

@navjotk
Copy link
Member

navjotk commented Aug 8, 2016

This needs to be tested on MIC.

@vincepandolfo
Copy link
Contributor Author

Works on MIC

@ggorman
Copy link
Contributor

ggorman commented Aug 8, 2016

How did you test this?

On Mon, 8 Aug 2016 at 15:46 Vincenzo Pandolfo [email protected]
wrote:

Works on MIC


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#74 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFJRA67-ncl_SE216Bxf6tsE8cG4gxb7ks5qd0E8gaJpZM4JePN5
.

@vincepandolfo
Copy link
Contributor Author

@pvelesko did

ZoeLeibowitz added a commit that referenced this pull request Apr 3, 2025
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.

7 participants