<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 1:49 PM, Rob Latham <span dir="ltr"><<a href="mailto:robl@mcs.anl.gov" target="_blank">robl@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
<br>
On 06/10/2015 02:40 PM, Craig Tierney - NOAA Affiliate wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
<br>
Compiler Output:<br>
<br>
make[2]: Entering directory<br>
`/misc/whome/Craig.Tierney/software/parallel-netcdf-1.6.1/src/libcxx'<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/bin/mpiicpc" target="_blank">4.1.3.049/intel64/bin/mpiicpc</a><br></span>
<<a href="http://4.1.3.049/intel64/bin/mpiicpc" target="_blank">http://4.1.3.049/intel64/bin/mpiicpc</a>> -c -g -O2 -I. -I. -I../lib<span class=""><br>
-DHAVE_CONFIG_H  ncmpiType.cpp<br>
In file included from<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/include/mpi.h(1279)" target="_blank">4.1.3.049/intel64/include/mpi.h(1279)</a><br></span>
<<a href="http://4.1.3.049/intel64/include/mpi.h(1279)" target="_blank">http://4.1.3.049/intel64/include/mpi.h(1279)</a>>,<span class=""><br>
                  from ../lib/pnetcdf.h(10),<br>
                  from ncmpiType.h(2),<br>
                  from ncmpiType.cpp(2):<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/include/mpicxx.h(95)" target="_blank">4.1.3.049/intel64/include/mpicxx.h(95)</a><br></span>
<<a href="http://4.1.3.049/intel64/include/mpicxx.h(95)" target="_blank">http://4.1.3.049/intel64/include/mpicxx.h(95)</a>>: error: #error<span class=""><br>
directive: "SEEK_SET is #defined but must not be for the C++ binding of<br>
MPI. Include mpi.h before stdio.h"<br>
</span></blockquote>
<br>
Hi Craig.  Yep, folks have seen this kind of problem before.  Not sure if anyone in pnetcdf land has reported it, but the workaround is to tell MPICH (or MPICH derivatives like intel-mpi) to not define SEEK_SET:<br>
<br>
<a href="https://software.intel.com/en-us/articles/intel-cluster-toolkit-for-linux-error-when-compiling-c-aps-using-intel-mpi-library-compilation-driver-mpiicpc" target="_blank">https://software.intel.com/en-us/articles/intel-cluster-toolkit-for-linux-error-when-compiling-c-aps-using-intel-mpi-library-compilation-driver-mpiicpc</a><br>
<br>
or<br>
<br>
<a href="https://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_I_get_compile_errors_saying_.22SEEK_SET_is_.23defined_but_must_not_be_for_the_C.2B.2B_binding_of_MPI.22" target="_blank">https://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_I_get_compile_errors_saying_.22SEEK_SET_is_.23defined_but_must_not_be_for_the_C.2B.2B_binding_of_MPI.22</a>.<br>
<br>
==rob<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
   #error "SEEK_SET is #defined but must not be for the C++ binding of<br>
MPI. Include mpi.h before stdio.h"<br>
    ^<br>
<br>
In file included from<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/include/mpi.h(1279)" target="_blank">4.1.3.049/intel64/include/mpi.h(1279)</a><br></span>
<<a href="http://4.1.3.049/intel64/include/mpi.h(1279)" target="_blank">http://4.1.3.049/intel64/include/mpi.h(1279)</a>>,<span class=""><br>
                  from ../lib/pnetcdf.h(10),<br>
                  from ncmpiType.h(2),<br>
                  from ncmpiType.cpp(2):<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/include/mpicxx.h(99)" target="_blank">4.1.3.049/intel64/include/mpicxx.h(99)</a><br></span>
<<a href="http://4.1.3.049/intel64/include/mpicxx.h(99)" target="_blank">http://4.1.3.049/intel64/include/mpicxx.h(99)</a>>: error: #error<span class=""><br>
directive: "SEEK_CUR is #defined but must not be for the C++ binding of<br>
MPI. Include mpi.h before stdio.h"<br>
   #error "SEEK_CUR is #defined but must not be for the C++ binding of<br>
MPI. Include mpi.h before stdio.h"<br>
    ^<br>
<br>
In file included from<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/include/mpi.h(1279)" target="_blank">4.1.3.049/intel64/include/mpi.h(1279)</a><br></span>
<<a href="http://4.1.3.049/intel64/include/mpi.h(1279)" target="_blank">http://4.1.3.049/intel64/include/mpi.h(1279)</a>>,<span class=""><br>
                  from ../lib/pnetcdf.h(10),<br>
                  from ncmpiType.h(2),<br>
                  from ncmpiType.cpp(2):<br>
/home/Craig.Tierney/apps/impi/<a href="http://4.1.3.049/intel64/include/mpicxx.h(104)" target="_blank">4.1.3.049/intel64/include/mpicxx.h(104)</a><br></span>
<<a href="http://4.1.3.049/intel64/include/mpicxx.h(104)" target="_blank">http://4.1.3.049/intel64/include/mpicxx.h(104)</a>>: error: #error<span class=""><br>
directive: "SEEK_END is #defined but must not be for the C++ binding of<br>
MPI. Include mpi.h before stdio.h"<br>
   #error "SEEK_END is #defined but must not be for the C++ binding of<br>
MPI. Include mpi.h before stdio.h"<br>
    ^<br>
<br>
compilation aborted for ncmpiType.cpp (code 2)<br>
make[2]: *** [ncmpiType.o] Error 2<br>
</span></blockquote><span class=""><font color="#888888">
<br>
-- <br>
Rob Latham<br>
Mathematics and Computer Science Division<br>
Argonne National Lab, IL USA<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Rob,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for your very quick reply.  I had seen similar posts to this, but not one that was so explicit that said "do this".  </div><div class="gmail_extra"><br></div><div class="gmail_extra">The link to the mpich FAQ page that you provided is broken.  Here is a working link:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_I_get_compile_errors_saying_.22SEEK_SET_is_.23defined_but_must_not_be_for_the_C.2B.2B_binding_of_MPI.22">https://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_I_get_compile_errors_saying_.22SEEK_SET_is_.23defined_but_must_not_be_for_the_C.2B.2B_binding_of_MPI.22</a>.<br></div><div class="gmail_extra"> </div><div class="gmail_extra">However, I could still not build the code by adding CXXFLAGS=-DMPICH_IGNORE_CXX_SEEK.  I got another error about not being able to find printf when compiling ncmpi_notyet.cpp.  I am not sure what the inclusion of the define would have removed.  I fixed it with the following patch:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">--- src/libcxx/ncmpi_notyet.cpp.orig<span class="" style="white-space:pre">        </span>2015-06-10 20:02:25.308564000 +0000</div><div class="gmail_extra">+++ src/libcxx/ncmpi_notyet.cpp<span class="" style="white-space:pre">   </span>2015-06-10 19:59:21.840706000 +0000</div><div class="gmail_extra">@@ -1,4 +1,9 @@</div><div class="gmail_extra"> #include <mpi.h></div><div class="gmail_extra">+</div><div class="gmail_extra">+#ifdef MPICH_IGNORE_CXX_SEEK</div><div class="gmail_extra">+#include<stdio.h></div><div class="gmail_extra">+#endif</div><div class="gmail_extra">+</div><div class="gmail_extra"> #include <pnetcdf.h></div><div class="gmail_extra"> #include "ncmpi_notyet.h"</div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Craig</div></div>