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 -@ calcThis 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_barrierThe 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.