[Openmp-dev] iomp.h vs omp.h

Jack Howarth howarth.mailing.lists at gmail.com
Sat May 30 12:11:07 PDT 2015


Jonathan,
     Your proposed name_change_v2.patch change fails to install the
symlinks due to the omission of an essential escaping back-slash
before the $ENV. The following change to the patch eliminates the
problem and allows the symlinks to be correctly installed.
              Jack

--- llvm37-libomp.patch.orig 2015-05-30 12:38:05.000000000 -0400
+++ llvm37-libomp.patch 2015-05-30 14:45:10.000000000 -0400
@@ -717,7 +717,7 @@
 +    set(LIBOMP_ALIASES "libgomp;libiomp5")
 +    foreach(alias IN LISTS LIBOMP_ALIASES)
 +        install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\"
-E create_symlink \"${lib_file}\" \"${alias}${dll}\"
-+            WORKING_DIRECTORY
$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
++            WORKING_DIRECTORY
\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
 +    endforeach()
  endif()
  install(

On Fri, May 29, 2015 at 5:02 PM, Peyton, Jonathan L
<jonathan.l.peyton at intel.com> wrote:
> Here is a patch which takes care of all the libiomp name references concerning CMake builds.
>
> 1) It gets rid of any reference to libiomp and the evil letter 'i' in the CMake files.
> 2) Creates new file libomp.rc.var which is a copy of libiomp.rc.var (Windows only), I will delete libiomp.rc.var when I modify the Makefile system.
> 3) Creates libomp.so/libomp.dylib/libomp.dll
> 4) When installing, creates libgomp.so symlink to libomp.so and libiomp5.so symlink to libomp.so (similar for mac). On Windows, it creates copies of the file since symlinks don't exist on Windows.
> 5) Gets rid of references to iomp.h and iomp_lib.h which aren't needed by the LLVM OpenMP Library.  Again, I'm not deleting them until the Makefile system has been changed.
>
> I put in the libgomp.so symlink because libomp.so supports the GNU OpenMP Library interfaces (at both link and run time).  If we want this gone, that's fine.
>
> Please try it out and leave comments/feedback.
>
> -- Johnny
>
> -----Original Message-----
> From: openmp-dev-bounces at cs.uiuc.edu [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of Peyton, Jonathan L
> Sent: Friday, May 29, 2015 2:19 PM
> To: Jack Howarth; openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: Re: [Openmp-dev] iomp.h vs omp.h
>
> Here is what I have so far for the name change patch.  It is successfully creating symlinks at install time and has renamed most of the libiomp stuff to libomp.
>
> Concerning iomp.h, this header was first created to allow libgomp users to include Intel-specific features in their code while they used libgomp's omp.h file.  This way users could just add #include "iomp.h" to use exported kmp[c]_ functions.  It is not needed for the LLVM project.
>
> -- Johnny
>
> -----Original Message-----
> From: Jack Howarth [mailto:howarth.mailing.lists at gmail.com]
> Sent: Friday, May 29, 2015 1:46 PM
> To: Peyton, Jonathan L; openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: iomp.h vs omp.h
>
> Jonathan,
>       I have been taking a stab at renaming libiomp5 to libomp locally and am puzzled by a header name conflict. Currently we have...
>
> runtime/src/include/30/iomp.h.var
> runtime/src/include/30/omp.h.var
> runtime/src/include/30/iomp_lib.h.var
> runtime/src/include/30/omp_lib.h.var
> runtime/src/include/40/iomp.h.var
> runtime/src/include/40/omp.h.var
> runtime/src/include/40/iomp_lib.h.var
> runtime/src/include/40/omp_lib.h.var
> runtime/src/include/41/iomp.h.var
> runtime/src/include/41/omp.h.var
> runtime/src/include/41/iomp_lib.h.var
> runtime/src/include/41/omp_lib.h.var
>
> which will produce filename conflicts when eliminating the usage of iomp. What is the purpose of the headers prefixed with 'i'? Is this some legacy cruft from clang-omp which can be dropped as I don't seen any actual usage of the prefixed headers.
>             Jack




More information about the Openmp-dev mailing list