<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Bruno,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If you are getting assembly code stepping
through your own code then you need to create debugging information for your
project.  This is documented in the Visual Studio help pages.  If you want to
step through the MPICH2 source code then you will have to download the source
code distribution of MPICH2 1.0.3 and compile it yourself.  This shouldn&#8217;t
be necessary since you shouldn&#8217;t need to debug the MPI functions.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-David Ashton<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Bruno Simioni
[mailto:brunosimioni@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, September 04, 2006
9:13 PM<br>
<b><span style='font-weight:bold'>To:</span></b> David Ashton<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [MPICH] About Visual
Studio 2005.</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hey David!<br>
<br>
So, I abtain sucess trying to debug on command prompt, using the batch file to
setup environment variables. But I'm looking for a sofisticated debbuger. <br>
<br>
I tried to use the debugger os visual studio, by command&nbsp; prompt, but it
returns the assembler code just. I need more than that. <br>
<br>
What about the referenced mpi debugger included on visual studio 2005? do you
know how can i use that? do you know if it shows the content of procedures, in
C code? like an usual debugger?<br>
<br>
Thanks.<br>
<br>
Bruno! <o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 9/1/06, <b><span style='font-weight:bold'>David
Ashton</span></b> &lt;<a href="mailto:ashton@mcs.anl.gov">ashton@mcs.anl.gov</a>&gt;
wrote:</span></font></span><o:p></o:p></p>

<div>

<div link=blue vlink=blue>

<div>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Download the Windows Developer's Guide from the MPICH2 web
page Documentation section.</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><a href="http://www.mcs.anl.gov/mpi/mpich2" target="_blank">http://www.mcs.anl.gov/mpi/mpich2</a></span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Go to the section Runtime environment :: Debugging jobs by
starting them manually.&nbsp; Follow the instructions in that section.&nbsp;
The idea is that you will bring up a command prompt for each process in your
job.&nbsp; You will execute the script provided in the manual to set up the
environment variables.&nbsp; Then you can run each process in each command
prompt by hand.&nbsp; You can also start a debugger for any or all of the
processes by starting the debugger from the command prompt of the process you
want to debug.&nbsp; You have to start the debugger from the command prompt so
that it inherits the environment variables necessary to run the process.</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>-David Ashton</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'> Bruno Simioni [mailto:<a
href="mailto:brunosimioni@gmail.com" target="_blank">brunosimioni@gmail.com</a>]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 01, 2006
2:55 PM</span></font><o:p></o:p></p>

</div>

<div><span id="q_10d6b335716d0f85_1">

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><br>
<span class=e><b><span style='font-weight:bold'>To:</span></b> David Ashton</span><br>
<span class=e><b><span style='font-weight:bold'>Subject:</span></b> Re: [MPICH]
About Visual Studio 2005.</span></span></span></font><o:p></o:p></p>

</div>

</div>

<div><span id="q_10d6b335716d0f85_3">

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hey David!<br>
<br>
Yes, i'm trying to attach an debugger. The debugger is included in Visual Studio
2005. I tried to use -localroot and -localonly in Mpiexec command, in project
properties at Visual Studio, but I've got the same answer - Access Denied. <br>
<br>
So, why can't I debbug my mpi app? what's wrong with Visual Studio?<br>
<br>
And, enviroment variables, that is referenced in the manual, you reffers about
mpich2 manual? and variables of smpd process?<br>
<br>
Should I enter commands at ms-dos prompt, in windows? that's it? <br>
<br>
I'm totally lost! hehe..<br>
<br>
Thanks!<br>
<br>
Bruno.<o:p></o:p></span></font></p>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>On
9/1/06, <b><span style='font-weight:bold'>David Ashton</span></b> &lt;<a
href="mailto:ashton@mcs.anl.gov" target="_blank">ashton@mcs.anl.gov</a>&gt;
wrote: <o:p></o:p></span></font></p>

<div>

<div link=blue vlink=blue>

<div>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>That's why I said &quot;may&quot; need to add the -nodbg
option.&nbsp; In your case don't add this option.</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Since you are getting an &quot;Access is denied&quot; error I
assume you are trying to attach a debugger to one of the processes started by
the smpd process manager.&nbsp; If you want to debug the first process, process
zero, you can add -localroot to the mpiexec command.&nbsp; If you want to debug
a process other than the root process and it is ok to run all the processes on
the local machine you can add the -localonly option to mpiexec.</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>If you are unable to attach to a running process using either
the -localroot or -localonly options then you will have to use the command
prompt options described in the manual.</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>-David Ashton</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'> Bruno Simioni [mailto: <a
href="mailto:brunosimioni@gmail.com" target="_blank">brunosimioni@gmail.com</a>]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 01, 2006
2:32 PM<br>
<b><span style='font-weight:bold'>To:</span></b> David Ashton<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [MPICH] About Visual
Studio 2005.</span></font><o:p></o:p></p>

</div>

</div>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hey David,<br>
<br>
That's the answer: unknow option: -nodbg.<br>
<br>
I'm using mpich2 1.0.3. That's version includes that option?<br>
<br>
Thanks!<br>
<br>
Bruno.<o:p></o:p></span></font></p>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>On
9/1/06, <b><span style='font-weight:bold'>David Ashton</span></b> &lt;<a
href="mailto:ashton@mcs.anl.gov" target="_blank">ashton@mcs.anl.gov</a>&gt;
wrote:<o:p></o:p></span></font></p>

<div>

<div link=blue vlink=blue>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Bruno
Simioni,<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>If you want
to attach to a running job you may need to add -nodbg to the mpiexec command.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Example:
mpiexec -nodbg -n 4 myapp.exe<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>This
option tells mpiexec to not debug the application so you can attach your own
debugger.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>If you
want to start the application from within Visual Studio 2005 there are two
options.&nbsp; You can set up the environment for each process in a command
prompt and then start an instance of Visual Studio for each process.&nbsp; The
environment variables are described in the manual.<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Or you
can use the parallel debugger provided in some versions of Visual Studio.<o:p></o:p></span></font></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'><a
href="http://msdn2.microsoft.com/en-us/library/ms164731.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/ms164731.aspx</a></span></font><o:p></o:p></p>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>-David
Ashton<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From:</span></font></b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a>
[mailto:<a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">
owner-mpich-discuss@mcs.anl.gov</a>] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Bruno Simioni<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 01, 2006
1:46 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <a
href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br>
<b><span style='font-weight:bold'>Subject:</span></b> [MPICH] About Visual
Studio 2005.</span></font><o:p></o:p></p>

</div>

</div>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hi
everybody!<br>
<br>
A time ago I sent a email about an error reported on Visual Studio 2005
debugger. I was tring to debug an MPI application.<br>
<br>
That is a simple test, just to see what happens on each process.<br>
<br>
That's the code:<br>
<br>
// Somas parciais<br>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
#include &lt;mpi.h&gt;<br>
#include &lt;stdio.h&gt;<br>
<br>
int main(int argc, char *argv[]){<br>
&nbsp;&nbsp;&nbsp; int soma = 0, s= 0, myid, numprocs, i, v[100];<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; MPI_Init(&amp;argc, &amp;argv); <br>
&nbsp;&nbsp;&nbsp; MPI_Comm_rank (MPI_COMM_WORLD, &amp;myid);<br>
&nbsp;&nbsp;&nbsp; MPI_Comm_size(MPI_COMM_WORLD, &amp;numprocs);<br>
&nbsp;&nbsp;&nbsp; if(myid ==0)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for(i = 0; i &lt; 100; i++)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; v[i] = i+1;<br>
&nbsp;&nbsp;&nbsp; MPI_Bcast(v, 100, MPI_INT, 0, MPI_COMM_WORLD); <br>
&nbsp;&nbsp;&nbsp; soma = 0;<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; for (i = myid; i&lt; 100; i += numprocs&nbsp;&nbsp;&nbsp; )<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; soma += v[i];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; printf (&quot;Resultado parcial no processador: %d = %d
\n&quot;, myid, soma);&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; MPI_Reduce(&amp;soma, &amp;s, 1, MPI_INT, MPI_SUM, 0,
MPI_COMM_WORLD); <br>
&nbsp;&nbsp;&nbsp; if(myid == 0)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; printf(&quot;Soma final = %d\n&quot;, s);<br>
&nbsp;&nbsp;&nbsp; MPI_Finalize();<br>
&nbsp;&nbsp;&nbsp; return(0);<br>
}<br clear=all>
<br>
It returns the addition of 100 numbers. The charge is shared equally on each
process. <br>
<br>
But when I try debbug that, the console returns:<br>
<br>
soma.exe on 'bruno' failed, error 5 - Access Denied.<br>
<br>
Windows do not permit Visual Studio create process.<br>
<br>
Anybody has experimented the same error? <br>
<br>
Thanks!<br>
<br>
-- <br>
Bruno Simioni<br>
Bacharelado em Ciências da Computação<br>
Universidade Estadual Paulista - Unesp&nbsp;&nbsp;- <st1:City w:st="on">Rio
 Claro</st1:City> / <st1:City w:st="on"><st1:place w:st="on">São Paulo</st1:place></st1:City><br>
<a href="mailto:brunosimioni@gmail.com" target="_blank">brunosimioni@gmail.com</a>
<br>
14 - 9753-4380 <o:p></o:p></span></font></p>

</div>

</div>

</div>

</div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
<br clear=all>
<br>
-- <br>
Bruno Simioni<br>
Bacharelado em Ciências da Computação<br>
Universidade Estadual Paulista - Unesp&nbsp;&nbsp;- <st1:City w:st="on">Rio
 Claro</st1:City> / <st1:City w:st="on"><st1:place w:st="on">São Paulo</st1:place></st1:City><br>
<a href="mailto:brunosimioni@gmail.com" target="_blank">brunosimioni@gmail.com</a><br>
14 - 9753-4380 <o:p></o:p></span></font></p>

</div>

</div>

</div>

</div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
<br clear=all>
<br>
-- <br>
Bruno Simioni<br>
Bacharelado em Ciências da Computação<br>
Universidade Estadual Paulista - Unesp&nbsp;&nbsp;- <st1:City w:st="on">Rio
 Claro</st1:City> / <st1:City w:st="on"><st1:place w:st="on">São Paulo</st1:place></st1:City><br>
<a href="mailto:brunosimioni@gmail.com" target="_blank">brunosimioni@gmail.com</a><br>
14 - 9753-4380 <o:p></o:p></span></font></p>

</div>

</div>

</div>

</div>

</span>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
Bruno Simioni<br>
Bacharelado em Ciências da Computação<br>
Universidade Estadual Paulista - Unesp&nbsp;&nbsp;- <st1:City w:st="on">Rio
 Claro</st1:City> / <st1:City w:st="on"><st1:place w:st="on">São Paulo</st1:place></st1:City><br>
<a href="mailto:brunosimioni@gmail.com">brunosimioni@gmail.com</a><br>
14 - 9753-4380 <o:p></o:p></span></font></p>

</div>

</body>

</html>