[mpich-discuss] Enable Debugging MPICH

ww4192336 at 126.com
Sun May 8 06:56:45 CDT 2016


Hi,
I want to use gdb to step into the code to see what's going on inside the code, for example my code as below, I set a break at the line MPI_Get_processor_name (processor_name, &namelen), I want to step into MPI_Get_processor_name, I configure with --enable-g=all and --enable-fast=O0, but gdb cann't step into MPI_Get_processor_name, it steps into fprintf, what should I do?


#include "mpi.h"
#include <stdio.h>
int main (int argc, char **argv)
{
int myid, numprocs;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];


MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &myid);
MPI_Comm_size (MPI_COMM_WORLD, &numprocs);
MPI_Get_processor_name (processor_name, &namelen);
fprintf (stderr, "Hello World! Process %d of %d on %s\n", myid, numprocs, processor_name);
MPI_Finalize ();
return 0;
}




 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20160508/9fb57fa8/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list