[MPICH] About Visual Studio 2005.

Bruno Simioni brunosimioni at gmail.com
Fri Sep 1 14:45:32 CDT 2006


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/95dad022/attachment.htm>


More information about the mpich-discuss mailing list