[MPICH] About Visual Studio 2005.
David Ashton
ashton at mcs.anl.gov
Fri Sep 1 15:42:46 CDT 2006
Thats why I said may need to add the -nodbg option. In your case dont
add this option.
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.
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.
-David Ashton
_____
From: Bruno Simioni [mailto:brunosimioni at gmail.com]
Sent: Friday, September 01, 2006 2:32 PM
To: David Ashton
Subject: Re: [MPICH] About Visual Studio 2005.
Hey David,
That's the answer: unknow option: -nodbg.
I'm using mpich2 1.0.3. That's version includes that option?
Thanks!
Bruno.
On 9/1/06, David Ashton <ashton at mcs.anl.gov> wrote:
Bruno Simioni,
If you want to attach to a running job you may need to add -nodbg to the
mpiexec command.
Example: mpiexec -nodbg -n 4 myapp.exe
This option tells mpiexec to not debug the application so you can attach
your own debugger.
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.
Or you can use the parallel debugger provided in some versions of Visual
Studio.
http://msdn2.microsoft.com/en-us/library/ms164731.aspx
-David Ashton
_____
From: owner-mpich-discuss at mcs.anl.gov [mailto:
<mailto:owner-mpich-discuss at mcs.anl.gov> owner-mpich-discuss at mcs.anl.gov]
On Behalf Of Bruno Simioni
Sent: Friday, September 01, 2006 1:46 PM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] About Visual Studio 2005.
Hi everybody!
A time ago I sent a email about an error reported on Visual Studio 2005
debugger. I was tring to debug an MPI application.
That is a simple test, just to see what happens on each process.
That's the code:
// Somas parciais
#include <mpi.h>
#include <stdio.h>
int main(int argc, char *argv[]){
int soma = 0, s= 0, myid, numprocs, i, v[100];
MPI_Init(&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &myid);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
if(myid ==0)
for(i = 0; i < 100; i++)
v[i] = i+1;
MPI_Bcast(v, 100, MPI_INT, 0, MPI_COMM_WORLD);
soma = 0;
for (i = myid; i< 100; i += numprocs )
soma += v[i];
printf ("Resultado parcial no processador: %d = %d \n", myid, soma);
MPI_Reduce(&soma, &s, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
if(myid == 0)
printf("Soma final = %d\n", s);
MPI_Finalize();
return(0);
}
It returns the addition of 100 numbers. The charge is shared equally on each
process.
But when I try debbug that, the console returns:
soma.exe on 'bruno' failed, error 5 - Access Denied.
Windows do not permit Visual Studio create process.
Anybody has experimented the same error?
Thanks!
--
Bruno Simioni
Bacharelado em Ciências da Computação
Universidade Estadual Paulista - Unesp - Rio Claro / São Paulo
brunosimioni at gmail.com
14 - 9753-4380
--
Bruno Simioni
Bacharelado em Ciências da Computação
Universidade Estadual Paulista - Unesp - Rio Claro / São Paulo
brunosimioni at gmail.com
14 - 9753-4380
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20060901/f99a8f4d/attachment.htm>
More information about the mpich-discuss
mailing list