Profiling upc++ code.

65 views
Skip to first unread message

Ngoc Phuong Chau

unread,
Feb 20, 2020, 7:42:06 AM2/20/20
to UPC++
Dear all,
I wanna check the CPU, times and memories and energy consumption of a program, which used upc++ code.
For example, I can use cProfile for profiling python codes.
Please give me some suggestion about that!
Thank you so much!
Best regards,

Dan Bonachea

unread,
Feb 21, 2020, 3:32:14 AM2/21/20
to Ngoc Phuong Chau, UPC++, John Mellor-Crummey
Hi Ngoc -

UPC++ is a C++ library, so your favorite C++ profiling tool might just work.
That being said, many profiling tools assume single-process, so those may not work as well for multi-process UPC++ runs.

As an example you can use gprof (which is mostly a single process tool, but is more or less universally available), although you'll need some minor tweaks to get usable output due to the way GASNet tears down the job at exit time - see the `#if USE_GPROF` blocks in bench/put_flood.cpp

If you happen to be on a Cray, the CrayPat parallel profiling tool is nicely integrated with everything and should Just Work.

Another tool worth mentioning is HPCToolkit, although I'm unsure of their current support level for UPC++/GASNet jobs - I highly recommend asking them.

I don't have any other concrete tool suggestions at the moment.. as library developers we generally optimize bottom-up instead of top-down, so usually use hand-rolled timers instead of all-encompassing profiling tools.

Hope this helps..
-D


--
You received this message because you are subscribed to the Google Groups "UPC++" group.
To unsubscribe from this group and stop receiving emails from it, send an email to upcxx+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/upcxx/ad98b305-3683-4566-af2d-50f77221372a%40googlegroups.com.

Ngoc Phuong Chau

unread,
Feb 21, 2020, 3:55:30 AM2/21/20
to UPC++
Thank you so much!
I will try it.
Have a nice day!
Reply all
Reply to author
Forward
0 new messages