However, according to installation guide, we shoud obtain as below
hello - I am process 0 host masternode
hello - I am process 1 host node1
hello - I am process 2 host node2
hello - I am process 3 host node3
which means all servers in cluster can work together, but I can’t arrive this point, why?
thanks
The example source for output listed is in the installation guide on pages 27 and 28. Looks like you’re using the mpihello.f from the example directory which is slightly different then the one shown in the install guide.
Here’s the install guide’s mpihello source:
program hello
include 'mpif.h'
integer ierr,myproc,hostnm
character*64 hostname
call mpi_init(ierr)
call mpi_comm_rank(MPI_COMM_WORLD, myproc, ierr)
ierr=setvbuf3f(6,2,0)
ierr=hostnm(hostname)
write(6,100) myproc,hostname
100 format(1x,"hello - I am process",i3," host ",A64)
call mpi_finalize(ierr)
end
Hi Mat
Difference is great that means I can work with all servers in the cluster. as you know, the example in Installation guide, run it will give all hostname of server in their cluster. However, I can give only the server’s name itself without other server name of the cluster.
I have run the example as you given, I obtain as
[user1@ctrl~]pgf90 -o mpihello_mpich -g -Mmpi=mpich2 mpihello.f
[user2@ctrl ~]$ mpdboot
[user2@ctrl ~]$ mpiexec -np 4 ./mpihello_mpich
hello - I am process 0 host ctrl.cepri.com
hello - I am process 1 host ctrl.cepri.com
hello - I am process 3 host ctrl.cepri.com
hello - I am process 4 host ctrl.cepri.com
So I always think any mistaken occur
please check it!
many thanks
No the test is fine. Looks like your just running on a single node. Check your machine.LINUX file. Either you have it set-up to run multiple processes on the same node or you only list a single node.
Mat
% mpirun -np 4 a.out
hello - I am process 0 host masternode
hello - I am process 1 host node01
hello - I am process 2 host node02
hello - I am process 3 host node03