<div dir="ltr"><span style="font-size:12.8000001907349px">Dhirendra,</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">This is the script I used to build pnetcdf 1.6.1 with Intel MPI v4.X and v5.X.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">-------------</span></div><div><div><span style="font-size:12.8000001907349px">#!/bin/bash</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">BASE=/home/Craig.Tierney/apps/pnetcdf/</span></div><div><span style="font-size:12.8000001907349px"># Set the parallel directory for testing, Home is not good for this</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">PDIR=/lfs3/jetmgmt/Craig.Tierney</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">CVER=15.0.3.187</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">#IMPIVER=4.1.3.049</span></div><div><span style="font-size:12.8000001907349px">IMPIVER=5.0.3.048</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">CSVER=$(echo $CVER | cut -f1 -d.)</span></div><div><span style="font-size:12.8000001907349px">MPISVER=$(echo $IMPIVER | cut -f1 -d.)</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">module load newdefaults</span></div><div><span style="font-size:12.8000001907349px">module load intel/$CVER</span></div><div><span style="font-size:12.8000001907349px">module load impi/$IMPIVER</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">module list</span></div><div><span style="font-size:12.8000001907349px">icc --version</span></div><div><span style="font-size:12.8000001907349px">ifort --version</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">export MPIF90=mpiifort</span></div><div><span style="font-size:12.8000001907349px">export MPIF77=mpiifort</span></div><div><span style="font-size:12.8000001907349px">export MPICC=mpiicc</span></div><div><span style="font-size:12.8000001907349px">export MPICXX=mpiicpc</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">if [ $MPISVER -lt 5 ]; then</span></div><div><span style="font-size:12.8000001907349px"><span class="Apple-tab-span" style="white-space:pre">  </span>export CXXFLAGS="-DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX"</span></div><div><span style="font-size:12.8000001907349px">fi</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">make distclean</span></div><div><span style="font-size:12.8000001907349px">./configure --prefix=$BASE/1.6.1-intel$CVER-impi$MPISVER</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">make -j8</span></div><div><span style="font-size:12.8000001907349px">make testing TEST_OUTDIR=$PDIR</span></div><div><span style="font-size:12.8000001907349px">make ptest TEST_MPIRUN="mpiexec.hydra -np NP" TEST_OUTDIR=$PDIR</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">make install</span></div></div><div><span style="font-size:12.8000001907349px">-------------</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Craig</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 29, 2015 at 8:50 AM, Wei-keng Liao <span dir="ltr"><<a href="mailto:wkliao@eecs.northwestern.edu" target="_blank">wkliao@eecs.northwestern.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Dhirendra<br>
<br>
The errors you are seeing have been reported by Craig Tierney. This is due to an older version of Intel compiler. A fix of this error has been added to the project repo and will appear in the next release of PnetCDF.<br>
<br>
If you would like to try the latest under development codes, please see the instructions at the bottom of PnetCDF download page: <a href="http://trac.mcs.anl.gov/projects/parallel-netcdf/wiki/Download" rel="noreferrer" target="_blank">http://trac.mcs.anl.gov/projects/parallel-netcdf/wiki/Download</a><br>
<br>
Or if you do not need C++, you can add "-disable-cxx" to your configure command line, i.e.<br>
<span class="">./configure MPICC=mpiicc MPICXX=mpiicpc MPIF77=mpiifort MPIF90=mpiifort --prefix=$RLIB \<br>
</span>            CXXCPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX" --disable-cxx<br>
<br>
Wei-keng<br>
<span class=""><br>
On Jul 29, 2015, at 5:56 AM, Dhirendra Kumar wrote:<br>
<br>
> Dear Wei,<br>
><br>
> I tried with the options suggested by you, the configure completed with success but I have got another error in make while using CXXCPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX" as following<br>
><br>
> ..................................................<br>
> ....................................................<br>
> ncmpi_iget_varm_string(int ncid, int varid, const MPI_Offset *startp, const MPI_Offset *countp, const MPI_Offset *stridep, const MPI_Offset * imapp, char **ip, int *req){printf("%s not implemented\n",__func__); return NC_EINVAL;}<br>
>                                                                                                                                                                             ^<br>
><br>
> compilation aborted for ncmpi_notyet.cpp (code 2)<br>
> make[2]: *** [ncmpi_notyet.o] Error 2<br>
> make[2]: Leaving directory `/home/dkumar/RLIB/parallel-netcdf-1.6.1/src/libcxx'<br>
> make[1]: *** [libcxx] Error 2<br>
> make[1]: Leaving directory `/home/dkumar/RLIB/parallel-netcdf-1.6.1/src'<br>
> make: *** [all] Error 2<br>
><br>
><br>
> please find the output of make command as an attachment.<br>
><br>
><br>
> Sincerely<br>
><br>
</span><span class="">> On Wed, Jul 29, 2015 at 12:59 PM, Wei-keng Liao <<a href="mailto:wkliao@eecs.northwestern.edu">wkliao@eecs.northwestern.edu</a>> wrote:<br>
> Please try<br>
><br>
> ./configure MPICC=mpiicc MPICXX=mpiicpc MPIF77=mpiifort MPIF90=mpiifort --prefix=$RLIB \<br>
>             CXXCPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX"<br>
><br>
> Wei-keng<br>
><br>
> On Jul 28, 2015, at 11:55 PM, Dhirendra Kumar wrote:<br>
><br>
> > Dear Wei<br>
> ><br>
> > Thanx for the reply. I ran the $CFLAGS command which displays the result-<br>
> ><br>
> > -O3 -xHost -axSSE4.2 -fPIC<br>
> ><br>
> > also I configured the parallel netcdf with the arguements suggested by you as-<br>
> > ./configure MPICC=mpiicc MPICXX=mpiicpc MPIF77=mpiifort MPIF90=mpiifort --prefix=$RLIB<br>
> ><br>
> > and while running make, I am getting the following error-<br>
> ><br>
</span>> > /opt/intel/impi/<a href="http://4.1.0.024/intel64/bin/mpiicpc" rel="noreferrer" target="_blank">4.1.0.024/intel64/bin/mpiicpc</a> -c -O3 -xHost -axSSE4.2 -fPIC -I. -I. -I../lib -DHAVE_CONFIG_H  ncmpiType.cpp<br>
> > /opt/intel/impi/<a href="http://4.1.0.024/intel64/include/mpicxx.h(95)" rel="noreferrer" target="_blank">4.1.0.024/intel64/include/mpicxx.h(95)</a>: catastrophic error: #error directive: "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"<br>
<span class="">> >   #error "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"<br>
> ><br>
> > compilation aborted for ncmpiType.cpp (code 4)<br>
> > make[2]: *** [ncmpiType.o] Error 4<br>
> > make[2]: Leaving directory `/home/dkumar/RLIB/parallel-netcdf-1.6.1/src/libcxx'<br>
> > make[1]: *** [libcxx] Error 2<br>
> > make[1]: Leaving directory `/home/dkumar/RLIB/parallel-netcdf-1.6.1/src'<br>
> > make: *** [all] Error 2<br>
> ><br>
> > I am attaching the config.log file for your reference....Please have a look.<br>
> ><br>
> > Thanks<br>
> ><br>
> > Sincerely<br>
> > Dhirendra<br>
> ><br>
> ><br>
</span><span class="">> > On Tue, Jul 28, 2015 at 11:09 PM, Wei-keng Liao <<a href="mailto:wkliao@eecs.northwestern.edu">wkliao@eecs.northwestern.edu</a>> wrote:<br>
> > Hi, Dhirendra<br>
> ><br>
> > Could you also run this command that shows the environment CFLAGS in your settings?<br>
> ><br>
> > echo $CFLAGS<br>
> ><br>
> ><br>
> > Wei-keng<br>
> ><br>
> > On Jul 28, 2015, at 6:43 AM, Dhirendra Kumar wrote:<br>
> ><br>
> > > Dear All,<br>
> > ><br>
</span>> > > I am trying to compile parallel-netcdf-1.6.1 on a linux cluster. I have a preinstalled Intel MPI library and thus I have intel compilers wrapped as mpiicc, mpiicpc and mpiifort in the directory /opt/intel/impi/<a href="http://4.1.0.024/intel64/bin-" rel="noreferrer" target="_blank">4.1.0.024/intel64/bin-</a><br>
<span class="">> > ><br>
> > > I have successfully installed the HDF5 library using the above compilers and I wish to build the netcdf-4.3.3.1 with parallel support. Before doing that as I came to know that I need to install the pnetcdf library so tried I with the following configure options-<br>
> > ><br>
> > > ./configure CC=mpiicc CXX=mpiicpc FC=mpiifort --prefix=/export/home/dkumar/RLIB CPPFLAGS=-I/export/home/dkumar/RLIB/include LDFLAGS=-L/export/home/dkumar/RLIB/lib<br>
> > ><br>
> > > and I am getting the following error:<br>
</span><span class="">> > > checking for mpicc... /opt/intel/impi/<a href="http://4.1.0.024/intel64/bin/mpicc" rel="noreferrer" target="_blank">4.1.0.024/intel64/bin/mpicc</a><br>
> > > checking for gcc... /opt/intel/impi/<a href="http://4.1.0.024/intel64/bin/mpicc" rel="noreferrer" target="_blank">4.1.0.024/intel64/bin/mpicc</a><br>
</span><span class="">> > > checking whether the C compiler works... no<br>
> > > configure: error: in `/home/dkumar/RLIB/parallel-netcdf-1.6.1':<br>
> > > configure: error: C compiler cannot create executables<br>
> > > See `config.log' for more details<br>
> > > configure: WARNING: cache variable ac_cv_env_FCFLAGS_value contains a newline<br>
> > ><br>
> > > I am not able to figure out what went wrong, but I think the configure script could not identify the mpicc (i.e. mpiicc is not being used for compiling).<br>
> > ><br>
> > > Any help would be appreciated. I am attaching the config.log file for the reference.<br>
> > ><br>
> > > Regards<br>
> > > Dhirendra Kumar<br>
> > ><br>
> > > --<br>
> > > ========================================<br>
> > > Dhirendra Kumar<br>
> > > UGC-JRF<br>
> > > School of Environmental Sciences, JNU<br>
> > > New Delhi (India)<br>
</span>> > > Contact: <a href="tel:%2B91%209910778043" value="+919910778043">+91 9910778043</a><br>
> > > Alternate email: <a href="mailto:dhirendra.cub@outlook.com">dhirendra.cub@outlook.com</a><br>
<span class="">> > > =========================================<br>
> > > <config.log><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > ========================================<br>
> > Dhirendra Kumar<br>
> > UGC-JRF<br>
> > School of Environmental Sciences, JNU<br>
> > New Delhi (India)<br>
</span>> > Contact: <a href="tel:%2B91%209910778043" value="+919910778043">+91 9910778043</a><br>
> > Alternate email: <a href="mailto:dhirendra.cub@outlook.com">dhirendra.cub@outlook.com</a><br>
<span class="">> > =========================================<br>
> > <config.log><br>
><br>
><br>
><br>
><br>
> --<br>
> ========================================<br>
> Dhirendra Kumar<br>
> UGC-JRF<br>
> School of Environmental Sciences, JNU<br>
> New Delhi (India)<br>
</span><span class="">> Contact: <a href="tel:%2B91%209910778043" value="+919910778043">+91 9910778043</a><br>
> Alternate email: <a href="mailto:dhirendra.cub@outlook.com">dhirendra.cub@outlook.com</a><br>
> =========================================<br>
</span>> <results.txt><br>
<br>
</blockquote></div><br></div>