[mpich-discuss] Running problem with MPICH2
Gus Correa
gus at ldeo.columbia.edu
Fri May 27 10:55:47 CDT 2011
Hi Basak
The cpi.c program in the examples directory in the MPICH2
source code tree is a simple test of MPICH2 functionality.
You can try compiling it with mpicc and running it with mpiexec
(or mpiexec.hydra).
It also tells you what is the typical/basic structure of an
MPI program, starting with MPI_Init, ending with MPI_Finalize,
and doing explicit communication among the participating processes
in between, via a variety of MPI function calls.
My recollection is that cpi.c only uses MPI_Reduce, but there are many
others MPI functions, of which you can find examples in
the references below.
For more information about how to write MPI programs, try the
LLNL tutorials:
https://computing.llnl.gov/tutorials/mpi/
or Peter Pacheco's book:
http://www.cs.usfca.edu/~peter/ppmpi/
or W. Gropp et al. books (Rajeev is a co-author in the 2nd book):
http://www.mcs.anl.gov/research/projects/mpi/usingmpi/
http://www.mcs.anl.gov/research/projects/mpi/usingmpi2/
I hope this helps,
Gus Correa
Chandra Bhanu Basak wrote:
> Dear Chan
>
> Sorry to bother you again and excuse me for my ignorance -
>
> does that means the same code (count.c), if I compile as -
>
> mpicc count.c
>
> will be compiled in MPI version? and I don't have to change the source
> code??
>
> Basak
>
>
>
> On 27 May 2011 20:07, Anthony Chan <chan at mcs.anl.gov
> <mailto:chan at mcs.anl.gov>> wrote:
>
>
> count.c is a serial program, so it won't use MPI's multiprocessing
> support
> You need to make count.c as MPI program. Recent MPICH2
> uses hydra as default process manager, so you don't need to use
> mpd or mpdboot,... See
>
> http://wiki.mcs.anl.gov/mpich2/index.php/Using_the_Hydra_Process_Manager
>
> A.Chan
>
> ----- Original Message -----
> > Hi,
> >
> > I have tried to installed recent version of MPICH2 in Scientific
> Linux
> > 6.
> > The machine contains 2 Xeon X5650 processors (each having 6 cores).
> > Apparently I was able to install MPICH2 without any problem (thanks
> > for the
> > wonderful installation guide). "which mpiexec" and "which mpicc" show
> > the
> > correct PATH.
> >
> > mpiexec -n 2 ./count.out
> >
> > while running this homemade small counting program (count.c attached
> > here),
> > system monitor shows only one core (not even one processor) is taking
> > the
> > entire load. count.c was compiled using gcc (not mpigcc).
> >
> > Also, I found that the commands like mpd or mpdboot or mpdtrace
> > returns
> > "Command not found".
> >
> > I am attaching here the c.txt, m.txt (as advised in the guides) also
> > the
> > small counting program (count.c).
> >
> > It will be of great help if anyone can show me the root of the
> problem
> > and
> > perhaps the solution.
> >
> > Regards,
> >
> > C. B. Basak
> >
> > _______________________________________________
> > mpich-discuss mailing list
> > mpich-discuss at mcs.anl.gov <mailto:mpich-discuss at mcs.anl.gov>
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov <mailto:mpich-discuss at mcs.anl.gov>
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
More information about the mpich-discuss
mailing list