On Wed, 12 Nov 2003 chellapp_at_[hidden] wrote:
>I am relatively new to MPI.This is the mpi program i want to execute.
>A very simple program to get processor name and print it out along
>with processor id.
>#include <iomanip>
>#include <sstream>
>#include "mpicxx.h"
>
>using namespace std;
>int main(int argc,char *argv[])
>{
> char processor_name[80];
> int nprocs,pid,namelen;
>
> MPI::Init();
>
> nprocs=MPI::COMM_WORLD.Get_size();
> pid=MPI::COMM_WORLD.Get_rank();
>
> MPI_Get_processor_name(processor_name,&namelen);
> cout<<"Pid: "<<pid<<" Node: "
> <<processor_name<<endl;
> MPI::Finalize();
> cout<<"Complete: "<<endl;
> return 0;
>}
> When I run the code without specifing working directory like this
>mpirun -np 11 ./mpi_combi.out
>I get the neat output.
> But when i do the same mpi run with
> mpirun -np 11 -wd /home/chellapp/vdock_test ./mpi_combi.out
>gives me error message like this.
>It seems that [at least] one of the processes that was started with
>mpirun did not invoke MPI_INIT before quitting (it is possible that
>more than one process did not invoke MPI_INIT -- mpirun was only
>notified of the first one, which was on node n0).
which is abslolutelly true :-)
unless this is not c, and then don't take my comment in consideration
you should use MPI_Init instead of MPI::Init, the same is true for
all the other mpi functions you're using.
regards, nelson
|