<div dir="ltr">Try using the paraview superbuild to build static lib paraview on titan.<div><br></div><div>To do that do a git fetch from:</div><div><span style="line-height:19px;font-size:10px;background-color:rgb(249,249,249);font-family:monospace">git://<a href="http://paraview.org/ParaViewSuperbuild.git" target="_blank">paraview.org/ParaViewSuperbuild.git</a></span><br>
</div><div style><br></div><div style>Then make two build directories.</div><div style><br></div><div style>In the first, <span style="font-family:arial,sans-serif;font-size:13px">set CROSS_BUILD_STAGE to "TOOLS", set CROSS_TARGET to "xk7_gnu", and build.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">In the next, </span><span style="font-family:arial,sans-serif;font-size:13px">set CROSS_BUILD_STAGE to "</span><span class="" style="font-family:arial,sans-serif;font-size:13px">CROSS</span><span style="font-family:arial,sans-serif;font-size:13px">", and point PARAVIEW_HOSTTOOLS_DIR to the first build directory and build.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">If it doesn't work let us know. It has been a couple of months since I built there, and until I get a nightly dashboard up on titan, I can't assert that something hasn't broken it.</span><br>
</div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><font face="arial, sans-serif">Note that this the build will use the gnu compiler chain. I haven't tried any of the other compilers recently on a cray, but I'm sure we can make it work and then add another CROSS_TARGET for them if your codes require something else.</font></div>
<div style><font face="arial, sans-serif"><br></font></div><div style><font face="arial, sans-serif">As Burlen suggested, with static builds library order can easily be a sticking point that result in late stage linking errors. As a workaround you can make VERBOSE=1 to see the link line, and edit it and reenter it to see if this is the problem. The longer term fix for me was to add the MPI library set to the HDF5_LIBRARIES set, which makes cmake infer the proper link order. (see the bgp_xlc target's ParaViewDefaults.cmake to see that approach).</font></div>
<div style><font face="arial, sans-serif"><br></font></div><div style><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>
21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div>
<br><br><div class="gmail_quote">On Fri, Jun 7, 2013 at 12:11 PM, Burlen Loring <span dir="ltr"><<a href="mailto:bloring@lbl.gov" target="_blank">bloring@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><br>
You may be missing a gni library? use nm on the .a files to figure
out if it has the missing symbols. Also with static linking the
order you list the libraries matters. in your case you'll need to
list the gni library(ies) before the mpich libarary on the link
line. You could check if that's your problem by running "make
VERBOSE=1" and examining the order that's used. You could
potentiall force the linker to not care about library order by
enclosing mpi and it's dependencies in --start-group , --end-group
linker options...<br>
<br>
It's a little more work but in my experience things will go
smoother for you if you avoid the CC wrappers when building
ParaView. also pgi is used relatively rarely compared to gcc so
you're asking for problems. Fine if you're prepared to dig in a
deal with them, but if you want it just to work, then use gcc.<br>
<br>
to avoid cc wrappers one thing you need to do is find mpi and its
dependencies. if you run "CC --verbose" you can see the link
options used by CC. You want to extract just the ones you need and
no others. then since you want static linking you might need
determine the order of the libraries. to give you some ideas about
what you're after, I'll attach result of this process from NERSC's
Cray XC30 Edison, but watch out I used dynamic linking so it's not
exactly what you need.<br>
<br>
hope this will help<div><div class="h5"><br>
<br>
On 06/07/2013 07:02 AM, Hong Yi wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div>
<p class="MsoNormal">I’ve been working on building ParaView on
Oak Ridge HPC Titan (Cray HPC system) for its
coprocessing/catalyst libraries to be linked to PHASTA
simulation code running on Titan for in-situ coprocessing as
well as live monitoring via pvserver which are already built
and can run successfully on Oak Ridge visualization cluster
Lens. There are some “undefined references” errors while
building ParaView on Titan which I already contacted Titan HPC
support specialist but we are currently out of ideas on what
to try next to fix these compilation errors. So I am hoping to
get some ideas from people on this list who might have
experienced such issues and might have some fresh ideas to
help us move forward.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Specifically, we have to build ParaView on
titan with “BUILD_SHARED_LIB” off so it can be statically
linked to PHASTA simulation code and run on the Titan compute
nodes. I set “apron” as MPIEXEC, set Cray pgi wrapper
compilers CC, cc, ftn as MPI_CXX_COMPILER, MPI_C_COMPILER, and
MPI_FORTRAN_COMPILER, set Cray_mpich2/5.6.3 as MPI libraries
to link to. First, I tried to use gnu compilers as CMAKE
compilers and was able to configure and then build ParaView,
but got the following “undefined references” errors in
libmpich.a such as the following when it was about 51% built:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p>------------------------------------<u></u><u></u></p>
<p>Linking CXX executable
../../../bin/vtkpython<u></u><u></u></p>
<p>/opt/cray/mpt/5.6.3/gni/mpich2-pgi/119/lib/libmpich.a(gni_poll.o):
In function `MPID_nem_gni_process_async_mhndl_ack':<u></u><u></u></p>
<p>gni_poll.c:(.text+0x3d): undefined
reference to `GNI_SmsgRelease'<u></u><u></u></p>
<p>gni_poll.c:(.text+0x58): undefined
reference to `gni_err_str'<u></u><u></u></p>
<p class="MsoNormal">--------------------------------<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Then as suggested by HPC support
specialist, I changed to use cray pgi wrapper compilers CC,
cc, ftn as corresponding CMAKE compilers (rather than use gnu
compilers as I initially did), however, I got the following
“undefined references” errors when it was about 19% built:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p>--------------------------------<u></u><u></u></p>
<p>/ccs/proj/nfi010/ParaView/ParaView-3.98.1-source/VTK/Utilities/KWSys/vtksys/SystemTools.cxx:1768:
warning: Using 'getpwnam' in statically linked applications
requires at runtime the shared libraries from the glibc
version used for linking<u></u><u></u></p>
<p>/opt/pgi/12.10.0/linux86-64/12.10/lib/libCmpz.a(eh_util.o):
In function `std::uncaught_exception(void)':<u></u><u></u></p>
<p>eh_util.c:(.text+0x307): undefined
reference to `__zceh_uncaught_exception'<u></u><u></u></p>
<p>/usr/bin/ld: link errors found, deleting
executable `../../../bin/vtkHashSource-pv3.98'<u></u><u></u></p>
<p>child process exit status 1:
/sw/xk6/altd/bin/ld<u></u><u></u></p>
<p>make[2]: *** [bin/vtkHashSource-pv3.98]
Error 2<u></u><u></u></p>
<p>make[1]: ***
[VTK/Utilities/HashSource/CMakeFiles/vtkHashSource.dir/all]
Error 2<u></u><u></u></p>
<p>make: *** [all] Error 2<u></u><u></u></p>
<p>---------------------------------------<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Not sure why pgi compiler is trying to use
glibc which then leads to the undefined reference error as
shown above with libCmpz.a. This problem does not happen if we
use gnu compilers for CMake compilers but we got another set
of undefined references in libmpich.a as described above. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Anybody has any ideas on what is wrong here
and what we should try next to resolve these “undefined
references” errors?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Many thanks for any suggestions you can
provide!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hong<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u><u></u></p>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><div class="im"><pre>_______________________________________________
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a>
Follow this link to subscribe/unsubscribe:
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
</div></blockquote>
<br>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>