How to Use Tracing



next up previous
Next: The XPVM Console Up: New PVM Tracing Previous: New PVM Tracing

How to Use Tracing

When tracing is turned on, events are generated for PVM calls. These events describe a call to the PVM library. For instance, a call to pvm_send() will generate two events, pvm_send0 and pvm_send1. The pvm_send0 event is generated upon entry into the pvm_send() routine. The pvm_send0 event contains a timestamp, the task, and message type used when the pvm_send() routine was called. The pvm_send1 event is generated at the end of the pvm_send() call. It contains a timestamp and the return value of the send call. Most events come in pairs. This allows one to determine the amount of time spent within a call.

An easy way to trace a PVM program is to simply start it from the PVM console with the trace option:

pvm> spawn -@ calc
This will cause the calc program to be spawned with tracing turned on. Trace events will be sent to the PVM console and displayed there. Tracing of particular routines can be turned on or off by the PVM console. For instance, if only calls to pvm_barrier() are of interest then the following commands in the console will activate tracing for only the barrier calls:
pvm> trace - *
pvm> trace + pvm_barrier
The first command turns off tracing for all routines. The second command turns on tracing for the barrier routine.

Another way to use tracing is to activate it from within a PVM program. When spawning a task, tracing for the spawned tasks can be activated by using the PvmTaskTrace flag in the pvm_spawn() call. This flag tells PVM that the tasks created by the spawn call should have tracing turned on. Each call to PVM in the newly spawned task will generate a trace events.

Each trace event actually generates a PVM message. When spawning from the console, these event messages are sent to the console which displays their contents. Using the pvm_setopt() routine, the destination for these trace events can be set to any PVM task. Similarly the pvm_settmask() routine can be used to set a mask indicating which PVM routines should generate trace events. More details on how to control tracing can be found in the PVM man pages.



next up previous
Next: The XPVM Console Up: New PVM Tracing Previous: New PVM Tracing



Jack Dongarra
Sun Dec 18 11:30:23 EST 1994