Hi,<br><br>We have successfully installed MPICH-1.2.7p1 in our cluster with RHEL-5.5 OS; x86_64 architecture.<br><br>I am able to obtain the correct output, however, the control is getting stucked at mpiexec ./a.out.<br><br>
This is the test file main.c.<br><br>============================================<br>#include <stdio.h><br>#include <mpi.h><br><br>int<br>main (int argc, char *argv[])<br>{<br> int rank, rc, source, dest, numtasks;<br>
int msg;<br> MPI_Status Stat;<br><br> MPI_Init (&argc, &argv);<br> MPI_Comm_size (MPI_COMM_WORLD, &numtasks);<br> MPI_Comm_rank (MPI_COMM_WORLD, &rank);<br><br><br> if (rank == 0)<br> printf ("World is composed by %d nodes\n", numtasks);<br>
<br> source = (rank > 0) ? (rank - 1) : numtasks - 1;<br> dest = (rank + 1) % numtasks;<br><br> rc = MPI_Send (&rank, 1, MPI_INT, dest, 1, MPI_COMM_WORLD);<br> rc = MPI_Recv (&msg, 1, MPI_INT, source, 1, MPI_COMM_WORLD, &Stat);<br>
<br> printf<br> ("I am proc number %d getting message %d from source %d and sending message %d to dest %d\n",<br> rank, msg, source, rank, dest);<br> //MPI_Barrier(MPI_COMM_WORLD);<br> MPI_Finalize ();<br>
return 0;<br>}<br><br>============================================<br clear="all"><br>This is the PBS script (test.pbs) to submit the job in our cluster:<br><br>==============================================<br>#PBS -N test<br>
#PBS -l walltime=00:10:00<br>#PBS -l nodes=8:ppn=1<br>#PBS -m b<br>#PBS -m e<br><br>##PBS -e test.err -o test.out<br><br>module load mpich<br>#module load openmpi<br># cd to the directory where the job was submitted<br>cd $PBS_O_WORKDIR<br>
pbsdcp -s * $PFSDIR<br><br>cd $PFSDIR<br><br># Execute program<br>mpiexec mpitest<br><br>echo "Ready to copy"<br>#pbsdcp -g '*' $PBS_O_WORKDIR<br><br>cd $PBS_O_WORKDIR<br><br>==============================================<br>
<br>This is the output file:<br><br>=================================================<br>I am proc number 1 getting message 0 from source 0 and sending message 1 to dest 2<br>World is composed by 8 nodes<br>I am proc number 0 getting message 7 from source 7 and sending message 0 to dest 1<br>
I am proc number 5 getting message 4 from source 4 and sending message 5 to dest 6<br>I am proc number 3 getting message 2 from source 2 and sending message 3 to dest 4<br>I am proc number 7 getting message 6 from source 6 and sending message 7 to dest 0<br>
I am proc number 4 getting message 3 from source 3 and sending message 4 to dest 5<br>I am proc number 6 getting message 5 from source 5 and sending message 6 to dest 7<br>I am proc number 2 getting message 1 from source 1 and sending message 2 to dest 3<br>
<br>================================================<br><br>The problem is, the echo command after "mpiexec mpitest" is not executed.<br><br>I would appreciate your help.<br><br>Thanks,<br><br>-Sanjaya<br><br>-- <br>
========================<br>Sanjaya Gajurel, Ph.D.<br>Computational Scientist<br><a href="mailto:sxg125@case.edu" target="_blank">sxg125@case.edu</a><br>Advance Research Computing<br>216-368-5717 (office)<br>216-315-4136 (cell)<br>
Crawford 508<br>Case Western Reserve University<br>10900 Euclid Ave<br>Cleveland, OH 44106<br>=========================<br>