All Projects → brakmic → HPX_Projects

brakmic / HPX_Projects

Licence: MIT license
⚡ High-Performance-Computing with C++

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to HPX Projects

Scelta
(experimental) Syntactic sugar for variant and optional types.
Stars: ✭ 134 (+793.33%)
Mutual labels:  boost
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (+1226.67%)
Mutual labels:  boost
Avhttp
avhttp is concurrent http downloader
Stars: ✭ 232 (+1446.67%)
Mutual labels:  boost
Boost Asio Study
Examples and toturials for C++ Boost Asio library.
Stars: ✭ 144 (+860%)
Mutual labels:  boost
Trade Frame
c++ based application for testing options based automated trading ideas using DTN IQ real time data feed and Interactive Brokers (TWS API) for trade execution.
Stars: ✭ 187 (+1146.67%)
Mutual labels:  boost
Construct
This is The Construct
Stars: ✭ 218 (+1353.33%)
Mutual labels:  boost
Setup
Setup a new machine without sudo!
Stars: ✭ 130 (+766.67%)
Mutual labels:  boost
boost-reflection
This library provides Java-like Reflection API to C++ language.
Stars: ✭ 16 (+6.67%)
Mutual labels:  boost
Asio samples
Examples (code samples) describing the construction of active objects on the top of Boost.Asio. A code-based guide for client/server creation with usage of active object pattern by means of Boost C++ Libraries.
Stars: ✭ 191 (+1173.33%)
Mutual labels:  boost
Autobahn Cpp
WAMP for C++ in Boost/Asio
Stars: ✭ 231 (+1440%)
Mutual labels:  boost
Httpp
Micro http server and client written in C++
Stars: ✭ 144 (+860%)
Mutual labels:  boost
Webcc
Lightweight C++ HTTP client and server library based on Asio for embedding purpose.
Stars: ✭ 167 (+1013.33%)
Mutual labels:  boost
Apple Boost Buildscript
Script for building Boost for Apple platforms (iOS, iOS Simulator, tvOS, tvOS Simulator, OS X)
Stars: ✭ 217 (+1346.67%)
Mutual labels:  boost
Anytime
Anything to POSIXct or Date Converter
Stars: ✭ 137 (+813.33%)
Mutual labels:  boost
Histogram
Fast multi-dimensional generalized histogram with convenient interface for C++14
Stars: ✭ 243 (+1520%)
Mutual labels:  boost
Uchain Fullnode
UChain Cross-Platform C++ Full-Node Wallet Implementation
Stars: ✭ 133 (+786.67%)
Mutual labels:  boost
Json
A C++11 or library for parsing and serializing JSON to and from a DOM container in memory.
Stars: ✭ 205 (+1266.67%)
Mutual labels:  boost
developkit set
2021年最新总结,值得推荐的c/c++开源框架与库。持续更新中。
Stars: ✭ 654 (+4260%)
Mutual labels:  boost
Stacktrace
C++ library for storing and printing backtraces.
Stars: ✭ 250 (+1566.67%)
Mutual labels:  boost
Beasthttp
Provides helper tools for creating RESTful services using Boost.Beast
Stars: ✭ 227 (+1413.33%)
Mutual labels:  boost

HPX Projects

This is a collection of small demos showing different functionalities from HPX.

All parts are based on Visual C++ under VS 2015.

HPX version: 0.9.11

BOOST version: 1.60

HWLOC version: 1.11.0

The configuration procedure of HPX with Visual Studio is rather complex and can quickly lead to very confusing errors.

Therefore I'd recommend to use my small tutorial on building HPX under Windows.

For a more detailed explanation and examples you can read my article on HPX.

Configuration

To make the configuration of Project-Options easier I've extracted some default properties into a separate prop file.

I'm using the following system-variables to access Boost, HwLoc and HPX libraries:


BOOST_ROOT = C:\lib\boost
HWLOC_ROOT = C:\bin\hwloc
HPX_ROOT   = C:\bin\hpx

In my PATH there are some additional entries pointing at subdirectories inside the above roots:


%BOOST_ROOT%\lib
%HPX_ROOT%\bin

This is, of course, not mandatory and you can create your own paths. What's important is that you have the libs installed and accessible under some system-wide variables.

Visual Studio Project Properties

After having compiled and installed the libraries (boost, hpx & hwloc) you have to insert certain library and include paths. These settings will look like in the screenshot below. There's a separate properties-file with several defaults available so you can more easily adapt the project to your environment. The most important part will be the different library ROOTs.

Compilation

The compilation is straightforward. Just use the standard Debug/Release facilities.

Execution

Currently, the whole execution logic is packed into a single ugly source file. At least the participating objects and functions are defined over several cpp and hpp files. But soon I'll provide a better structure. The main focus will be on actions and components. This project already contains a few actions and a component implementing some (a)synchronous methods. There's also a separate DLL-Project available that defines another HPX-Component (SmallServer.dll) to be used in this demo. The output is console-based and currently looks like this:

The program's main is located in HpxTest_1.cpp which contains a special hpx_main function where HPX kicks in. To make the app aware of this additional main function we have to execute another HPX-function called hpx::init. Of course, this is not the only way to start an HPX app. There are several possibilities for different use-cases.

In our case the hpx::main contains a bunch of calls to other functions which utilize different functionalities from HPX.

  • Applying (a)synchronous actions.

In HPX actions are like wrappers that map to real functions. And it doesn't matter if they're available locally or on some other machine. In fact, HPX maintans its own registry for managing actions and components so you don't have to fiddle around with memory addressing. Instead, HPX assigns a globally unique id to a thing. Only this Id is needed to localize a thing. Also, HPX can move things around the global memory. For example, when there's no sufficient memory on a certain machine HPX can take some components and move them to other machine within the cluster. HPX does this by using parcels which are basically serialized functions and/or components. HPX also extends the standard C++ syntax for asynchronous function calling.

  • Continuations demo.

A continuation allows us to chain several functions together and forward their results down the chain.

  • Error handling in HPX

Asynchronous functions throw asynchronous errors. And in highly parallel systems errors are really hard to handle. But HPX keeps the complexity away by providing nice facilities for location-agnostic error handling.

  • Components

HPX supports remotely manageable components. In this demo part we initialize a component and call it's (a)synchronous methods to manipulate a number.

  • Components from DLLs

HPX also supports loading components from DLLs. In this example we have a SmallServer.dll that lives in a project of the same name.

Our client app HpxTest_1.exe should be able to load and execute exported methods from SmallServer.dll. This is done the standard way via #include "smallserver.h" where the needed function declarations & component exports are located. It's important to know that in this file no function definitions should be located. Any function definition in this header file will ultimately lead to weird dllimport errors. Put your function definitions into SmallServer.cpp. The import library file SmallServer.lib is located in the Output directory: x64/Debug respective x64/Release. HpxTest_1.exe needs this file for mapping to SmallServer-exports.

If you'd prefer some other location take care of properly setting the import-library paths in Project Settings.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].