from the start of your program, after a certain activitiy, say after 10
lines use print statement with STOP/EXIT , also printing processor rank.
If u get all the processors than its fine. Move this printing little ahead
and get printing again. Repeat this process until u reach the place of
fault. Still u need to guess/observe what is the error in code. with print
statement u will reach in the vicinity/segment of error. What is the
error-----u need to observe.