Skip to content
  1. Feb 04, 2016
    • Jonathan Peyton's avatar
      Add LIBOMP_ENABLE_SHARED option for CMake · fd74f900
      Jonathan Peyton authored
      When building executables for Cray supercomputers, statically-linked executables
      are preferred. This patch makes it possible to build the OpenMP runtime as an
      archive for building statically-linked executables.  The patch adds the flag
      LIBOMP_ENABLE_SHARED, which defaults to true. When true, a build of the OpenMP
      runtime yields dynamic libraries. When false, a build of the OpenMP runtime
      yields static libraries. There is no setting that allows both kinds of libraries
      to be built.
      
      Patch by John Mellor-Crummey
      
      Differential Revision: http://reviews.llvm.org/D16525
      
      llvm-svn: 259817
      fd74f900
  2. Jan 26, 2016
  3. Nov 30, 2015
    • Jonathan Peyton's avatar
      Adding Hwloc library option for affinity mechanism · 01dcf36b
      Jonathan Peyton authored
      These changes allow libhwloc to be used as the topology discovery/affinity
      mechanism for libomp.  It is supported on Unices. The code additions:
      * Canonicalize KMP_CPU_* interface macros so bitmask operations are
        implementation independent and work with both hwloc bitmaps and libomp
        bitmaps.  So there are new KMP_CPU_ALLOC_* and KMP_CPU_ITERATE() macros and
        the like. These are all in kmp.h and appropriately placed.
      * Hwloc topology discovery code in kmp_affinity.cpp. This uses the hwloc
        interface to create a libomp address2os object which the rest of libomp knows
        how to handle already.
      * To build, use -DLIBOMP_USE_HWLOC=on and
        -DLIBOMP_HWLOC_INSTALL_DIR=/path/to/install/dir [default /usr/local]. If CMake
        can't find the library or hwloc.h, then it will tell you and exit.
      
      Differential Revision: http://reviews.llvm.org/D13991
      
      llvm-svn: 254320
      01dcf36b
  4. Sep 24, 2015
  5. Sep 21, 2015
    • Jonathan Peyton's avatar
      OpenMP Initial testsuite change to purely llvm-lit based testing · 614c7ef8
      Jonathan Peyton authored
      This change introduces a check-libomp target which is based upon llvm's lit
      test infrastructure. Each test (generated from the University of Houston's
      OpenMP testsuite) is compiled and then run. For each test, an exit status of 0
      indicates success and non-zero indicates failure. This way, FileCheck is not
      needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp)
      in the build tree so that gcc can be tested as well.  When building out-of-
      tree builds, the user will have to provide llvm-lit either by specifying
      -DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH.
      
      Differential Revision: http://reviews.llvm.org/D11821
      
      llvm-svn: 248211
      614c7ef8
  6. Aug 31, 2015
  7. Aug 28, 2015
    • Jonathan Peyton's avatar
      [OpenMP] [CMake] Removing expand-vars.pl in favor of CMake's configure_file() · c0225ca2
      Jonathan Peyton authored
      Currently, the libomp CMake build system uses a Perl script to configure files
      (tools/expand-vars.pl). This patch replaces the use of the Perl script by using
      CMake's configure_file() function. The major changes include:
      1. *.var has every $KMP_* variable changed to @LIBOMP_*@
      2. kmp_config.h.cmake is a new file which contains all the feature macros and
         #cmakedefine lines
      3. Most of the -D lines have been moved from LibompDefinitions.cmake but some
         OS specific MACROs (e.g., _GNU_SOURCE) remain.
      4. All expand-vars.pl related logic is removed from the CMake files.
      
      One important note about this change is that it breaks the old Perl+Makefile
      build system because it can't create kmp_config.h properly.
      
      Differential Review: http://reviews.llvm.org/D12211
      
      llvm-svn: 246314
      c0225ca2
  8. Aug 11, 2015
    • Jonathan Peyton's avatar
      Tidy statistics collection · 45be4500
      Jonathan Peyton authored
      This removes some statistics counters and timers which were not used,
      adds new counters and timers for some language features that were not
      monitored previously and separates the counters and timers into those
      which are of interest for investigating user code and those which are
      only of interest to the developer of the runtime itself.
      The runtime developer statistics are now ony collected if the
      additional #define KMP_DEVELOPER_STATS is set.
      
      Additional user statistics which are now collected include:
      * Count of nested parallelism (omp parallel inside a parallel region)
      * Count of omp distribute occurrences
      * Count of omp teams occurrences
      * Counts of task related statistics (taskyield, task execution, task
        cancellation, task steal)
      * Values passed to omp_set_numtheads
      * Time spent in omp single and omp master
      
      None of this affects code compiled without stats gathering enabled,
      which is the normal library build mode.
      
      This also fixes the CMake build by linking to the standard c++ library
      when building the stats library as it is a requirement.  The normal library
      does not have this requirement and its link phase is left alone.
      
      Differential Revision: http://reviews.llvm.org/D11759
      
      llvm-svn: 244677
      45be4500
  9. Jul 15, 2015
    • Jonathan Peyton's avatar
      Re-indent the CMake refactor to two-space indention · 5b4acbd6
      Jonathan Peyton authored
      I apologize for this nasty commit, but I somehow overlooked Chandler's
      comment to re-indent these files to two space indention.  I know this
      is a horrible commit, but I figured if it was done quickly after the 
      first one, not too many conflicts would arise.
      
      Again, I'm sorry and won't do this again.
      
      llvm-svn: 242301
      5b4acbd6
    • Jonathan Peyton's avatar
      Large Refactor of CMake build system · 2e013352
      Jonathan Peyton authored
      This commit improves numerous functionalities of the OpenMP CMake build 
      system to be more conducive with LLVM's build system and build philosophies.
      The CMake build system, as it was before this commit, was not up to LLVM's 
      standards and did not implement the configuration stage like most CMake based
      build systems offer (check for compiler flags, libraries, etc.) In order to
      improve it dramatically in a short period of time, a large refactoring had 
      to be done.
      The main changes done with this commit are as follows:
      
      * Compiler flag checks - The flags are no longer grabbed from compiler specific
        directories.  They are checked for availability in config-ix.cmake and added
        accordingly inside LibompHandleFlags.cmake.
      * Feature checks were added in config-ix.cmake.  For example, the standard CMake
        module FindThreads is probed for the threading model to use inside the OpenMP
        library.
      * OS detection - There is no longer a LIBOMP_OS variable, OS-specifc build logic
        is wrapped around the WIN32 and APPLE macros with !(WIN32 OR APPLE) meaning 
        a Unix flavor of some sort.
      * Got rid of vestigial functions/macros/variables
      * Added new libomp_append() function which is used everywhere to conditionally
        or undconditionally append to a list
      * All targets have the libomp prefix so as not to interfere with any other
        project
      * LibompCheckLinkerFlag.cmake module was added which checks for linker flags
        specifically for building shared libraries.
      * LibompCheckFortranFlag.cmake module was added which checks for fortran flag
        availability.
      * Removed most of the cruft from the translation between the perl+Makefile based
        build system and this one.  The remaining components that they share are
        perl scripts which I'm in the process of removing.
      
      There is still more left to do.  The perl scripts still need to be removed, and
      a config.h.in file (or similarly named) needs to be added with #cmakedefine lines
      in it.  But this is a much better first step than the previous system.
      
      Differential Revision: http://reviews.llvm.org/D10656
      
      llvm-svn: 242298
      2e013352
  10. Jun 11, 2015
    • Jonathan Peyton's avatar
      Implement recursive CMake. · 5215890c
      Jonathan Peyton authored
      Most CMake build systems put CMakeLists.txt files inside source directories where 
      items need to get built. This change follows that convention by adding a new 
      runtime/src/CMakeLists.txt file. An additional benefit is this helps logically 
      seperate configuring with building as well. This change is mostly just copying and 
      pasting the bottom half of runtime/CMakeLists.txt into runtime/src/CMakeLists.txt, 
      but a few changes had to be made to get it to work. Most of those changes were to 
      directory prefixes.
      
      Differential Revision: http://reviews.llvm.org/D10344
      
      llvm-svn: 239542
      5215890c
  11. May 18, 2015
  12. Jan 13, 2015
  13. Aug 07, 2014
  14. Jun 02, 2014
  15. Jun 01, 2014
    • Alp Toker's avatar
      Add initial CMake build system · 7198f529
      Alp Toker authored
      This is not yet supported for production builds but can already produce working
      binaries on OS X and Linux with clang and gcc.
      
      The intention is to improve support to the point where it can integrate with
      the LLVM runtime platform, cover all platforms, runtime/release build
      configurations and run the tests.
      
      Patch by Jack Howarth!
      
      llvm-svn: 209994
      7198f529
Loading