[mpich-discuss] MPICH2 hangs during debug
Jayesh Krishna
jayesh at mcs.anl.gov
Thu Dec 9 12:22:23 CST 2010
Hi,
The MPI_BCast() shown the code below is not an MPI function. We might be able to help you if you provide us with the complete/real code (containing the MPI call).
Can you debug simple MPI applications (eg: https://svn.mcs.anl.gov/repos/mpi/mpich2/trunk/examples/cpi.c) using VS ? I want to make sure that your debugger setup is right before proceeding with debugging your code.
(PS: The pseudo code looks alright. However I see that you are reading the same file from all MPI processes - is this intentional ?)
Regards,
Jayesh
----- Original Message -----
From: Prashanth <prashanth.dumpuri at gmail.com>
To: mpich-discuss at mcs.anl.gov
Sent: Thu, 09 Dec 2010 11:36:00 -0600 (CST)
Subject: [mpich-discuss] MPICH2 hangs during debug
All,
I'm have an application/main program that I need to debug on an Intel Quad
core machine that is running Windows XP. I'm using Visual Studio 2005 and
have set up the debugger to use MPI (followed the instructions on their
website). Here is how my main program looks (and please let me know if i
need to change its structure):
int main()
{
MPI Initialize;
let all 4 processors read the input files;
instantiate class1;
instantiate array1 to hold output1 from class1
if ( rank==0 ) { class1-> process inputs and generate output1; copy
output1 to array1; } // this filter that has been implemented as a class
does not need to be parallelized
MPI_BCast( array1 to all nodes );
delete class1 object;
delete array1 object;
instantiate class2;
class2->process inputs, use output1 and generate output2; // this step has
been parallelized
instantiate class3;
class3->process inputs, use output2 and generate output3; // this step has
been parallelized
if ( rank==0 ) { write output3 to a file; }
delete class2 object;
delete class3 object;
MPI Finalize;
}
The code runs fine but I have some memory leaks and 'am working on fixing
it. Visual Studio 2005 debugger hangs at the MPI_BCast command. I need to
get past that command so I can find the memory leaks. Any thoughts on how to
fix this will be greatly appreciated.
Thanks
Prashanth
More information about the mpich-discuss
mailing list