<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Derek,</p>
<p>bgclang itself is not setup to create executables for the login
nodes. To some extent, the problems with the configure scripts are
unavoidable, especially if MPI is required. The assertions from
PAMI::BgqJobPersonality come from static initializers inside the
MPI library which run when the MPI library is loaded. I can
provide you with a work-around for this problem, but you'll still
run into problems if the compiler generates any QPX (i.e. SIMD)
instructions because those won't work on the login node.</p>
<p>In any case, you can work around the static initializer problem
by creating a version of the libpami-gcc.so library that is edited
so that it won't run its static initializers and then add that
library to your LD_LIBRARY_PATH when running the configure
scripts. Here's the magic incarnation I've used for this purpose:</p>
<p>cp -a /bgsys/drivers/ppcfloor/comm/lib/libpami-gcc.so ./</p>
<p>printf '\x4e\x80\x00\x20' | dd of=libpami-gcc.so bs=1 seek=$(echo
"ibase=16;obase=A;$(objdump -d libpami-gcc.so | grep
__do_global_ctors_aux | grep '^0' | awk '{ print $1 }' | tr
'[a-f]' '[A-F]')" | bc) count=4 conv=notrunc</p>
<p>Hopefully, this will be enough to get you past the configure
scripts. If not, or if you have any questions, please let me know.</p>
<p> -Hal<br>
</p>
<div class="moz-cite-prefix">On 12/29/2016 11:27 AM, Derek Gaston
wrote:<br>
</div>
<blockquote
cite="mid:CAFfxPjo7UG0=CEEigOVH4wNeE9LdP=WUkq3UHoYhLLTa_Z6SoQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">Having trouble getting a dynamically linked
executable working on Mira/Cetus head nodes. The executable
_is_ working if I submit it to the queue.
<div><br>
</div>
<div>Compiling a static executable works both on the head node
and on the compute nodes.</div>
<div><br>
</div>
<div>Is there some special environment sauce I need that will
enable me to run these executables on the head node?
Obviously I don't want to run much on the head node... but not
even being able to test the executables without a trip through
the queue is problematic! For instance... "configure" scripts
kind of rely on being able to compile/run simple test
programs!<br>
<div>
<div><br>
</div>
<div>My .soft is:</div>
<div><br>
</div>
<div>
<div>+mpiwrapper-bgclang-mpi3.legacy.ndebug</div>
<div>@default<br>
</div>
</div>
<div><br>
</div>
<div>(Note: I have also tried essentially all the other
bgclang options and they all produce the same error).</div>
<div><br>
</div>
<div><br>
</div>
<div>I'm trying to compile a test.c:</div>
<div><br>
</div>
<div>
<div>int main() </div>
<div>{</div>
<div> return 0;</div>
<div>}</div>
</div>
<div><br>
</div>
<div>My compile line is:</div>
<div><br>
</div>
<div>mpicc -o test -dynamic test.c<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>The error I'm seeing is:</div>
<div><br>
</div>
<div>
<div>$ ./test</div>
<div>ERROR: ld.so: object
'/soft/buildtools/trackdeps/${LIB}/trackdeps.so' from
LD_PRELOAD cannot be preloaded: ignored.</div>
<div>/bgsys/source/srcV1R2M2.15270/comm/sys/buildtools/pami/common/bgq/BgqPersonality.h:102: </div>
<div>/bgsys/source/srcV1R2M2.15270/comm/sys/buildtools/pami/common/bgq/BgqPersonality.h<102></div>
<div>Aborted (core dumped)</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Getting a stack trace out of the core file gives:</div>
<div><br>
</div>
<div>
<div>(gdb) bt</div>
<div>#0 0x00000fff837fec40 in raise (sig=Unhandled dwarf
expression opcode 0xf3</div>
<div>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56</div>
<div>#1 0x00000fff838008b8 in abort () at abort.c:90</div>
<div>#2 0x00000fff841a12b8 in
PAMI::BgqJobPersonality::BgqJobPersonality
(this=<value optimized out>) at
/bgsys/source/srcV1R2M2.15270/comm/sys/buildtools/pami/common/bgq/BgqPersonality.h:102</div>
<div>#3 0x00000fff841aeff4 in PAMI::Global::Global
(this=0xfff84316848) at
/bgsys/source/srcV1R2M2.15270/comm/sys/buildtools/pami/common/bgq/Global.h:110</div>
<div>#4 0x00000fff8419fa1c in
__static_initialization_and_destruction_0 () at
/bgsys/source/srcV1R2M2.15270/comm/sys/buildtools/pami/common/bgq/BgqGlobal.cc:25</div>
<div>#5 global constructors keyed to BgqGlobal.cc(void)
() at
/bgsys/source/srcV1R2M2.15270/comm/sys/buildtools/pami/common/bgq/BgqGlobal.cc:70</div>
<div>#6 0x00000fff841d2b6c in .__do_global_ctors_aux ()
from /bgsys/drivers/V1R2M2/ppc64/comm/lib/libpami-gcc.so</div>
<div>#7 0x00000fff83f93cac in ._init () from
/bgsys/drivers/V1R2M2/ppc64/comm/lib/libpami-gcc.so</div>
<div>#8 0x00000fff8492493c in call_init (l=0xfff84a17138,
argc=Unhandled dwarf expression opcode 0xf3</div>
<div>) at dl-init.c:69</div>
<div>#9 call_init (l=0xfff84a17138, argc=Unhandled dwarf
expression opcode 0xf3</div>
<div>) at dl-init.c:34</div>
<div>#10 0x00000fff84924acc in _dl_init
(main_map=0xfff84a13610, argc=Unhandled dwarf expression
opcode 0xf3</div>
<div>) at dl-init.c:133</div>
<div>#11 0x00000fff849140bc in ._dl_start_user () from
/bgsys/drivers/V1R2M2/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/lib/ld64.so.1</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks for any help!</div>
</div>
</div>
<div><br>
</div>
<div>Derek</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
llvm-bgq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-bgq-discuss@lists.alcf.anl.gov">llvm-bgq-discuss@lists.alcf.anl.gov</a>
<a class="moz-txt-link-freetext" href="https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss">https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>