Software Archive
Read-only legacy content
17061 Discussions

Inspector and MPI

Michele_Belotti
Beginner
495 Views
I try to verify if there is some memory leakeage in MPI code. I compile with visual studio compiler and I run my code with HPC debugger. The program run perfectly. It 's possible to use inspector to verify if there is some leakeage? I don't know how to configure execution of inspector with the .bat file created by scheduler. It's possible.
Thank a lot
Michele
0 Kudos
3 Replies
David_A_Intel1
Employee
495 Views
Hi Michele:

I think it should be possible if the batch file launches your executable. If it launches an MPI control app, it won't work. Basically, you need to intercept when your app just launched and insert the Inspector command line, insp-cl.

I'm not real familiar with MPI, so I may be missing something. Can you share the batch file with us?
0 Kudos
Michele_Belotti
Beginner
495 Views
Thank you for your reply,

the script look like this

@echo off

@rem cmdLine will store the arguments to this bat file, without the first two arguments.
@rem The first two arguments are the mpishim path and the computer name. Those arguments
@rem are already in the string below.
set cmdLine=
shift
shift
:VarLoop
if (%1)==() goto VarLoopEnd
set cmdLine=%cmdLine%%1
shift
goto VarLoop
:VarLoopEnd

"mpiexec.exe" -n 3 -wdir "C:\Documents\Visual Studio 2008\Projects\MPI_SImulator\Debug\MPI_SImulator\App" "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\mpishim.exe" 127.0.0.1 %cmdLine%

Mpiexec it the engine that permits to control the MPI application, MPIshim is the debugger/scheduler. Do you think that work inserting insp-cl before the %cmdLine% command? I will try asap and i will post the answer.

0 Kudos
David_A_Intel1
Employee
495 Views
First, I don't think you can run the Inspector and the debugger. It will have to be one or the other. As far as being able to run Inspector on the MPI app, I will have to check. I kind of think no one has tried that - it wasn't part of the design goals. The target was C/C++ Windows* applications.

Can you run the app standalone? Without MPI? That would be the easiest way, but maybe then it doesn't execute the same code path?
0 Kudos
Reply