Using HPX on Windows

HPX is a C++ Standard Library for Parallelism and Concurrency. Building and using it on Windows just got much less involved. We have now integrated HPX into the VcPkg VC++ Packaging Tool. This tool is design to help you getting C and C++ libraries built and installed on Windows without hassle. It manages all package dependencies for you, such that — once HPX has been built — no additional settings have to be supplied to your build environment.

In order to use this tool for building HPX you need to follow the instructions as outlined on the tool’s repository site. Essentially that involves the following steps:

Required prerequisites:

  • Visual Studio 2015 Update 3 or Visual Studio 2017
  • CMake 3.8.0 or higher (note: downloaded automatically if not found)
  • git.exe available in your path

Clone the vcpkg repository, then run:

C:\src\vcpkg> .\bootstrap-vcpkg.bat

Then, to hook up user-wide integration with Visual Studio, run (note: requires admin on first use):

C:\src\vcpkg> .\vcpkg integrate install

All what’s left is to build and install HPX with:

C:\src\vcpkg> .\vcpkg install hpx:x64-windows

which will download and build HPX V1.0 and all necessary prerequisites (note: you can also build hpx:x86-windows for 32-bit applications).

Finally, create a New Project (or open an existing one) in Visual Studio 2015 or Visual Studio 2017. You can now #include <hpx/hpx.hpp> and use the library’s functionality as needed.

Happy coding!

GD Star Rating
    This entry was posted in HPX and tagged , by Hartmut Kaiser. Bookmark the permalink.

    About Hartmut Kaiser

    Hartmut is an Adjunct Professor of Computer Science at Louisiana State University. At the same time, he holds the position of a senior scientist at the Center for Computation and Technology (LSU). He received his doctorate from the Technical University of Chemnitz (Germany) in 1988. He is probably best known through his involvement in open source software projects, mainly as the author of several C++ libraries he has contributed to Boost, which are in use by thousands of developers worldwide. His current research is focused on leading the STE||AR group at CCT working on the practical design and implementation of the ParalleX execution model and related programming methods. In addition, he architected and developed the core library modules of SAGA for C++, a Simple API for Grid Applications.

    Leave a Reply

    Your email address will not be published. Required fields are marked *