<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>See below where you got a warning for defining MPI to 1? That is going to break EVERYTHING in the MPI C code. Consider the declaration MPI_Init_thread. It will become 1_Init_thread. This is a serious problem.<br></div><div><br>The MPI standard reserves the MPI namespace. You cannot use it. In your case, you took the entire namespace and changed it to a number :-)<br><br>Please use a preprocessor macro like USE_MPI in your application. Do not define any symbols anywhere that being with MPI.</div><div><br></div><div>Related: <a href="http://lists.mpich.org/pipermail/devel/2013-November/000274.html">http://lists.mpich.org/pipermail/devel/2013-November/000274.html</a>. It's the number 1 google hit for me and the first response is the correct answer.<br></div><div><br></div><div>Best,</div><div><br></div><div>Jeff</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 11:39 PM, Benjamin Svetitsky <span dir="ltr"><<a href="mailto:bqs@julian.tau.ac.il" target="_blank">bqs@julian.tau.ac.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="direction:ltr" bgcolor="#FFFFFF" text="#000000">
Greetings MPICH experts,<br>
<br>
I've run code with MPICH often on my Macbook Pro (4 cores), but not
lately. Recently I updated MPICH from Macports, preparing for new
running. Now my code doesn't compile. Do you know this error
message:<br>
------<br>
<font face="Courier New, Courier, monospace">mpicc -c -O3 -DMPI
-DPRECISION=2 -I. -DNHYP -DLU ../generic/com_mpi.c<br>
In file included from ../generic/com_mpi.c:104:<br>
/opt/local/include/mpich-clang37/mpi.h:116:56: error: expected
identifier<br>
static const MPI_Datatype mpich_mpi_char
MPICH_ATTR_TYPE_T...<br>
^<br>
/opt/local/include/mpich-clang37/mpi.h:24:106: note: expanded from
macro<br>
'MPICH_ATTR_TYPE_TAG'<br>
...__attribute__((type_tag_for_datatype(MPI,type)))<br>
^<br>
<command line>:1:13: note: expanded from here<br><span style="background-color:rgb(255,255,0)">
#define MPI 1</span><br>
^</font><br>
-----<br>
and then there is a sequence of similar messages, all regarding
mpi.h. The compilation halts after 20 messages.<br>
<br>
I originally tried this with mpich-default, with the same result. I
wondered if it had to do with an incompatibility with clang, so I
installed mpich-clang37 @3.1.4_1+gcc49, with the above result.<br>
<br>
The same code still runs on current MPICH and MVAPICH installations
on several systems.<br>
<br>
Thanks for your help,<br>
Ben<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<pre cols="72">--
Prof. Benjamin Svetitsky Phone: +972-3-640 8870
School of Physics and Astronomy Fax: +972-3-640 7932
Tel Aviv University E-mail: <a href="mailto:bqs@julian.tau.ac.il" target="_blank">bqs@julian.tau.ac.il</a>
69978 Tel Aviv, Israel WWW: <a href="http://julian.tau.ac.il/bqs" target="_blank">http://julian.tau.ac.il/bqs</a>
</pre>
</font></span></div>
<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" rel="noreferrer" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>
</div></div></div>