i just found out what was wrong. the installed runtime environment was of
lam/mpi but that of development environment was of mpich, so it had no
problem in compiling ,but only gave an error on executing.
thanks for concern
On Wed, Jun 10, 2009 at 7:32 PM, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> Bummer. I have no immediate suggestions. :-(
>
> Any chance you can upgrade to Open MPI?
>
>
>
> On Jun 9, 2009, at 8:10 PM, Dileep Kini wrote:
>
> I am using LAM/MPI 7.1.2 on two linux machines. I am able to lamboot and
>> compile MPI examples successfully but when trying to the run programs like
>> this
>>
>> #include <stdio.h>
>> #include <mpi.h>
>> int main(int argc,char* argv[]) {
>> MPI_Init(&argc,&argv);
>> printf("Hello 1\n");
>> int rank, size;
>> printf("Hello 2\n");
>> MPI_Comm_rank(MPI_COMM_WORLD, &rank);
>> MPI_Comm_size(MPI_COMM_WORLD, &size);
>> printf("Hello, world! I am %d of %d\n", rank, size);
>> MPI_Finalize();
>> return 0;
>> }
>>
>> compiled as -> "mpicc -o hello1 hello.c"
>> with this -> "mpirun -v -np 1 hello1"
>>
>> it just prints "9515 hello1 running on n0 (o)"
>> and when i manually quit with a Ctrl-C it says
>>
>>
>> ^C-----------------------------------------------------------------------------
>> 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 someone help to figure out the error?
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>
>
> --
> Jeff Squyres
> Cisco Systems
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
|