Hi,
I am writing a mpi program for a college assignment on matrix multiplication.
It uses four processes. The problem I have is that I was using mpicc from /usr/bin on the server I'm using but it got
removed and now I'm using it from /usr/local/mpich-1.2.6/bin while still using mpirun
from /usr/bin.
Now when I run any of my programs even ones im sure will work s.a:
...
MPI_Init(&argc, &argv);
// determine processor count and relative rank
MPI_Comm_size (MPI_COMM_WORLD, &proc_count);
MPI_Comm_rank (MPI_COMM_WORLD, &proc_rank );
printf("Process %d\n", proc_rank);
MPI_Finalize();
return 0;
...
with the following commands
mpicc -o Assignment2 Assignment2.c
works fine...
mpirun -np 4 Assignment2 outputs
Process 0
Process 0
-----------------------------------------------------------------------------
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.
I doesn't seem to be able to initialise more than one process - maybe this has something to do with the LAMRANK
variable and different mpicc and mpirun because that's the only thing that has changed since these programs used to work for me.
Any suggestions would be appreciated.
Thanks in advance,
Donal
|