<div dir="ltr"><div dir="ltr"><div>Hi Jeff,</div><div><br></div><div>No matter how good LLVM OpenMP runtime is, libgomp may be intended when I build my app with GNU.</div><div>Intel OpenMP runtime and LLVM runtime can differ in versions. In my case, they are not identical.</div><div>When my app runs, I get tons of omp_nested deprecation warnings from libomp via MKL.</div><div>I avoid seeing the warnings with a real libiomp5 shipped with Intel release.<br></div></div><div dir="ltr"><br></div><div>The potential risk of  "having multiple OpenMP libraries loaded into a single binary" is a bit convincing.</div><div>If I build my app with clang and MKL, having two openMP runtime is clearly bad.</div><div><br></div><div>At the moment, I'd like to having one app built with Intel to use Intel runtime and I don't need to see all the warnings.</div><div>When I work on another app, I just use the llvm OpenMP runtime. Manipulating LD_LIBRARY_PATH or rpath or LD_PRELOAD is anyway painful.</div><div>I think I can live with this. It is better than the frustration seeing code crashing due two conflicting OpenMP runtime libraries.<br></div><div><br></div><div>Sadly, BG/Q is about to disappear and I mostly use dynamically linking for convenience and also a requirement for GPU.</div><div><br></div><div>I don't see a good solution but It seems that the current solution is the less bad one.</div><div><br></div><div>Thank you, Jeff.<br></div><div><br></div><div>Best,<br></div><div dir="ltr"><div>Ye<br></div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">===================<br>
Ye Luo, Ph.D.<br>Computational Science Division & Leadership Computing Facility<br>
Argonne National Laboratory</div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Jeff Hammond <<a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a>> 于2019年5月2日周四 下午10:25写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The LLVM and Intel OpenMP runtimes are essentially identical.<div><br>The LLVM/Intel OpenMP runtime defines the GOMP symbols and works with GCC OpenMP codes, which is actually a good thing, because the GOMP runtime performs worse (<a href="https://www.nextplatform.com/2017/03/15/arm-antes-hpc-software-stack/" target="_blank">https://www.nextplatform.com/2017/03/15/arm-antes-hpc-software-stack/</a>).</div><div><br></div><div>There are a number of solutions to your problem.  One is to control LD_LIBRARY_PATH appropriately.  You can remove LLVM folders from LD_LIBRARY_PATH and use LD_PRELOAD at runtime or -Wl,-rpath when linking to tell your LLVM OpenMP binary where the library is.</div><div><br>The best option, of course, is to link statically.  You are a Blue Gene user so I'm sure you understand the utility of fully static binaries :-)</div><div><br></div><div>Regardless of how you solve this, I object to removing the symlinks.  What is happening because of this is far better than the alternative of having multiple OpenMP libraries loaded into a single binary.  It is a reasonable assumption that if you are setting LLVM OpenMP shared libraries in your global path (LD_LIBRARY_PATH), then you want that library to be used.  If not, link differently.</div><div><br>Jeff</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 2, 2019 at 6:41 PM Ye Luo via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>What is the reason of making both libgomp.so libiomp5.so softlinks to libomp.so?</div><div>I found them hijacking my application built with GNU and Intel compilers when I put llvm library folder on my LD_LIBRARY_PATH. This is very annoying. Unless there is a very good reason, I think they need be removed.<br></div><div>Best,<br></div><div>Ye<br></div><div><div><div dir="ltr" class="gmail-m_-7685891306389585562gmail-m_2692749637579789722gmail_signature"><div dir="ltr"><div><div dir="ltr">===================<br>
Ye Luo, Ph.D.<br>Computational Science Division & Leadership Computing Facility<br>
Argonne National Laboratory</div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Openmp-dev mailing list<br>
<a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-7685891306389585562gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>
</blockquote></div>