Debugging mpC applications is not yet an easy task, but it is much simpler than debugging MPI applications due to the absence of indeterminism. There are at least three levels of debugging.

xx xxx xxx xxxxx, xx xxxxxxx xxxxxxxxx xx xxx xxx xxxx xxxxx xx xxx_xxxxxx_xxxxxxx xxx xxx_xxxxxxx xx xxxxx xxx xxxxxxx xxxxxxxxx xxxx xxxxx xxxxxxxxxx xxxxxxxx. xxx xxx_xxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxx xxx xxxxxxxxxx xxxxxx. xxxx xxxx xxxx xxx_xxxxxx xxxxxxxx xxx xx xxxx xx xxxxxx xxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxx xxxxx. xx xx xxxx xxxxxxxx xx xxx xxxxxx, xxx xxx xxxxxx xxxx xxxxxx xxxxxxxxx xxx xx xxxx. xx xxxxxxxx xxxxxxxxx xxxxxxxx xxxx xxxxxxxxx xx x xxxxxx xxxxxxxxxxx. xxx xxxxx xxxxxxxx xxxxxxx xxxxxx xxxxxxxx xx xxx xxx xxxxxx xxxx xx xx,xx, xx xxx xxxxx xxxxx xxxxx xx xxx xxxxxxxxxx xxxxxxx.

At the middle level, we suggest to include printfs and barriers in the C code generated by mpcc. This is a more complex procedure, as the user needs to understand the logics of the generated C code and RTS kernel calls.

xx xxx xxx xxxxx xx xxxxxxxxx, xxx xxxx xxx xxxx xxxxxx xxxxxxx xx xxx/xx xxx xxxxxxxxx xxx xxxxxxxxx. xx xxxx xxxxxxx xx, xxx xxxx xxxxxx xxxxx xxx xxxxxxx xxx, xxx xxxxxxxxxxxx xx x xx x, xxx xxxx xxxxxx xxx xxx.

To debug an application, which hangs without error messages, first use MPI utilities to find all the processes that do not respond (for example, LAM MPI’s mpitask). They often “die” due to a simple “C error”, such as an un-initialized variable, dividing by zero and so on. The trace is useful for finding the point in the code where the error occurs. When all processes are alive, the MPI utility will show operations where all the processes are blocked.

Parallel Computing on Heterogeneous Networks
Parallel Computing on Heterogeneous Networks (Wiley Series on Parallel and Distributed Computing)
Year: 2005
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net