LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Nihar Sanghvi (nsanghvi_at_[hidden])
Date: 2003-11-13 11:04:48


Hi,

I would guess that using ./mpi_combi.out along with the -wd option is
causing the error. mpirun might be looking for the executable in the
working directory, which might not be the case, even if the executable
is in your $PATH.

You might want to try running
        mpirun -wd ... mpi_combi.out

Also it is a good idea to include mpi.h in place of mpicxx.h. (unless
mpicxx.h is your file).

Nihar.

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).
-
- mpirun can *only* be used with MPI programs (i.e., programs that
- invoke MPI_INIT and MPI_FINALIZE). You can use the "lamexec" program
- to run non-MPI programs over the lambooted nodes.
-
- Can anyone please let me know the fault in the code.
- Thanks in advance
-
-
- _______________________________________________
- This list is archived at http://www.lam-mpi.org/MailArchives/lam/
-

Powered by LAM/MPI...
---------------------------------------
Nihar Sanghvi
LAM/MPI Team
Graduate Student (Indiana University)
http://www.lam-mpi.org
--------------------------------------