<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'>That’s why I said “may”
need to add the -nodbg option. In your case don’t add this option.<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'>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.<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'>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.<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> 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>
<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'>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 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> <<a href="mailto:ashton@mcs.anl.gov">ashton@mcs.anl.gov</a>>
wrote:</span></font></span><o:p></o:p></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><span id="q_10d6b0769585afca_1">
<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>
</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 - <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>