[MPICH] About Visual Studio 2005.
David Ashton
ashton at mcs.anl.gov
Fri Sep 1 16:05:09 CDT 2006
Download the Windows Developer’s Guide from the MPICH2 web page
Documentation section.
http://www.mcs.anl.gov/mpi/mpich2
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.
-David Ashton
_____
From: Bruno Simioni [mailto:brunosimioni at gmail.com]
Sent: Friday, September 01, 2006 2:55 PM
To: David Ashton
Subject: Re: [MPICH] About Visual Studio 2005.
Hey David!
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.
So, why can't I debbug my mpi app? what's wrong with Visual Studio?
And, enviroment variables, that is referenced in the manual, you reffers
about mpich2 manual? and variables of smpd process?
Should I enter commands at ms-dos prompt, in windows? that's it?
I'm totally lost! hehe..
Thanks!
Bruno.
On 9/1/06, David Ashton <ashton at mcs.anl.gov> wrote:
That's why I said "may" need to add the -nodbg option. In your case don't
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
--
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/13225086/attachment.htm>
More information about the mpich-discuss
mailing list