[mpich-discuss] Mac OS X version of Mpich
Jeff Hammond
jeff.science at gmail.com
Wed Aug 19 06:29:06 CDT 2015
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.
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 :-)
Please use a preprocessor macro like USE_MPI in your application. Do not
define any symbols anywhere that being with MPI.
Related: http://lists.mpich.org/pipermail/devel/2013-November/000274.html.
It's the number 1 google hit for me and the first response is the correct
answer.
Best,
Jeff
On Tue, Aug 18, 2015 at 11:39 PM, Benjamin Svetitsky <bqs at julian.tau.ac.il>
wrote:
> Greetings MPICH experts,
>
> 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:
> ------
> mpicc -c -O3 -DMPI -DPRECISION=2 -I. -DNHYP -DLU ../generic/com_mpi.c
> In file included from ../generic/com_mpi.c:104:
> /opt/local/include/mpich-clang37/mpi.h:116:56: error: expected identifier
> static const MPI_Datatype mpich_mpi_char MPICH_ATTR_TYPE_T...
> ^
> /opt/local/include/mpich-clang37/mpi.h:24:106: note: expanded from macro
> 'MPICH_ATTR_TYPE_TAG'
> ...__attribute__((type_tag_for_datatype(MPI,type)))
> ^
> <command line>:1:13: note: expanded from here
> #define MPI 1
> ^
> -----
> and then there is a sequence of similar messages, all regarding mpi.h.
> The compilation halts after 20 messages.
>
> 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.
>
> The same code still runs on current MPICH and MVAPICH installations on
> several systems.
>
> Thanks for your help,
> Ben
>
>
> --
> Prof. Benjamin Svetitsky Phone: +972-3-640 8870
> School of Physics and Astronomy Fax: +972-3-640 7932
> Tel Aviv University E-mail: bqs at julian.tau.ac.il
> 69978 Tel Aviv, Israel WWW: http://julian.tau.ac.il/bqs
>
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150819/b7caa3a9/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list