PDA

View Full Version : Profiling


UH-HPCTools
08-15-2008, 09:09 PM
How to see the profiling of Cn code in detail by using csvprof. It shows host-board communication profiling but how to see detailed profiling of code running on board?

Dangermouse
08-18-2008, 04:29 PM
Hi,

Section 3 of the visual profiler user manual (available with the package for 3.00, or on the support website (http://support.clearspeed.com/documentation/software/release3_10/) for 3.10) describes the CSAPI tracing which is the host-board communication profiling that you have got at the moment. Section 4 describes the CSX tracing which is what you are after.

The example in section 4.4 is probably a good place to start.

If you have a card side executable only then you can launch this as described in the example (or just run 'csgdb <executable.csx>' and enter the commands by hand). If you have a host executable which you need to set up the card side executable then you will need to connect the debugger as described in the SDK Reference Manual (available on the same page above, ou will have to be logged in to view). This will involve setting CS_CSAPI_DEBUGGER=1 and possibly CS_CSAPI_DEBUGGER_ATTACH=1 depending on how you work, you can then enter the commands as described in the example.

UH-HPCTools
09-09-2008, 11:00 PM
Thanks for the reply. Can you please tell how to instrument API in the host code to get the profiling of host or give an example for the same. Also what will be the script commands to run for host profiling?

UH-HPCTools
10-06-2008, 11:01 PM
How to get the summary of GUI results seen in CS Visual Profiler?

Dangermouse
10-07-2008, 07:40 AM
Hi, I'm not sure I understand your last question, can you elaborate please? I'm not sure what results you would like to summarise.

Regarding the earlier one (which I missed before) about the host instrumentation, this is done by linking your host application with the csvprof_trace library, including the csvprof_trace.h header and calling the relevant functions as described in section 6.1 of the visual profiler user manual.

Have you downloaded the finance examples? The "monte-carlo" example (pricing and Asian option using the Monte Carlo method) has been instrumented using the host API so perhaps that will help you?

UH-HPCTools
10-07-2008, 04:43 PM
Thanks for your quick reply. Summary of results means, total how much time consumed in data transfer from host to board & from mono to poly? how much time spent in actual computation?

Dangermouse
10-10-2008, 12:06 PM
You can put markers at the start and end of blocks to determine the duration of an event (or a set of events). Use the left mouse button for one marker and the right button for the other. The time (and the units) will appear in the time panel above the events.

Hopefully that helps...