next up previous
Next: Collective Operations Up: General Capabilities Previous: Clusters

   
Miscellaneous Functions

A number of p4 library functions are of general utility. Program sections can be timed to the millisecond with the p4_clock routine, and on most machines to the microsecond with the p4_usclock routine. The function p4_dprintf can be used to print user messages, which p4 will route back to the terminal where the p4 application was started. The message will be automatically tagged with the identifier of the process that issued it. p4_dprintfl takes a level number as an argument, so that messages can be filtered by debugging level, which is a command-line argument. Since p4 itself is instrumented with p4_dprintfl's (although a compile-time switch can remove them), it is possible to get detailed traces of the internal activities of p4, sometimes necessary to catch even a user bug. p4_error, called by either p4 or the user, attempts to produce a useful error message and then causes all processes to exit.



Karen D. Toonen
1998-11-19