<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;}
span.EmailStyle17
        {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=3 face="Times New Roman"><span style='font-size:
12.0pt'>Bruno Simioni,<o:p></o:p></span></font></p>
<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><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 class=MsoNormal><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 class=MsoNormal><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 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><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 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><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 class=MsoNormal><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">http://msdn2.microsoft.com/en-us/library/ms164731.aspx</a><o:p></o:p></span></font></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><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>-David Ashton<o:p></o:p></span></font></p>
<p class=MsoNormal><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 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'>
owner-mpich-discuss@mcs.anl.gov [mailto:owner-mpich-discuss@mcs.anl.gov] <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> mpich-discuss@mcs.anl.gov<br>
<b><span style='font-weight:bold'>Subject:</span></b> [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><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">brunosimioni@gmail.com</a> <br>
14 - 9753-4380 <o:p></o:p></span></font></p>
</div>
</body>
</html>