{"id":19044597,"url":"https://github.com/brakmic/hpx_projects","last_synced_at":"2025-04-23T23:28:28.388Z","repository":{"id":83787175,"uuid":"52178390","full_name":"brakmic/HPX_Projects","owner":"brakmic","description":":zap: High-Performance-Computing with C++","archived":false,"fork":false,"pushed_at":"2016-02-21T21:39:33.000Z","size":40349,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T08:39:31.531Z","etag":null,"topics":["boost","c-plus-plus","cplusplus","cpp","hpx"],"latest_commit_sha":null,"homepage":"http://blog.brakmic.com/high-performance-computing-with-hpx/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brakmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-20T22:18:35.000Z","updated_at":"2021-03-03T09:32:21.000Z","dependencies_parsed_at":"2023-05-06T02:40:22.932Z","dependency_job_id":null,"html_url":"https://github.com/brakmic/HPX_Projects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Projects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Projects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Projects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2FHPX_Projects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/HPX_Projects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250531169,"owners_count":21445934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boost","c-plus-plus","cplusplus","cpp","hpx"],"created_at":"2024-11-08T22:46:49.464Z","updated_at":"2025-04-23T23:28:28.363Z","avatar_url":"https://github.com/brakmic.png","language":"C++","readme":"### HPX Projects\n\nThis is a collection of small demos showing different functionalities from \u003ca href=\"http://stellar.cct.lsu.edu/tag/hpx/\"\u003eHPX\u003c/a\u003e. \n\nAll parts are based on Visual C++ under VS 2015. \n\n\u003ca href=\"http://stellar.cct.lsu.edu/downloads/\"\u003eHPX\u003c/a\u003e version: **0.9.11**\n\n\u003ca href=\"http://www.boost.org/users/history/version_1_60_0.html\"\u003eBOOST\u003c/a\u003e version: **1.60**\n\n\u003ca href=\"https://www.open-mpi.org/software/hwloc/v1.11/\"\u003eHWLOC\u003c/a\u003e version: **1.11.0**\n\nThe configuration procedure of HPX with Visual Studio is rather complex and can quickly lead to very confusing errors.\n\nTherefore I'd recommend to use my small tutorial on building \u003ca href=\"https://github.com/brakmic/hpx/blob/b3feb9561fecc1ef4b52717d70332c8148104cdd/docs/tutorial/win32/howto.md\"\u003eHPX under Windows\u003c/a\u003e.\n\nFor a more detailed explanation and examples you can read \u003ca href=\"http://blog.brakmic.com/high-performance-computing-with-hpx/\"\u003emy article on HPX\u003c/a\u003e.\n\n#### Configuration\n\nTo make the configuration of Project-Options easier I've extracted some `default` properties into a separate `prop` file.\n\n\u003cimg src=\"http://fs5.directupload.net/images/160220/slueu7c6.png\" /\u003e\n\nI'm using the following system-variables to access Boost, HwLoc and HPX libraries:\n\n```\n\nBOOST_ROOT = C:\\lib\\boost\nHWLOC_ROOT = C:\\bin\\hwloc\nHPX_ROOT   = C:\\bin\\hpx\n```\n\nIn my `PATH` there are some additional entries pointing at subdirectories inside the above roots:\n\n```\n\n%BOOST_ROOT%\\lib\n%HPX_ROOT%\\bin\n```\n\nThis is, of course, not mandatory and you can create your own paths. What's important is that you have \nthe libs installed and accessible under some system-wide variables.\n\n#### Visual Studio Project Properties\n\nAfter having compiled and installed the libraries (boost, hpx \u0026 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`. \n\n\u003cimg src=\"http://fs5.directupload.net/images/160220/ih3v7et5.png\"/\u003e\n\n#### Compilation\n\nThe compilation is straightforward. Just use the standard **Debug/Release** facilities.\n\n#### Execution\n\nCurrently, 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 \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/applying_actions.html\"\u003eactions\u003c/a\u003e and a \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/components.html\"\u003ecomponent\u003c/a\u003e 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:\n\n\u003cimg src=\"http://fs5.directupload.net/images/160221/otovusdf.png\" /\u003e \n\nThe program's `main` is located in `HpxTest_1.cpp` which contains a special `hpx_main` function\nwhere HPX kicks in. To make the app aware of this additional `main` function we have to\nexecute another HPX-function called `hpx::init`. Of course, this is not the only way to start an \nHPX app. There are \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/applications.html\"\u003eseveral possibilities\u003c/a\u003e for different use-cases.\n\n\u003cimg src=\"http://fs5.directupload.net/images/160221/yccrybig.png\" /\u003e\n\nIn our case the `hpx::main` contains a bunch of calls to other functions which utilize\ndifferent functionalities from HPX.\n\n\u003cimg src=\"http://fs5.directupload.net/images/160221/clw34huh.png\"/\u003e \n\n- Applying **(a)synchronous** `actions`. \n\nIn HPX actions are like wrappers that map to `real functions`.\nAnd it doesn't matter if they're available locally or on some other machine. In fact, HPX maintans its own \n`registry` for managing actions and components so you don't have to fiddle around with memory addressing. Instead,\nHPX assigns a globally unique id to a `thing`. Only this Id is needed to localize a `thing`. Also, HPX can move\n`things` around the global memory. For example, when there's no sufficient memory on a certain machine HPX can take \nsome components and move them to other machine within the cluster. HPX does this by using `parcels` which are basically\n`serialized` functions and/or components. HPX also \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/applying_actions/action_invocation.html\"\u003eextends\u003c/a\u003e the standard C++ syntax for asynchronous function calling.\n\n- **Continuations** demo.  \n\nA \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/applying_actions/action_invocation/apply_continue.html\"\u003econtinuation\u003c/a\u003e allows us to chain several functions together and forward their results down the chain.\n\n- **Error handling** in HPX\n\nAsynchronous functions throw *asynchronous* errors. And in highly parallel systems errors are really hard to handle. But HPX keeps the complexity away by providing\n\u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/applying_actions/action_error_handling.html\"\u003enice facilities\u003c/a\u003e for location-agnostic error handling.\n\n- **Components**\n\nHPX supports \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/components.html\"\u003eremotely manageable\u003c/a\u003e components. In this demo part we initialize a component and call it's (a)synchronous methods to manipulate a number.\n\n- **Components from DLLs**\n\nHPX also \u003ca href=\"http://stellar.cct.lsu.edu/files/hpx-0.9.11/html/hpx/manual/init/configuration/loading_components.html#hpx.manual.init.configuration.loading_components.component_example\"\u003esupports loading components from DLLs\u003c/a\u003e. In this example we have a `SmallServer.dll` that lives in a project of the same name.\n\n\u003cimg src=\"http://fs5.directupload.net/images/160221/y5z2f2n5.png\" /\u003e\n\nOur 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` \u0026 `component exports` are located. It's important to know that in this file **no function definitions** should be located.\nAny 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. \n\n*If you'd prefer some other location take care of properly setting the import-library paths in Project Settings.*\n\n\u003cimg src=\"http://fs5.directupload.net/images/160221/lkzx9t7i.png\" /\u003e\n\n#### License\n\n\u003ca href=\"https://github.com/brakmic/HPX_Projects/blob/master/LICENSE\"\u003eMIT\u003c/a\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fhpx_projects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Fhpx_projects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Fhpx_projects/lists"}