<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
span.HTMLPreformattedChar
        {font-family:"Consolas","serif"}
span.EmailStyle20
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Finally I got ParaView built on Titan using gnu compiler chain. However, when I link those ParaView Coprocessing libraries to PHASTA simulation software which was built using pgi
 compiler, I got the following linking error:<br>
<br>
------------------------<br>
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/opt/cray/xe-sysroot/4.1.40/usr/lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie<br>
------------------------<br>
<br>
I contacted Titan user support but they have not seen such error before and have no ideas on how to resolve the error. I tried to build ParaView both statically (with BUILD_SHARED_LIB off) and dynamically (with BUILD_SHARED_LIB on) and linked them to PHASTA
 code and got the same linking error. In both static and dynamic build of ParaView, there exist a few shared libraries (in static build) and static libraries (in dynamic build) due to the fact of missing some static and shared libraries on Titan HPC, but ParaView
 built successfully without any errors in both cases. I suspect this error has to do with linking GNU-built libraries using pgi compilers, so I also tried once more to build ParaView using pgi compiler (as opposed to gnu compiler chain) and got further along
 to 31% built, but then got the following error after &quot;built target protoc_compiler&quot; and while &quot;generating vtkPVMessage.pb.h, vtkPVMessage.pb.cc&quot;:<br>
<br>
------------------------<br>
/bin/sh: line 1: 64439 Illegal instruction&nbsp;&nbsp;&nbsp;&nbsp; /ccs/proj/nfi010/ParaView/ParaView-3.98-Release-Titan-pgi/bin/protoc --cpp_out=dllexport_decl=VTKPVSERVERIMPLEMENTATIONCORE_EXPORT:/ccs/proj/nfi010/ParaView/ParaView-3.98-Release-Titan-pgi/ParaViewCore/ServerImplementation/Core
 --proto_path /ccs/proj/nfi010/ParaView/ParaView-3.98.1-source/ParaViewCore/ServerImplementation/Core /ccs/proj/nfi010/ParaView/ParaView-3.98.1-source/ParaViewCore/ServerImplementation/Core/vtkPVMessage.proto<br>
make[2]: *** [ParaViewCore/ServerImplementation/Core/vtkPVMessage.pb.h] Error 132<br>
make[1]: *** [ParaViewCore/ServerImplementation/Core/CMakeFiles/protobuf_code_generation.dir/all] Error 2<br>
------------------------<br>
I tried to run this &quot;protoc&quot; on my bash environment and got the same error &quot;Illegal instruction.&quot; I simplified the command as follows and still got the same error:<br>
---------------------<br>
/ccs/proj/nfi010/ParaView/ParaView-3.98-Release-Titan-pgi/bin/protoc --cpp_out=/ccs/proj/nfi010/ParaView/ParaView-3.98-Release-Titan-pgi/ParaViewCore/ServerImplementation/Core --proto_path /ccs/proj/nfi010/ParaView/ParaView-3.98.1-source/ParaViewCore/ServerImplementation/Core
 /ccs/proj/nfi010/ParaView/ParaView-3.98.1-source/ParaViewCore/ServerImplementation/Core/vtkPVMessage.proto<br>
---------------------<br>
<br>
Looking at the protoc command help, the command above looks like a valid one, but still got the error &quot;Illegal instruction.&quot;<br>
<br>
Any idea on what is wrong with this &quot;protoc&quot; command and how I can resolve this error?
<br>
<br>
I am running out of ideas and really appreciate any suggestions and comments you can provide.<br>
<br>
Thanks,<br>
<br>
Hong<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF98534" style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> paraview-bounces@paraview.org [paraview-bounces@paraview.org] on behalf of Hong Yi [hongyi@renci.org]<br>
<b>Sent:</b> Friday, June 07, 2013 1:58 PM<br>
<b>To:</b> David E DeMarle; Burlen Loring<br>
<b>Cc:</b> paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] Compiling Paraview errors on Oak Ridge HPC Titan<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Burlen and David,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Many thanks for all the useful information. I will try the suggestions and report back if I run into further issues.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Thanks again,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">Hong</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> David E DeMarle [mailto:dave.demarle@kitware.com]
<br>
<b>Sent:</b> Friday, June 07, 2013 1:38 PM<br>
<b>To:</b> Burlen Loring<br>
<b>Cc:</b> Hong Yi; paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] Compiling Paraview errors on Oak Ridge HPC Titan</span></p>
<p class="MsoNormal">&nbsp;</p>
<div>
<p class="MsoNormal">Try using the paraview superbuild to build static lib paraview on titan.</p>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">To do that do a git fetch from:</p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt; font-family:&quot;Courier New&quot;; background:#F9F9F9">git://<a href="http://paraview.org/ParaViewSuperbuild.git" target="_blank">paraview.org/ParaViewSuperbuild.git</a></span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">Then make two build directories.</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">In the first,&nbsp;<span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">set&nbsp;CROSS_BUILD_STAGE to &quot;TOOLS&quot;, set CROSS_TARGET to &quot;xk7_gnu&quot;, and build.</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">In the next,&nbsp;set CROSS_BUILD_STAGE to &quot;CROSS&quot;, and point PARAVIEW_HOSTTOOLS_DIR to the first build directory and build.</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">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></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">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.</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">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&nbsp;library set to the HDF5_LIBRARIES set, which makes&nbsp;cmake infer the proper link order. (see the bgp_xlc target's ParaViewDefaults.cmake to see that approach).</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
</p>
<div>
<p class="MsoNormal">David E DeMarle<br>
Kitware, Inc.<br>
R&amp;D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-881-4909</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&nbsp;</p>
<div>
<p class="MsoNormal">On Fri, Jun 7, 2013 at 12:11 PM, Burlen Loring &lt;<a href="mailto:bloring@lbl.gov" target="_blank">bloring@lbl.gov</a>&gt; wrote:</p>
<div>
<div>
<p class="MsoNormal"><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 &quot;make VERBOSE=1&quot; 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 &quot;CC --verbose&quot; 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</p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 06/07/2013 07:02 AM, Hong Yi wrote:</p>
</div>
</div>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal" style="">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.
</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p class="MsoNormal" style="">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 &nbsp;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. &nbsp;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:</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p>------------------------------------</p>
<p>Linking CXX executable ../../../bin/vtkpython</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':</p>
<p>gni_poll.c:(.text&#43;0x3d): undefined reference to `GNI_SmsgRelease'</p>
<p>gni_poll.c:(.text&#43;0x58): undefined reference to `gni_err_str'</p>
<p class="MsoNormal" style="">--------------------------------</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p class="MsoNormal" style="">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:</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p>--------------------------------</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</p>
<p>/opt/pgi/12.10.0/linux86-64/12.10/lib/libCmpz.a(eh_util.o): In function `std::uncaught_exception(void)':</p>
<p>eh_util.c:(.text&#43;0x307): undefined reference to `__zceh_uncaught_exception'</p>
<p>/usr/bin/ld: link errors found, deleting executable `../../../bin/vtkHashSource-pv3.98'</p>
<p>child process exit status 1: /sw/xk6/altd/bin/ld</p>
<p>make[2]: *** [bin/vtkHashSource-pv3.98] Error 2</p>
<p>make[1]: *** [VTK/Utilities/HashSource/CMakeFiles/vtkHashSource.dir/all] Error 2</p>
<p>make: *** [all] Error 2</p>
<p>---------------------------------------</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p class="MsoNormal" style="">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. </p>
<p class="MsoNormal" style="">&nbsp;</p>
<p class="MsoNormal" style="">Anybody has any ideas on what is wrong here and what we should try next to resolve these “undefined references” errors?</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p class="MsoNormal" style="">Many thanks for any suggestions you can provide!</p>
<p class="MsoNormal" style="">&nbsp;</p>
<p class="MsoNormal" style="">Hong</p>
<p class="MsoNormal" style="">&nbsp;</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&nbsp;</p>
</div>
</div>
<div>
<pre>_______________________________________________</pre>
<pre>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a></pre>
<pre>&nbsp;</pre>
<pre>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></pre>
<pre>&nbsp;</pre>
<pre>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></pre>
<pre>&nbsp;</pre>
<pre>Follow this link to subscribe/unsubscribe:</pre>
<pre><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a></pre>
</div>
</blockquote>
<p class="MsoNormal">&nbsp;</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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></p>
</div>
<p class="MsoNormal">&nbsp;</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>