<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif;color:#38761d">I haven't tried shared libraries yet, but I spoke to a system support person for the system in question and he thinks that the -lpbs is due to the way openmpi was built and</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif;color:#38761d">will work on a solution.   </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 5:35 PM, 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, Jim<br>
<br>
Compiling Fortran programs is painfully slow today :(<br>
<br>
I have not got a chance to test OpenMPI 3.0.<br>
I tested against OpenMPI 2.1.2 and it was fine.<br>
2.1.2 also put mpi.mod in lib folder instead of include.<br>
PnetCDF <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> does not look for mpi.mod explicitly.<br>
It just tried compile a short program that uses mpi.mod.<br>
Please send me the file config.log, if you would like me to take a look.<br>
<br>
I have no idea why -lpbs appears there. I assume libtool finds it from<br>
linker dependency list. Does this only happen when building static-only<br>
library? Did you try build shared libraries and see the same problem?<br>
<span class="HOEnZb"><font color="#888888"><br>
Wei-keng<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Nov 6, 2017, at 11:57 AM, Jim Edwards wrote:<br>
<br>
> It turns out that openmpi puts it's mpi.mod in the lib instead of include directory and the pnetcdf configure wasn't finding it.<br>
> Once I fixed this and use mpi.mod instead of mpif.h that solved the problem, however then I run into another problem at the<br>
> link step:<br>
><br>
>  CCLD     ncmpivalid<br>
><br>
> ld: cannot find -lpbs<br>
><br>
> I haven't figured out where the requirement on a library pbs comes from or how to get rid of it?<br>
><br>
><br>
> On Mon, Nov 6, 2017 at 9:36 AM, Jim Edwards <<a href="mailto:jedwards@ucar.edu">jedwards@ucar.edu</a>> wrote:<br>
><br>
> On Mon, Nov 6, 2017 at 9:16 AM, Jim Edwards <<a href="mailto:jedwards@ucar.edu">jedwards@ucar.edu</a>> wrote:<br>
> I am trying to build with openmpi/3.0.0 and intel17 and hanging in the build<br>
> of pnetcdf.f90.<br>
><br>
> The make output at the time is:<br>
> make[4]: Entering directory '/glade/u/home/jedwards/src/<wbr>parallel-netcdf/src/binding/<wbr>f90'<br>
><br>
>   FC       pnetcdf.lo<br>
><br>
> examining the process I see:<br>
><br>
><br>
> /glade/u/apps/opt/intel/<wbr>2017u1/compilers_and_<wbr>libraries/linux/bin/intel64/<wbr>ifort -I. -I. -debug minimal -g -O0 -c pnetcdf.f90 -o pnetcdf.o -I/glade/u/apps/ch/os/usr/<wbr>include -L/glade/u/apps/opt/intel/<wbr>2017u1/compilers_and_<wbr>libraries/linux/lib/intel64_<wbr>lin -L/glade/u/apps/ch/os/usr/<wbr>lib64 -L/glade/u/apps/ch/os/lib64 -L/glade/u/apps/ch/os/usr/lib -L/glade/u/apps/ch/os/lib -L/glade/u/apps/ch/opt/<wbr>openmpi/3.0.0/intel/17.0.1/lib -Wl,--disable-new-dtags -Wl,-rpath,/glade/u/apps/opt/<wbr>intel/2017u1/compilers_and_<wbr>libraries/linux/lib/intel64_<wbr>lin -Wl,-rpath,/glade/u/apps/ch/<wbr>os/usr/lib64 -Wl,-rpath,/glade/u/apps/ch/<wbr>os/lib64 -Wl,-rpath,/glade/u/apps/ch/<wbr>os/usr/lib -Wl,-rpath,/glade/u/apps/ch/<wbr>os/lib -Wl,-rpath,/glade/u/apps/ch/<wbr>opt/openmpi/3.0.0/intel/17.0.<wbr>1/lib -lrt -ldl<br>
><br>
><br>
><br>
> ​Please ignore the following incorrect statement, I did this in another window where I still had the default mpt loaded instead of openmpi, if I do this with openmpi, it still hangs. ​<br>
><br>
><br>
><br>
><br>
> If I remove all of the -L and -rpath flags and just do:<br>
><br>
>  /glade/u/apps/opt/intel/<wbr>2017u1/compilers_and_<wbr>libraries/linux/bin/intel64/<wbr>ifort -I. -I. -debug minimal -g -O0 -c pnetcdf.f90 -o pnetcdf.o<br>
><br>
> That completes right away, so the problem seems to have to do with libtool.   Also building with mpt instead of openmpi on the same system works.<br>
><br>
> Any ideas?<br>
><br>
> --<br>
> Jim Edwards<br>
><br>
> CESM Software Engineer<br>
> National Center for Atmospheric Research<br>
> Boulder, CO<br>
><br>
><br>
><br>
> --<br>
> Jim Edwards<br>
><br>
> CESM Software Engineer<br>
> National Center for Atmospheric Research<br>
> Boulder, CO<br>
><br>
><br>
><br>
> --<br>
> Jim Edwards<br>
><br>
> CESM Software Engineer<br>
> National Center for Atmospheric Research<br>
> Boulder, CO<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div>Jim Edwards<br><br></div><font size="1">CESM Software Engineer<br></font></div><font size="1">National Center for Atmospheric Research<br></font></div><font size="1">Boulder, CO</font> <br></div></div>
</div>