Hardware Environment
- My personal laptop, a MacBook Pro 15’ inch (2015).
- A Dell PowerEdge Server runs Ubuntu 14.04 and equips with dual 8-core CPUs (Intel Xeon E5-2640 v2, 2.0 GHz), 96 GB memory space, and a Mellanox ConnectX-3 InfiniBand NIC (MT27500, 40 Gbps).
Software Environment
- Boost Library 1.60
- I compile the binary and install this in MacOS, and directly install libboost via
apt-gettool in Ubuntu.
- I compile the binary and install this in MacOS, and directly install libboost via
- Hwloc Library (Hierarchical view of the machine)
- GCC-5.4
- The server has a old version 4.8 of GCC, so
C++17cannot be used in the environment. - I upgrade gcc and use
update-alternativesto switch new version on.
- The server has a old version 4.8 of GCC, so
- CMake
- Update my cmake from a private source list.
HPX deployment
- Add
my_test/,ctags,’CMakeFiles/‘ to.gitignorefor neglecting some unnecessary files. - Make a new directory named
my_testand runcmakein this directory and indicate the path ofhwlocandlibboost. - Run
make -j16to build up and generate the static library.
Libcds
- make a test directory and run
CMake(add -DCDS_DISABLE_128BIT_ATOMIC flag for 64-bit building). - make and make install
libcds
Libcds overview
The core functions are all in the cds directory.
In algo, there are some basic algorithm used in data structures, like flat combining (an OCC algorithm)
In most cases, Libcds uses RCU (read-copy-update) or HP (hazard pointer) to handle concurrent. In conclusion, the main types of container including:
- Queue
- Stack
- HashMap/HashSet
- List/KVList
- Binary Tree/AVL Tree
There are some special algorithms for different data structure to provide lock-free, likeMichaelList,Feldman Methodand so on.
Test Libcds
- Make a new directory, and type
make testto show the benchmarks. - Some of the test case cannot pass, so I post an issue in
libcdsgithub homepage. (https://github.com/khizmax/libcds/issues/121/ ) - Firstly, I try to change my allocator (default is Glibc allocator) to TCMalloc. Then I try to build libcds with asan instrumentation and run the test.
- On the other hand, I also run some examples to test the correctness of these algorithms.