Parallel Debugging Tip 3: Finding Source Files in a Parallel Debugging Session

The debugger is not able to display source code if it cannot find the source file in the directory specified in the application binary file, or in the directory in which the binary resides.

Specifying the -I option in the command line fixes the problem. When launching a debugging session using the mpirun command, this option should follow the -idbopt option.

Alternatively, applying the use command or the map source directory command to all the leaf debuggers can overcome the problem as well.

Example

(idb) w
Source file not found or not readable, tried...
    ./cpi.c
    /usr/users/smith/idb-sandbox/test/src/common/Funct/bin/cpi.c
(Cannot find source file mpirun.c)
(idb) use /usr/proj/debug/idb/test/src/common/Funct/src
   [0:7] Directory search path for source files:
   [0:7]  . /usr/users/smith/idb-sandbox/test/src/common/Funct/bin /usr/proj/debug/idb/test/src/common/Funct/src
(idb) w
   [0:7]      20
   [0:7]      21 double f(double);
   [0:7]      22
   [0:7]      23 int main(int argc, char *argv[])
   [0:7]      24 {
   [0:7]      25     int done = 0, n, myid, numprocs, i;
   [0:7]      26     double PI25DT = 3.141592653589793238462643;
   [0:7]      27     double mypi, pi, h, sum, x;
   [0:7]      28     double startwtime = 0.0, endwtime;
   [0:7]      29     int  namelen;

Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.