<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.EmailStyle19
        {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;}
/* List Definitions */
@list l0
        {mso-list-id:865827520;
        mso-list-type:hybrid;
        mso-list-template-ids:1311914898 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</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> </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'>It worked fine for me. I did the
following:<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> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>1)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Create an empty console project called soma in Visual Studio 2005<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>2)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Create a source file, soma.c, and add your code<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>3)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Set the include paths and library paths to MPICH2\include and
MPICH2\lib and link with mpi.lib<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>4)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Compile the Debug target<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>5)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Exit Visual Studio<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>6)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Bring up a Visual Studio 2005 command prompt<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>7)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>change into the soma\Debug directory<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>8)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>run “setmpi2.bat 0 2”<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>9)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>run “devenv.exe soma.exe”<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>10)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Bring up another Visual Studio 2005 command prompt<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>11)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>change into the soma\Debug directory<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>12)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>run “setmpi2.bat 1 2”<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>13)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>run “devenv.exe soma.exe”<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>14)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>At this point I have two debuggers running<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>15)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>In the first debugger I hit F10 and start stepping through the code
until I try to step over MPI_Init<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>16)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>I move to the second debugger and hit F10 and step through the code
until I step over MPI_Init<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>17)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>At this point both debuggers are stepping through the code and I
can do whatever I want<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> </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> </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> Tuesday, September 05, 2006
1:08 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> </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'>Man, that is so hard!<br>
<br>
I'm trying that.<br>
<br>
I create a file, with this code:<br>
<br>
#include <mpi.h><br>
#include <stdio.h><br>
<br>
int main(int argc, char *argv[]){<br>
int soma = 0, s= 0, myid, numprocs, i, v[100]; <br>
<br>
MPI_Init(&argc, &argv);<br>
MPI_Comm_rank (MPI_COMM_WORLD, &myid);<br>
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);<br>
if(myid ==0)<br>
for(i = 0; i < 100; i++)<br>
v[i] = i+1; <br>
MPI_Bcast(v, 100, MPI_INT, 0, MPI_COMM_WORLD);<br>
soma = 0;<br>
<br>
for (i = myid; i< 100; i += numprocs)<br>
soma += v[i];<br>
<br>
printf ("Resultado parcial no processador: %d = %d
\n", myid, soma); <br>
MPI_Reduce(&soma, &s, 1, MPI_INT, MPI_SUM, 0,
MPI_COMM_WORLD);<br>
if(myid == 0)<br>
printf("Soma final = %d\n", s);<br>
MPI_Finalize();<br>
return(0);<br>
}<br>
<br>
That is called soma.c .<br>
<br>
Then I starte the visual studio 2005 and created an empty win32 console
application at file > new project > win32 console application > next
> empty project > finish.<br>
<br>
So, after read and execute the windows developer's manual instruction, at
mpich2 web site, I tried to execute the debugger, pressing F10. <br>
<br>
And, it just didn't run. An console is open and bring the message that was
impossible to create an process. Acess Denied.<br>
<br>
So, what i'm I doing wrong? Why the debbuger doesn't run?<br>
<br>
The method using setmpi2.bat runs, but i want more than that.<br>
<br>
Thanks.<br>
<br>
Bruno.<br>
<br>
<br>
<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/5/06, <b><span style='font-weight:bold'>David
Ashton</span></b> <<a href="mailto:ashton@mcs.anl.gov" target="_blank">
ashton@mcs.anl.gov</a>> 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'>Bruno,</span></font><o:p></o:p></p>
</div>
</div>
</div>
<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't be necessary since you shouldn't need to debug the MPI functions.</span></font><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'> </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'> </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> Monday, September 04, 2006
9:13 PM</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><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'> <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>
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 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><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> <<a
href="mailto:ashton@mcs.anl.gov" target="_blank">ashton@mcs.anl.gov</a>>
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'>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'> </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. Follow the instructions in that section. The
idea is that you will bring up a command prompt for each process in your
job. You will execute the script provided in the manual to set up the
environment variables. Then you can run each process in each command
prompt by hand. 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. 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'> </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'> </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>
<p><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><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'> <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> <<a
href="mailto:ashton@mcs.anl.gov" target="_blank">ashton@mcs.anl.gov</a>>
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 "may" need to add the -nodbg
option. 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'> </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 "Access is denied" error I
assume you are trying to attach a debugger to one of the processes started by
the smpd process manager. If you want to debug the first process, process
zero, you can add -localroot to the mpiexec command. 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'> </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'> </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'> </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'> <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> <<a
href="mailto:ashton@mcs.anl.gov" target="_blank">ashton@mcs.anl.gov</a>>
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'> <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'> <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. You can set up the environment for each process in a command
prompt and then start an instance of Visual Studio for each process. 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'> <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'> <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'> <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'> <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>
<br>
#include <mpi.h><br>
#include <stdio.h><br>
<br>
int main(int argc, char *argv[]){<br>
int soma = 0, s= 0, myid, numprocs, i, v[100];<br>
<br>
<br>
MPI_Init(&argc, &argv); <br>
MPI_Comm_rank (MPI_COMM_WORLD, &myid);<br>
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);<br>
if(myid ==0)<br>
for(i = 0; i < 100; i++)<br>
v[i] = i+1;<br>
MPI_Bcast(v, 100, MPI_INT, 0, MPI_COMM_WORLD); <br>
soma = 0;<br>
<br>
for (i = myid; i< 100; i += numprocs )<br>
soma += v[i];<br>
<br>
printf ("Resultado parcial no processador: %d = %d
\n", myid, soma); <br>
MPI_Reduce(&soma, &s, 1, MPI_INT, MPI_SUM, 0,
MPI_COMM_WORLD); <br>
if(myid == 0)<br>
printf("Soma final = %d\n", s);<br>
MPI_Finalize();<br>
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 - <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 - <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 - <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 - <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 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 - <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>
</body>
</html>