Giter Site home page Giter Site logo

hpxmp_meta's Introduction

HPXMP Meta

This project contains tests, examples and useful scripts for compiling and using HPXMP, the HPX-enabled OpenMP implementation.

Building HPXMP

HPXMP is a modified version of llvm-project/openmp, which utilizes the HPXC interface to run on top of the HPX runtime.

Thus HPX, HPXC and llvm-project/openmp must be built using CMake (in that order, as each depends on the previous one).

The scripts/ directory contains scripts which can be used directly (or referenced for the appropriate CMake configuration commands) for building all above libraries.

Using HPXMP

As HPXMP is a modification of the llvm-project/openmp library, HPXMP builds a library named libomp.so, which is a drop-in replacement for any typical libomp.so/libgomp.so OpenMP library provided by your system.

Important: Since pretty much all systems provide a libomp.so, it is easy to accidentally link to some other one. The only ways to make sure that the correct library is linked are 1) Prepending(!) HPXMP's libomp.so path to LD_LIBRARY_PATH, or 2) Adding HPXMP's libomp.so to LD_PRELOAD.

Please always check that the correct OpenMP shared library is linked to your program by using the ldd utility (or some equivalent).

There are two ways to link your program to the HPXMP library:

  1. For programs built with CMake:

    1. Include the CMake Find Module for HPXMP (located in cmake/FindHPXMP.cmake) in your CMake project, and use find_package(HPXMP) to introduce the HPXMP::hpxmp target to your project. Then, link your program to the HPXMP::hpxmp target using target_add_libraries(<my_program> HPX::hpxmp).
  2. Manually:

    1. Link the HPXMP shared library (libomp.so) to your program.

    2. Link to HPXC's libhpx_hpxc_wrap.a and add the -Wl,-wrap=main linker flag when compiling your program. This will initialize HPXC/HPX before entering your program's main function. This is crucial as HPXMP functionality only works inside the context of the HPX runtime. Failing to do this properly will lead to exceptions/segfaults.

hpxmp_meta's People

Contributors

pansysk75 avatar rtohid avatar isidorostsa avatar light2802 avatar

Watchers

Hartmut Kaiser avatar  avatar  avatar  avatar

hpxmp_meta's Issues

Requires adding hpx/hpx_main.hpp

All the examples require adding the hpx_main.hpp file to launch hpx threads. This should be taken care of by the hpmp library itself. Doing so will help to abstract hpx from the user code.

Also current build scripts don't use the newly built omp.h and instead use the system installed one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.