<div dir="ltr"><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hi all,</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">What's the best Linux distribution (or other build environment) to test the Clang/OpenMP offloading support? I've run into enough issues trying to get it working that I could probably file a half dozen bug reports, but I want to make sure I'm not doing something incredibly stupid before I go down that path...</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">I've tried both -fopenmp-targets=nvptx64-<wbr>nvidia-cuda and -fopenmp-targets=x86_64-pc-<wbr>linux-gnu, and end up hitting similar problems with both.<br><br>I've been using my own LLVM builds and can't seem to make it cooperate. First off, -fopenmp-targets=<sometarget> doesn't like seeing ar archives on the link line for some reason: clang-offload-bundler generates 0-byte .o files for the offload target types when pointed at ".a" files. So I have to point it to the object files that would have been contained inside the static libs. Doing that will at least make it compile and link, but that's still not using the target offload support. I haven't yet used offloading anywhere, but from what I understand, I need to wrap a bunch of places with "#pragma omp declare target" and add "#pragma omp target" to some "#pragma omp parallel" blocks, right?<br><br>Adding "#pragma omp target" causes other problems. With LLVM 6.0 (plus some<span> cherry-picked </span>commits[1] for CUDA-9.1 support and other stuff) it has symbol-resolution issues at link time (I'm not sure where these symbols are supposed to come from, either):<br><br>nvlink warning : Function '__omp_outlined___wrapper' has address taken but no possible call to it<br>nvlink error   : Undefined reference to '__kmpc_kernel_init' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_dispatch_init_8u' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_dispatch_next_8u' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to 'bodyBodyInteraction' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_global_thread_num' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_kernel_prepare_<wbr>parallel' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_kernel_deinit' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_kernel_parallel' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink error   : Undefined reference to '__kmpc_kernel_end_parallel' in '/tmp/nbody_CPU_SOA-d2d669.<wbr>cubin'<br>nvlink info    : 192 bytes gmem<br>nvlink info    : Function properties for '__omp_offloading_fe00_d0111c_<wbr>_ComputeGravitation_SOA_l63':<br>nvlink info    : used 94 registers, 112 stack, 0 bytes smem, 360 bytes cmem[0], 0 bytes lmem<div><br></div><div>The "bodyBodyInteraction" one is probably my fault somehow, though I don't understand how. It's a static function defined in a header, but wrapping it with "#pragma omp declare target" doesn't seem to fix the undefined reference. So I don't know what's happening there.</div><div><br></div><div>Given the above link problems I attempted using trunk as well, and ended up with a segmentation fault in clang when compiling the .c file with the "#pragma omp target" directive in it:</div><div><br></div><div><div> "/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0" -cc1 -triple nvptx64-nvidia-cuda -aux-triple x86_64-unknown-linux-gnu -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name nbody_CPU_SOA.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros -mreassociate -freciprocal-math -fno-trapping-math -ffp-contract=fast -ffast-math -ffinite-math-only -no-integrated-as -fuse-init-array -mlink-cuda-bitcode /opt/cuda/nvvm/libdevice/<wbr>libdevice.10.bc -target-feature +ptx60 -target-cpu sm_35 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /home/steven/.apps/llvm-trunk/<wbr>lib/clang/7.0.0 -dependency-file nbody_CPU_SOA.d -MT nbody_CPU_SOA.o -idirafter /usr/lib/gcc/x86_64-pc-linux-<wbr>gnu/7.3.1/include -D _GNU_SOURCE -D LIBTIME_STATIC -D USE_OPENMP -D HAVE_SIMD -D USE_LIBC11 -I ../subprojects/c11/include -I ../subprojects/time/include -I/opt/intel/composerxe/linux/<wbr>ipp/include -I/opt/intel/composerxe/linux/<wbr>mkl/include -internal-isystem /usr/local/include -internal-isystem /home/steven/.apps/llvm-trunk/<wbr>lib/clang/7.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /usr/local/include -internal-isystem /home/steven/.apps/llvm-trunk/<wbr>lib/clang/7.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-prototypes -Wno-declaration-after-<wbr>statement -Wno-long-long -Wno-unknown-pragmas -Wold-style-definition -Wstrict-prototypes -std=gnu99 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/steven/Development/<wbr>nbody/src -ferror-limit 19 -fmessage-length 190 -fopenmp -pthread -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/nbody_CPU_SOA-bcc597.s -x c nbody_CPU_SOA.c -fopenmp-is-device -fopenmp-host-ir-file-path /tmp/nbody_CPU_SOA-eb1725.bc</div><div>clang -cc1 version 7.0.0 based upon LLVM 7.0.0svn default target x86_64-unknown-linux-gnu</div><div>ignoring nonexistent directory "/include"</div><div>ignoring nonexistent directory "/include"</div><div>ignoring duplicate directory "/usr/local/include"</div><div>ignoring duplicate directory "/home/steven/.apps/llvm-<wbr>trunk/lib/clang/7.0.0/include"</div><div>ignoring duplicate directory "/usr/include"</div><div>#include "..." search starts here:</div><div>#include <...> search starts here:</div><div> ../subprojects/c11/include</div><div> ../subprojects/time/include</div><div> /opt/intel/composerxe/linux/<wbr>ipp/include</div><div> /opt/intel/composerxe/linux/<wbr>mkl/include</div><div> /usr/local/include</div><div> /home/steven/.apps/llvm-<wbr>trunk/lib/clang/7.0.0/include</div><div> /usr/include</div><div> /usr/lib/gcc/x86_64-pc-linux-<wbr>gnu/7.3.1/include</div><div>End of search list.</div><div>#0 0x00007f5659cae3ba llvm::sys::PrintStackTrace(<wbr>llvm::raw_ostream&) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x72f3ba)</div><div>#1 0x00007f5659cabe36 llvm::sys::RunSignalHandlers() (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x72ce36)</div><div>#2 0x00007f5659cac428 SignalHandler(int) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x72d428)</div><div>#3 0x00007f565c39db90 __restore_rt (/usr/lib/libpthread.so.0+<wbr>0x11b90)</div><div>#4 0x00007f565a9d9c3c (anonymous namespace)::CVPLatticeFunc::<wbr>ComputeLatticeVal(llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x145ac3c)</div><div>#5 0x00007f565a9dbb2e llvm::SparseSolver<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal, llvm::LatticeKeyInfo<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > > > >::getValueState(llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x145cb2e)</div><div>#6 0x00007f565a9dcbfd (anonymous namespace)::CVPLatticeFunc::<wbr>visitCallSite(llvm::CallSite, llvm::DenseMap<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal, llvm::DenseMapInfo<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > > >, llvm::detail::DenseMapPair<<wbr>llvm::PointerIntPair<llvm::<wbr>Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal> >&, llvm::SparseSolver<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal, llvm::LatticeKeyInfo<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > > > >&) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x145dbfd)</div><div>#7 0x00007f565a9e138f (anonymous namespace)::CVPLatticeFunc::<wbr>ComputeInstructionState(llvm::<wbr>Instruction&, llvm::DenseMap<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal, llvm::DenseMapInfo<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > > >, llvm::detail::DenseMapPair<<wbr>llvm::PointerIntPair<llvm::<wbr>Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal> >&, llvm::SparseSolver<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal, llvm::LatticeKeyInfo<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > > > >&) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x146238f)</div><div>#8 0x00007f565a9e3584 llvm::SparseSolver<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > >, (anonymous namespace)::CVPLatticeVal, llvm::LatticeKeyInfo<llvm::<wbr>PointerIntPair<llvm::Value*, 2u, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*>, llvm::PointerIntPairInfo<llvm:<wbr>:Value*, 2u, llvm::PointerLikeTypeTraits<<wbr>llvm::Value*> > > > >::visitInst(llvm::<wbr>Instruction&) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x1464584)</div><div>#9 0x00007f565a9e46a3 runCVP(llvm::Module&) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x14656a3)</div><div>#10 0x00007f5659d9b705 llvm::legacy::PassManagerImpl:<wbr>:run(llvm::Module&) (/home/steven/.apps/llvm-<wbr>trunk/bin/../lib/<a href="http://libllvm-7.0svn.so/" target="_blank" style="color:rgb(17,85,204)">libLLVM-7.<wbr>0svn.so</a>+0x81c705)</div><div>#11 0x00000000007180f4 (anonymous namespace)::<wbr>EmitAssemblyHelper::<wbr>EmitAssembly(clang::<wbr>BackendAction, std::unique_ptr<llvm::raw_<wbr>pwrite_stream, std::default_delete<llvm::raw_<wbr>pwrite_stream> >) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0x7180f4)</div><div>#12 0x000000000071a718 clang::EmitBackendOutput(<wbr>clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_<wbr>pwrite_stream, std::default_delete<llvm::raw_<wbr>pwrite_stream> >) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0x71a718)</div><div>#13 0x0000000000d4961c clang::BackendConsumer::<wbr>HandleTranslationUnit(clang::<wbr>ASTContext&) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0xd4961c)</div><div>#14 0x0000000001417b89 clang::ParseAST(clang::Sema&, bool, bool) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0x1417b89)</div><div>#15 0x0000000000d48377 clang::CodeGenAction::<wbr>ExecuteAction() (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0xd48377)</div><div>#16 0x0000000000b5f9e6 clang::FrontendAction::<wbr>Execute() (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0xb5f9e6)</div><div>#17 0x0000000000b1fc1a clang::CompilerInstance::<wbr>ExecuteAction(clang::<wbr>FrontendAction&) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0xb1fc1a)</div><div>#18 0x0000000000c17871 clang::<wbr>ExecuteCompilerInvocation(<wbr>clang::CompilerInstance*) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0xc17871)</div><div>#19 0x00000000006b2c18 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0x6b2c18)</div><div>#20 0x00000000006a07df main (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0x6a07df)</div><div>#21 0x00007f56588b39a7 __libc_start_main (/usr/lib/libc.so.6+0x219a7)</div><div>#22 0x00000000006aff1a _start (/home/steven/.apps/llvm-<wbr>trunk/bin/clang-6.0+0x6aff1a)</div><div>Stack dump:</div><div>0.      Program arguments: /home/steven/.apps/llvm-trunk/<wbr>bin/clang-6.0 -cc1 -triple nvptx64-nvidia-cuda -aux-triple x86_64-unknown-linux-gnu -S -disable-free -disable-llvm-verifier -discard-value-names -main-file-name nbody_CPU_SOA.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros -mreassociate -freciprocal-math -fno-trapping-math -ffp-contract=fast -ffast-math -ffinite-math-only -no-integrated-as -fuse-init-array -mlink-cuda-bitcode /opt/cuda/nvvm/libdevice/<wbr>libdevice.10.bc -target-feature +ptx60 -target-cpu sm_35 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /home/steven/.apps/llvm-trunk/<wbr>lib/clang/7.0.0 -dependency-file nbody_CPU_SOA.d -MT nbody_CPU_SOA.o -idirafter /usr/lib/gcc/x86_64-pc-linux-<wbr>gnu/7.3.1/include -D _GNU_SOURCE -D LIBTIME_STATIC -D USE_OPENMP -D HAVE_SIMD -D USE_LIBC11 -I ../subprojects/c11/include -I ../subprojects/time/include -I/opt/intel/composerxe/linux/<wbr>ipp/include -I/opt/intel/composerxe/linux/<wbr>mkl/include -internal-isystem /usr/local/include -internal-isystem /home/steven/.apps/llvm-trunk/<wbr>lib/clang/7.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /usr/local/include -internal-isystem /home/steven/.apps/llvm-trunk/<wbr>lib/clang/7.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-prototypes -Wno-declaration-after-<wbr>statement -Wno-long-long -Wno-unknown-pragmas -Wold-style-definition -Wstrict-prototypes -std=gnu99 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/steven/Development/<wbr>nbody/src -ferror-limit 19 -fmessage-length 190 -fopenmp -pthread -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/nbody_CPU_SOA-bcc597.s -x c nbody_CPU_SOA.c -fopenmp-is-device -fopenmp-host-ir-file-path /tmp/nbody_CPU_SOA-eb1725.bc </div><div>1.      <eof> parser at end of file</div><div>2.      Per-module optimization passes</div><div>3.      Running pass 'Called Value Propagation' on module 'nbody_CPU_SOA.c'.</div><div>clang-6.0: error: unable to execute command: Segmentation fault (core dumped)</div></div><div><br></div><div>If someone wants to repro this, you can build my version of n-body from here (branch "clang-openmp-offload-testing"<wbr>):</div><div><br></div><div><a href="https://github.com/tycho/">https://github.com/tycho/</a><wbr>nbody/tree/clang-openmp-<wbr>offload-testing<br></div><div><br></div><div>I'm building with:</div><div><br></div><div>$ make V=1 CC="clang -fopenmp=libomp -fopenmp-targets=nvptx64-<wbr>nvidia-cuda -v"</div><div><br></div><div>- Steven</div></div><br><div>[1] <a href="https://git.uplinklabs.net/steven/projects/llvm/clang.git/log/?h=release_60">https://git.uplinklabs.net/steven/projects/llvm/clang.git/log/?h=release_60</a></div></div>