Download Developer MagicTM: Debugger User's Guide
Transcript
Multiple Process Debugging [10] This still produces the right answer with one process running, but the wrong answer when running with multiple processes. The local variables look right, there are no equivalence statements, and inew uses only simple indexing. The likely item to check is aggregate. Your next step is to look at aggregate with the Debugger. 5. Compile the program with -g option as follows: % f77 -g -mp total.f -o total 6. If your debugging session is not running on a multiprocessor machine, you can force the creation of two threads, for example purposes, by setting an environment variable. If you use the C shell, type: % setenv MP_SET_NUMTHREADS 2 Is you use the Korn or Bourne shell, type: $ MP_SET_NUMTHREADS=2 $ export MP_SET_NUMTHREADS 7. Enter the following to start the Debugger: % cvd total & The Main View window displays. 8. Select the following from the Main View menu bar to show the line numbers: Display ->Show Line Numbers 9. Select the following from the Main View menu bar: Source ->Go To Line... And enter 44. Line 44 is as follows: aggregate(ii,jj) = aggregate(ii,jj) + inew(i,j) 10. You will now set a stop trap at this line, so you can see what each thread is doing with aggregate, ii, and jj. You want this trap to affect all threads of the process group. One way to do this is to turn on trap inheritance in the Multiprocess View Preferences dialog. To open this dialog, 007–2579–005 149