<div dir="ltr"><div><div>-O2 and -O3 both crashed the same way on nb_kernel_ref.c, but -O1 succeeded.<br><br></div>-O1 crashed on three other files, though :-( I sent Hal the gory details.<br><br></div>To be fair, I was being evil and using OpenMP, so I tried without, but observed the same symptoms in all cases.<br>
<br>Mark<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 29, 2013 at 9:22 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">----- Original Message -----<br>
><br>
> Hi,<br>
><br>
> Thanks, Hank. The good news is I succeeded at dropping in the debug<br>
> version of that object file to the release build.<br>
<br>
</div>Good. Does it also crash with -O2 or -O1? Also, if autovectorization is triggering it, you can try passing -fno-vectorize or -fno-slp-vectorize -- if this object file is not performance critical, however, then don't worry about it for now.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Hal<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> Compile times were<br>
> extremely pleasing. make mdrun -j 8 took the following numbers of<br>
> seconds at -O3<br>
><br>
> XLC debug 99<br>
> XLC release 253<br>
> clang debug 46<br>
> clang release 57<br>
><br>
> Now, off to look at some more important timing measurements ;-)<br>
><br>
> Mark<br>
><br>
><br>
><br>
><br>
> On Sun, Sep 29, 2013 at 8:24 PM, Hal Finkel < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> ><br>
> ><br>
> > Hi all,<br>
> ><br>
> ><br>
> > I'm the development manager for GROMACS, which will offer new SIMD<br>
> > support for BlueGene/Q in its impending 4.6.4 release. Following<br>
> > some off-list discussion with Jeff Hammond and Hal Finkel, I was<br>
> > happy to explore compiling with clang for BlueGene/Q. Today I tried<br>
> > the version installed on JUQUEEN (r190771-20130914), as I had<br>
> > trouble logging into Vesta (support request lodged).<br>
> ><br>
> ><br>
> > In debug mode, everything went great. clang even warned about some<br>
> > MPI_Alltoall calls that could have had some explicit pointer casts<br>
> > to reassure the reader, which I've now patched.<br>
> ><br>
> ><br>
> > I even used qpxmath.h for a small handful of SIMD trig functions<br>
> > we'd<br>
> > want - that worked perfectly.<br>
> ><br>
> ><br>
> > In release mode, there was a fatal error from clang when compiling<br>
> > the "plain C" version of the code for which I've now written SIMD<br>
> > kernels. This kernel is compiled and built into mdrun as a<br>
> > fallback.<br>
> > My guess would be that auto-vectorization is choking, but hopefully<br>
> > you guys are better judges of that than me! I'm happy to pass this<br>
> > upstream to LLVM if that's the correct place for this report. The<br>
> > .c<br>
> > and .sh files to reproduce the issue can be found at<br>
><br>
> Thanks for the bug report! This is an error in the backend (although<br>
> it certainly could be the autovectorization that is exposing it).<br>
> I'll fix this soon.<br>
><br>
><br>
><br>
> ><br>
> ><br>
> > <a href="https://docs.google.com/file/d/0B0H2SbsMc3_qTnVvcTI1OTNFMFE/edit?usp=sharing" target="_blank">https://docs.google.com/file/d/0B0H2SbsMc3_qTnVvcTI1OTNFMFE/edit?usp=sharing</a><br>
> > <a href="https://docs.google.com/file/d/0B0H2SbsMc3_qenZBX05KSEg1TnM/edit?usp=sharing" target="_blank">https://docs.google.com/file/d/0B0H2SbsMc3_qenZBX05KSEg1TnM/edit?usp=sharing</a><br>
> ><br>
> ><br>
> > The crash trace follows:<br>
> ><br>
> ><br>
> ><br>
> > clang:<br>
> > /gpfs/vesta-home/hfinkel/rpmbuild/BUILD/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:630:<br>
> > llvm::SDValue<unnamed>::DAGCombiner::CombineTo(llvm::SDNode*, const<br>
> > llvm::SDValue*, unsigned int, bool): Assertion `N->getNumValues()<br>
> > ==<br>
> > NumTo && "Broken CombineTo call!"' failed.<br>
> > 0 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ec34a9c<br>
> > llvm::sys::PrintStackTrace(_IO_FILE*) + 4281424836<br>
> > 1 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ec34d00<br>
> > 2 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ec35ba4<br>
> > 3 0x00000fff7f980418 __kernel_sigtramp_rt64 + 0<br>
> > 4 libc.so.6 0x00000080c3766ef8 abort + 4293479848<br>
> > 5 libc.so.6 0x00000080c375b98c<br>
> > 6 libc.so.6 0x00000080c375baa4 __assert_fail + 4293437492<br>
> > 7 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ea0a94c<br>
> > 8 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ea0adfc<br>
> > 9 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ea2de20<br>
> > 10 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ea43554<br>
> > 11 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ea46ecc<br>
> > 12 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7ea49c70<br>
> > llvm::SelectionDAG::Combine(llvm::CombineLevel,<br>
> > llvm::AliasAnalysis&, llvm::CodeGenOpt::Level) + 4279456680<br>
> > 13 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7eb8fba8<br>
> > llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 4280770368<br>
> > 14 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7eb909f8<br>
> > llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction<br>
> > const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) +<br>
> > 4280774016<br>
> > 15 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7eb92dec<br>
> > llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)<br>
> > + 4280783188<br>
> > 16 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7eb93fbc<br>
> > llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)<br>
> > + 4280787732<br>
> > 17 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e84d9c8<br>
> > 18 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e1e26cc<br>
> > llvm::MachineFunctionPass::runOnFunction(llvm::Function&) +<br>
> > 4270867196<br>
> > 19 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e4529b8<br>
> > llvm::FPPassManager::runOnFunction(llvm::Function&) + 4273352968<br>
> > 20 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e452afc<br>
> > llvm::FPPassManager::runOnModule(llvm::Module&) + 4273353276<br>
> > 21 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e4522bc<br>
> > llvm::MPPassManager::runOnModule(llvm::Module&) + 4273351228<br>
> > 22 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e4525e4<br>
> > llvm::PassManagerImpl::run(llvm::Module&) + 4273352020<br>
> > 23 <a href="http://libLLVM-3.4svn.so" target="_blank">libLLVM-3.4svn.so</a> 0x00000fff7e4526f4<br>
> > llvm::PassManager::run(llvm::Module&) + 4273352276<br>
> > 24 clang 0x00000000103ae874<br>
> > 25 clang 0x00000000103af7f8<br>
> > clang::EmitBackendOutput(clang::DiagnosticsEngine&,<br>
> > clang::CodeGenOptions const&, clang::TargetOptions const&,<br>
> > clang::LangOptions const&, llvm::Module*, clang::BackendAction,<br>
> > llvm::raw_ostream*) + 4272665128<br>
> ><br>
> > 26 clang 0x00000000103ab4a4<br>
> > 27 clang 0x000000001059f230 clang::ParseAST(clang::Sema&, bool,<br>
> > bool)<br>
> > + 4274649152<br>
> > 28 clang 0x00000000101e4b64<br>
> > clang::ASTFrontendAction::ExecuteAction()<br>
> > + 4270836484<br>
> > 29 clang 0x00000000103a9b00 clang::CodeGenAction::ExecuteAction() +<br>
> > 4272641808<br>
> > 30 clang 0x00000000101e4fb4 clang::FrontendAction::Execute() +<br>
> > 4270837524<br>
> > 31 clang 0x00000000101be154<br>
> > clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) +<br>
> > 4270679924<br>
> > 32 clang 0x000000001019f894<br>
> > clang::ExecuteCompilerInvocation(clang::CompilerInstance*) +<br>
> > 4270560804<br>
> > 33 clang 0x00000000101959d8 cc1_main(char const**, char const**,<br>
> > char<br>
> > const*, void*) + 4270520648<br>
> > 34 clang 0x000000001019d540 main + 4270551792<br>
> > 35 libc.so.6 0x00000080c374bcf8<br>
> > 36 libc.so.6 0x00000080c374bef0 __libc_start_main + 4293374496<br>
> > Stack dump:<br>
> > 0. Program arguments:<br>
> > /usr/local/bg_soft/clang/llvm.r190771/r190771-20130914/bin/clang<br>
> > -cc1 -fopenmp -triple powerpc64-bgq-linux -S -disable-free<br>
> > -main-file-name nbnxn_kernel_ref.c -static-define<br>
> > -mrelocation-model<br>
> > static -mdisable-fp-elim -ffp-contract=fast -mconstructor-aliases<br>
> > -target-cpu a2q -target-linker-version 2.20.51.0.2 -coverage-file<br>
> > /tmp/nbnxn_kernel_ref-bb4750.s -resource-dir<br>
> > /usr/local/bg_soft/clang/llvm.r190771/r190771-20130914/bin/../lib/clang/3.4<br>
> > -D __bgclang__=1 -D __bgclang_version__="r000000-00000000" -D<br>
> > HAVE_CONFIG_H -D md_EXPORTS -D NDEBUG -I<br>
> > /bgsys/local/clang/llvm.r190771/r190771-20130914/sleef/include -I<br>
> > /bgsys/local/clang/llvm.r190771/r190771-20130914/omp/include -I<br>
> > /bgsys/drivers/V1R2M1/ppc64/comm/include -I<br>
> > /bgsys/drivers/V1R2M1/ppc64/comm/lib/gnu -I<br>
> > /bgsys/drivers/V1R2M1/ppc64 -I<br>
> > /bgsys/drivers/V1R2M1/ppc64/comm/sys/include -I<br>
> > /bgsys/drivers/V1R2M1/ppc64/spi/include -I<br>
> > /bgsys/drivers/V1R2M1/ppc64/spi/include/kernel/cnk -I<br>
> > /homeb/zdv518/zdv518/git/bluegene-dev-r46/build-cmake-clang/src -I<br>
> > /homeb/zdv518/zdv518/git/bluegene-dev-r46/build-cmake-clang/include<br>
> > -I /homeb/zdv518/zdv518/git/bluegene-dev-r46/include -I<br>
> > /homeb/zdv518/zdv518/progs/bgsys-clang/include -I<br>
> > /bgsys/drivers/V1R2M1/ppc64/comm/include -internal-isystem<br>
> > /usr/local/include -internal-isystem<br>
> > /usr/local/bg_soft/clang/llvm.r190771/r190771-20130914/bin/../lib/clang/3.4/include<br>
> > -internal-externc-isystem /include -internal-externc-isystem<br>
> > /usr/include -O3 -Wall -Wno-unused -Wunused-value<br>
> > -fno-dwarf-directory-asm -fdebug-compilation-dir<br>
> > /homeb/zdv518/zdv518/git/bluegene-dev-r46/build-cmake-clang/src/mdlib<br>
> > -ferror-limit 19 -fmessage-length 108 -mstackrealign<br>
> > -fno-signed-char -fobjc-runtime=gcc<br>
> > -fobjc-default-synthesize-properties -fdiagnostics-show-option<br>
> > -fcolor-diagnostics -vectorize-loops -vectorize-slp -isystem<br>
> > /bgsys/drivers/V1R2M1/ppc64/gnu-linux/powerpc64-bgq-linux/sys-include<br>
> > -mllvm -optimize-regalloc -mllvm -fast-isel=0 -o<br>
> > /tmp/nbnxn_kernel_ref-bb4750.s -x c<br>
> > /homeb/zdv518/zdv518/git/bluegene-dev-r46/src/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c<br>
> > 1. <eof> parser at end of file<br>
> > 2. Code generation<br>
> > 3. Running pass 'Function Pass Manager' on module<br>
> > '/homeb/zdv518/zdv518/git/bluegene-dev-r46/src/mdlib/nbnxn_kernels/nbnxn_kernel_ref.c'.<br>
> > 4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on<br>
> > function '@nbnxn_kernel_ref_rf_noener'<br>
> ><br>
> > clang: error: unable to execute command: Aborted (core dumped)<br>
> > clang: error: clang frontend command failed due to signal (use -v<br>
> > to<br>
> > see invocation)<br>
> > clang version 3.4 (trunk)<br>
> > Target: powerpc64-bgq-linux<br>
> > Thread model: posix<br>
> > clang: note: diagnostic msg: PLEASE submit a bug report to<br>
> > <a href="http://llvm.org/bugs/" target="_blank">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed<br>
> > source, and associated run script.<br>
> > clang: note: diagnostic msg:<br>
> > ********************<br>
> ><br>
> ><br>
> > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:<br>
> > Preprocessed source(s) and associated run script(s) are located at:<br>
> > clang: note: diagnostic msg: /tmp/nbnxn_kernel_ref-96ac7c.c<br>
> > clang: note: diagnostic msg: /tmp/nbnxn_kernel_ref-96ac7c.sh<br>
> > clang: note: diagnostic msg:<br>
> ><br>
> ><br>
> > ********************<br>
> ><br>
> ><br>
> > I tried to check that the .sh file would reproduce the above, but<br>
> > it<br>
> > failed with<br>
> ><br>
> ><br>
> ><br>
> > In file included from <built-in>:167:<br>
> > <command line>:6:10: fatal error: 'qpxintrin.h' file not found<br>
> > #include "qpxintrin.h"<br>
><br>
> Ah, I keep forgetting to add this to my TODO list to fix. Thanks for<br>
> reminding me :)<br>
><br>
><br>
> ><br>
> > Hope that is useful - do let me know if I can be of further help!<br>
><br>
> Quite useful.<br>
><br>
> -Hal<br>
><br>
> ><br>
> ><br>
> > Cheers,<br>
> ><br>
> ><br>
> > Mark<br>
> > _______________________________________________<br>
> > llvm-bgq-discuss mailing list<br>
> > <a href="mailto:llvm-bgq-discuss@lists.alcf.anl.gov">llvm-bgq-discuss@lists.alcf.anl.gov</a><br>
> > <a href="https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss" target="_blank">https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss</a><br>
> ><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
><br>
><br>
> _______________________________________________<br>
> llvm-bgq-discuss mailing list<br>
> <a href="mailto:llvm-bgq-discuss@lists.alcf.anl.gov">llvm-bgq-discuss@lists.alcf.anl.gov</a><br>
> <a href="https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss" target="_blank">https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss</a><br>
><br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</div></div></blockquote></div><br></div>