[MPICH] MPICH on a single machine

Yann Golanski yann at kierun.org
Fri Dec 9 03:17:41 CST 2005


Quoth Marc Glenn Jamon on Thu, Dec 08, 2005 at 19:13:23 -0800
> I can compile MPI codes using mpicc. But if I run the
> compiled programs, there is no output and the
> execution seemed to stop or have encountered infinity.
> I'll have to press Ctrl+C to return to the console.
> Also it only happens when np is more than 1. I can run
> programs if np is 1.

Have you run the program with "mpirun -np XXX ./a.out"? ... If not,
your code will run as a single processor.  Make sure you start mpd as
well. 
 
Write a small code that just says:


int rank = MPI_get_rank();
MPI_Init(argc, argv);
if (master == rank)
  fprintf(stdout, "PING\n");
else
  fprintf(stdout, "ping from %d.", rank);
MPI_Finalis();

and see if that runs fine.

-- 
yann at kierun.org                  -=*=-                      www.kierun.org
    PGP:   009D 7287 C4A7 FD4F 1680  06E4 F751 7006 9DE2 6318
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20051209/e7745fe7/attachment.pgp>


More information about the mpich-discuss mailing list