<div dir="ltr">If you are using MacPorts (it looks like you are), you should have seen this note on installation (or similar, depending on what you installed):<div><br></div><div><div> +--- MPICH Usage note ----</div><div>
| The mpicc wrapper (and friends) are installed as:</div><div> |</div><div> | /opt/local/bin/mpicc-mpich-mp (likewise mpicxx, ...)</div><div> |</div><div> | To make mpich-default's wrappers the default (what you get when</div>
<div> | you execute 'mpicc' etc.) please run:</div><div> |</div><div> | sudo port select --set mpi mpich-mp-fortran</div><div> +-------------------------</div></div><div><br></div><div>This is because MacPorts support installing multiple mpich instances (compiled with & wrapping different compilers) side-by-side, so you have to either explicitly call the correctly named tools, or use the 'sudo port select ...' line -- the last line of the note above -- to install symlinks for the default names (mpicc, mpiexec, etc.) in /opt/local/bin.</div>
<div><br></div><div> - Eric</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 7:17 AM, Thakur, Rajeev <span dir="ltr"><<a href="mailto:thakur@mcs.anl.gov" target="_blank">thakur@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Make sure you run the mpirun script also from the MPICH directory. Use the script called mpiexec from there.<br>
<span class="HOEnZb"><font color="#888888"><br>
Rajeev<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Jul 16, 2014, at 5:43 AM, maurice van putten <<a href="mailto:mvputten2002@hotmail.com">mvputten2002@hotmail.com</a>> wrote:<br>
<br>
> Dear Rajeev,<br>
><br>
> Thanks for your reply. I now realize mpich is under /opt/local/include/mpich-mp.<br>
> There is another under /usr/local/include that has an mpif.h with include "mpif-common.h".<br>
> These are by Indiana University/Stuttgart/UC/Cisco.<br>
><br>
> mpif90 -I/opt/local/include/mpich-mp -o tst tst.f (containing include "mpif.h" in tst.f)<br>
> mpirun -np 2 ./tst<br>
><br>
> gives a runtime error<br>
><br>
> 1275069467 1275069468 1275070495 (=MPI_INTEGER,MPI_REAL,MPI_DOUBLE_PRECISION)<br>
> 1275069467 1275069468 1275070495<br>
> *** An error occurred in MPI_Comm_rank<br>
> *** reported by process [140735101665281,140733193388032]<br>
> *** on communicator MPI_COMM_WORLD<br>
> *** MPI_ERR_COMM: invalid communicator<br>
> *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,<br>
> *** and potentially your MPI job)<br>
> (same for 2nd process)<br>
><br>
> Clearly, there I have an initialization error on the basic mpi variables. Is there a possible mix-up<br>
> between these two mpi packages?<br>
><br>
> Best,<br>
><br>
> Henry<br>
><br>
> > From: <a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a><br>
> > To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> > Date: Wed, 16 Jul 2014 09:11:12 +0000<br>
> > Subject: Re: [mpich-discuss] ifort/mpich installation Mac 10.8.5<br>
> ><br>
> > What is mpif-common.h? You need to include mpif.h and provide the path to the mpich include directory. The problem you are seeing is caused because the wrong mpif.h is being picked up.<br>
> ><br>
> > Rajeev<br>
> ><br>
> ><br>
> > On Jul 16, 2014, at 2:45 AM, maurice van putten <<a href="mailto:mvputten2002@hotmail.com">mvputten2002@hotmail.com</a>> wrote:<br>
> ><br>
> > > Hi,<br>
> > ><br>
> > > Perhaps someone can provide a solution to what seems to be<br>
> > > a problem with installation of mpich.<br>
> > ><br>
> > > I installed ifort (intel) and mpich (via port install), compile<br>
> > > a basic test program mpif90 -I/usr/local/include -o tst tst.f<br>
> > > (here "I/usr/local/include" is included to find mpif-common.h),<br>
> > ><br>
> > > PROGRAM mpitest<br>
> > > integer ierr,my_rank,nm_prcs<br>
> > > include "mpif-common.h"<br>
> > > call MPI_INIT(ierr)<br>
> > > write(*,*)MPI_INTEGER,MPI_REAL,MPI_DOUBLE_PRECISION<br>
> > > call MPI_COMM_RANK(MPI_COMM_WORLD,my_rank,ierr)<br>
> > > call MPI_COMM_SIZE(MPI_COMM_WORLD,nm_prcs,ierr)<br>
> > > write(*,*)'MPI:',my_rank,nm_prcs,ierr<br>
> > > call MPI_FINALIZE(ierr)<br>
> > > end<br>
> > ><br>
> > > and do mpirun -np 2 ./tst. The result is<br>
> > ><br>
> > > 7 13 17<br>
> > > MPI: 0 1 0<br>
> > > 7 13 17<br>
> > > MPI: 0 1 0<br>
> > ><br>
> > > It shows that nm_prcs = 1 and both processes show the same my_rank = 0,<br>
> > > even though ierr =0.<br>
> > ><br>
> > > The initialization in mpirun seem to fail, to assign a proper process count 2.<br>
> > ><br>
> > > Any ideas on what's amiss?<br>
> > ><br>
> > > Many thanks,<br>
> > ><br>
> > > Henry.<br>
> > > _______________________________________________<br>
> > > discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> > > To manage subscription options or unsubscribe:<br>
> > > <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
> ><br>
> > _______________________________________________<br>
> > discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> > To manage subscription options or unsubscribe:<br>
> > <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
> _______________________________________________<br>
> discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
_______________________________________________<br>
discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
</div></div></blockquote></div><br></div>