error hile making an MPI run

While trying to make an MPI run using the following statement:
~/Documents/Lammps/lammps-9Mar11/examples/flow/Case_22/Case_c$ mpirun -np 4 ./lmp_ubuntu <in.flow.couette_c

I am getting the following error:
problem with execution of lmp_ubuntu on ubuntu: [Errno 2] No such file or directory

but while executing it without the mpi statement:
~/Documents/Lammps/lammps-9Mar11/examples/flow/Case_22/Case_c$ ./lmp_ubuntu <in.flow.couette_c

It runs properly.

I am unable to figure out what is causing this error message as the file lmp_ubuntu is present in the folder.
Any help would be appreciated.

Thank you.

BR/Joseph

It looks like you aren't able to run on multiple procs.
That is likely an MPI configuration problem on your
box, not a LAMMPS problem. E.g. your MPI cannot
launch more processes because of incorrect permissions.
The MPI guide should tell you how to fix/check this.

Steve

I thought it might be an MPI configuration issue hence i ran a small test code and that got executed:

[email protected]...:~/Desktop$ mpirun -np 4 ./a.outHello from 0 of 4
Hello from 2 of 4
Hello from 1 of 4
Hello from 3 of 4

The code is as follows:
#include <mpi.h>
#include <stdio.h>

int main(){
  int rank, size;

  MPI_Init(NULL, NULL);

  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm_size(MPI_COMM_WORLD, &size);

  printf("Hello from %d of %d\n", rank, size);

  MPI_Finalize();

  return 0;
}

This led me to believe it might be something pertaining to Lammps

BR/Joseph

I thought it might be an MPI configuration issue hence i ran a small
test code and that got executed:

[...]

This led me to believe it might be something pertaining to Lammps

but the error message is coming from the mpi system not lammps.
there are two reasons why you can get a "file not found" error.
1) is not finding the executable, 2) not finding any shared library
that the executable depends on. the second case can happen
if you have to set LD_LIBRARY_PATH or run across multiple
computers which may have differences in the installation.

so at best it would have to be an issue of how you have compiled
lammps, but it _cannot_ be an issue of lammps by itself.
there would be a storm of complaints if lammps would not run in parallel...

axel.

Thanxx for the suggestions.

Since you mentioned multiple computers. Now, I am actually trying to run on multiple cores (quad-core sys) or not on multiple computers.
Could that be a possible reason for this error. Also is there a different way we should be building Lammps for using MPI. I just went through the default build as given in Manual.

BR/Joseph

The manual explains how to build it for parallel against
an MPI you have installed. If you did that and got
an executable, all that is left is to launch it (typically
via mpirun) which is an MPI thing, not a LAMMPS thing.

Steve