<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks for your responses, Jonas and Jeff!<br>
<br>
So I guess it will be worth it to monitor IBM and LLNL with their work on the clang-ykt / clang-coral repos.<br>
<br>
Considering the upstream branch, what do you mean by "not fully supported"? Are there GPU offloading constructs that are supported? Further, when do you expect the full GPU support according to the OpenMP4.x standard to be working? Is it planned for version
 6 maybe?<br>
<br>
Cheers,<br>
Jan<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Jeff Hammond <jeff.science@gmail.com><br>
<b>Sent:</b> 18 December 2017 15:44:22<br>
<b>To:</b> Jonas Hahnfeld<br>
<b>Cc:</b> Eichstaedt, Jan R; openmp-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [Openmp-dev] offloading to Nvidia GPUs</font>
<div> </div>
</div>
<div dir="auto">According to LLNL RAJA team (<a href="https://github.com/LLNL/RAJA/issues/372#issuecomment-351795449">https://github.com/LLNL/RAJA/issues/372#issuecomment-351795449</a>), clang-ykt repo is stale and IBM progressing code in private repo for DOE/LLNL.
<div><br>
</div>
<div>I have no idea when IBM will release latest GPU support but am optimistic that it will happen eventually. I can imagine that they’re focused on contract deliverables and don’t want to be distracted by other issues.</div>
<div><br>
</div>
<div>Jeff<br>
<br>
<div id="x_AppleMailSignature">Sent from my iPhone</div>
<div><br>
On Dec 18, 2017, at 7:33 AM, Jonas Hahnfeld via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org">openmp-dev@lists.llvm.org</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div><span>Hi,</span><br>
<span></span><br>
<span>the answer is the same as in October: (upstream) Clang 5 doesn't fully support offloading to GPUs. Trunk's support has progressed since then but AFAIK still isn't able to link applications at the moment.</span><br>
<span></span><br>
<span>Regards,</span><br>
<span>Jonas</span><br>
<span></span><br>
<span>Am 2017-12-18 16:11, schrieb Eichstaedt, Jan R via Openmp-dev:</span><br>
<blockquote type="cite"><span>Hello,</span><br>
</blockquote>
<blockquote type="cite"><span>in addition to my previous mail:</span><br>
</blockquote>
<blockquote type="cite"><span>I saw in this year's October archive, that Gabriele Jost has been</span><br>
</blockquote>
<blockquote type="cite"><span>running into similar issue. Do you know if and how it has been</span><br>
</blockquote>
<blockquote type="cite"><span>resolved for him?</span><br>
</blockquote>
<blockquote type="cite"><span>Further, I tried out the clang-ykt git repo, and compiled in the same</span><br>
</blockquote>
<blockquote type="cite"><span>fashion as I did with v5, which worked fine for some small test-cases.</span><br>
</blockquote>
<blockquote type="cite"><span>This is why I am still quite surprised I ran into the mentioned</span><br>
</blockquote>
<blockquote type="cite"><span>compile issue with v5. That said, I assume you merged the clang-ykt</span><br>
</blockquote>
<blockquote type="cite"><span>branch into the v5 branch?</span><br>
</blockquote>
<blockquote type="cite"><span>The problem with the clang-ykt branch for me however is, that I run</span><br>
</blockquote>
<blockquote type="cite"><span>into some mysterious linking errors when compiling our major</span><br>
</blockquote>
<blockquote type="cite"><span>framework.</span><br>
</blockquote>
<blockquote type="cite"><span>Would you be able to kindly shed some light on this issue?</span><br>
</blockquote>
<blockquote type="cite"><span>Thanks and kind regards,</span><br>
</blockquote>
<blockquote type="cite"><span>Jan</span><br>
</blockquote>
<blockquote type="cite"><span>-------------------------</span><br>
</blockquote>
<blockquote type="cite"><span>FROM: Eichstaedt, Jan R</span><br>
</blockquote>
<blockquote type="cite"><span>SENT: 14 December 2017 11:39:00</span><br>
</blockquote>
<blockquote type="cite"><span>TO: Gheorghe-Teod Bercea</span><br>
</blockquote>
<blockquote type="cite"><span>CC: via Openmp-dev</span><br>
</blockquote>
<blockquote type="cite"><span>SUBJECT: Re: [Openmp-dev] offloading to Nvidia GPUs</span><br>
</blockquote>
<blockquote type="cite"><span>Hello,</span><br>
</blockquote>
<blockquote type="cite"><span>both your suggestions of adding the compile flags</span><br>
</blockquote>
<blockquote type="cite"><span>   -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_35</span><br>
</blockquote>
<blockquote type="cite"><span>   -Xopenmp-target -march=sm_35</span><br>
</blockquote>
<blockquote type="cite"><span>still give me exactly the same error message.</span><br>
</blockquote>
<blockquote type="cite"><span>Do you have any other suggestions?</span><br>
</blockquote>
<blockquote type="cite"><span>Cheers,</span><br>
</blockquote>
<blockquote type="cite"><span>Jan</span><br>
</blockquote>
<blockquote type="cite"><span>-------------------------</span><br>
</blockquote>
<blockquote type="cite"><span>FROM: Gheorghe-Teod Bercea <<a href="mailto:Gheorghe-Teod.Bercea@ibm.com">Gheorghe-Teod.Bercea@ibm.com</a>></span><br>
</blockquote>
<blockquote type="cite"><span>SENT: 13 December 2017 18:30:00</span><br>
</blockquote>
<blockquote type="cite"><span>TO: Eichstaedt, Jan R</span><br>
</blockquote>
<blockquote type="cite"><span>CC: via Openmp-dev</span><br>
</blockquote>
<blockquote type="cite"><span>SUBJECT: Re: [Openmp-dev] offloading to Nvidia GPUs</span><br>
</blockquote>
<blockquote type="cite"><span>Hi,</span><br>
</blockquote>
<blockquote type="cite"><span>Yes there is:</span><br>
</blockquote>
<blockquote type="cite"><span>-Xopenmp-target=nvptx64-nvidia-cuda -march=sm_35</span><br>
</blockquote>
<blockquote type="cite"><span>You may also run into the problem that target offloading is not yet</span><br>
</blockquote>
<blockquote type="cite"><span>fully supported.</span><br>
</blockquote>
<blockquote type="cite"><span>Hope this helps!</span><br>
</blockquote>
<blockquote type="cite"><span>Thanks,</span><br>
</blockquote>
<blockquote type="cite"><span>--Doru</span><br>
</blockquote>
<blockquote type="cite"><span>From:        "Eichstaedt, Jan R via Openmp-dev"</span><br>
</blockquote>
<blockquote type="cite"><span><<a href="mailto:openmp-dev@lists.llvm.org">openmp-dev@lists.llvm.org</a>></span><br>
</blockquote>
<blockquote type="cite"><span>To:        via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org">openmp-dev@lists.llvm.org</a>></span><br>
</blockquote>
<blockquote type="cite"><span>Date:        12/13/2017 01:11 PM</span><br>
</blockquote>
<blockquote type="cite"><span>Subject:        [Openmp-dev] offloading to Nvidia GPUs</span><br>
</blockquote>
<blockquote type="cite"><span>Sent by:        "Openmp-dev" <<a href="mailto:openmp-dev-bounces@lists.llvm.org">openmp-dev-bounces@lists.llvm.org</a>></span><br>
</blockquote>
<blockquote type="cite"><span>-------------------------</span><br>
</blockquote>
<blockquote type="cite"><span>Hello,</span><br>
</blockquote>
<blockquote type="cite"><span>I am using llvm and clang version 5.0.0 together with the openmp</span><br>
</blockquote>
<blockquote type="cite"><span>project of that version on Ubuntu 16.04.</span><br>
</blockquote>
<blockquote type="cite"><span>I try to compile a simple program involving a _#pragma omp target</span><br>
</blockquote>
<blockquote type="cite"><span>teams distribute parallel for _statement to offload to a Nvidia-GPU</span><br>
</blockquote>
<blockquote type="cite"><span>using the following flags:</span><br>
</blockquote>
<blockquote type="cite"><span>-fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda</span><br>
</blockquote>
<blockquote type="cite"><span>--cuda-path=/usr/local/cuda/ --cuda-gpu-arch=sm_35</span><br>
</blockquote>
<blockquote type="cite"><span>However, the compilation fails, with the following being the first</span><br>
</blockquote>
<blockquote type="cite"><span>assertion that is triggered:</span><br>
</blockquote>
<blockquote type="cite"><span>clang++:</span><br>
</blockquote>
<blockquote type="cite"><span>[...]/llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Cuda.cpp:346:</span><br>
</blockquote>
<blockquote type="cite"><span>virtual void</span><br>
</blockquote>
<blockquote type="cite"><span>clang::driver::toolchains::CudaToolChain::addClangTargetOptions(const</span><br>
</blockquote>
<blockquote type="cite"><span>llvm::opt::ArgList&, llvm::opt::ArgStringList&,</span><br>
</blockquote>
<blockquote type="cite"><span>clang::driver::Action::OffloadKind) const: Assertion `!GpuArch.empty()</span><br>
</blockquote>
<blockquote type="cite"><span>&& "Must have an explicit GPU arch."' failed.</span><br>
</blockquote>
<blockquote type="cite"><span>Is there a way to pass the GPU architecture differently? Or is target</span><br>
</blockquote>
<blockquote type="cite"><span>offloading not fully supported in v5.0.0 yet and I might better use</span><br>
</blockquote>
<blockquote type="cite"><span>the clang-ykt project? Or have I overlooked something else completely?</span><br>
</blockquote>
<blockquote type="cite"><span>Thanks for any help you can offer.</span><br>
</blockquote>
<blockquote type="cite"><span>Cheers,</span><br>
</blockquote>
<blockquote type="cite"><span>Jan</span><br>
</blockquote>
<blockquote type="cite"><span>_______________________________________________</span><br>
</blockquote>
<blockquote type="cite"><span>Openmp-dev mailing list</span><br>
</blockquote>
<blockquote type="cite"><span><a href="mailto:Openmp-dev@lists.llvm.org">Openmp-dev@lists.llvm.org</a></span><br>
</blockquote>
<blockquote type="cite"><span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_openmp-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=07Vg8AAyMqlmXvuNhmkojcovioZRarJr9xyWnOr5Klg&m=ZwzC4OwLWlGCMnZozDnqy7VceScVkrvWJ4YIlJh1A6I&s=sxzmJ6FJfccsITZA4_0WsCFXFBLsJaLSKg_arZkOl64&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_openmp-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=07Vg8AAyMqlmXvuNhmkojcovioZRarJr9xyWnOr5Klg&m=ZwzC4OwLWlGCMnZozDnqy7VceScVkrvWJ4YIlJh1A6I&s=sxzmJ6FJfccsITZA4_0WsCFXFBLsJaLSKg_arZkOl64&e=</a></span><br>
</blockquote>
<blockquote type="cite"><span>[1]</span><br>
</blockquote>
<blockquote type="cite"><span>Links:</span><br>
</blockquote>
<blockquote type="cite"><span>------</span><br>
</blockquote>
<blockquote type="cite"><span>[1]</span><br>
</blockquote>
<blockquote type="cite"><span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_openmp-2Ddev&amp;d=DwIGaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=07Vg8AAyMqlmXvuNhmkojcovioZRarJr9xyWnOr5Klg&amp;m=ZwzC4OwLWlGCMnZozDnqy7VceScVkrvWJ4YIlJh1A6I&amp;s=sxzmJ6FJfccsITZA4_0WsCFXFBLsJaLSKg_arZkOl64&amp;e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_openmp-2Ddev&amp;d=DwIGaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=07Vg8AAyMqlmXvuNhmkojcovioZRarJr9xyWnOr5Klg&amp;m=ZwzC4OwLWlGCMnZozDnqy7VceScVkrvWJ4YIlJh1A6I&amp;s=sxzmJ6FJfccsITZA4_0WsCFXFBLsJaLSKg_arZkOl64&amp;e=</a></span><br>
</blockquote>
<blockquote type="cite"><span>_______________________________________________</span><br>
</blockquote>
<blockquote type="cite"><span>Openmp-dev mailing list</span><br>
</blockquote>
<blockquote type="cite"><span><a href="mailto:Openmp-dev@lists.llvm.org">Openmp-dev@lists.llvm.org</a></span><br>
</blockquote>
<blockquote type="cite"><span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a></span><br>
</blockquote>
<span>_______________________________________________</span><br>
<span>Openmp-dev mailing list</span><br>
<span><a href="mailto:Openmp-dev@lists.llvm.org">Openmp-dev@lists.llvm.org</a></span><br>
<span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a></span><br>
</div>
</blockquote>
</div>
</div>
</body>
</html>