[MPICH] About Visual Studio 2005.

David Ashton ashton at mcs.anl.gov
Fri Sep 1 15:17:11 CDT 2006


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: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 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20060901/592a39ff/attachment.htm>


More information about the mpich-discuss mailing list