Tag Archives: TBB

C++ Concurrency book learning without TBB?

C++ Concurrency book learning without TBB?

With the strange errors I am getting as described here

http://stackoverflow.com/questions/41418733/tbb-c-multithreading-error-no-matching-function-for-call/41418828#41418828

I found the nitty gritty code that is generated from the TBB Flow Graph is quite cumbersome. It is also buggy where it cannot compile. I went back to the drawing board to take a look at this book. Flow Graph has also been listed as being in Alpha mode.

https://software.intel.com/en-us/forums/flow-graph-designer/topic/594239

https://www.amazon.ca/C-Concurrency-Action-Practical-Multithreading/dp/1933988770

It has been recommended by various sources so I read it now.

Something else to consider I just found:

http://stackoverflow.com/questions/17252402/intel-tbb-its-2-time-slower-than-std-tbb-vs-std

is this another blessing in disguise??

Book useful code snippets:

2.8, 3.4, 3.8

3.11-3.12

4.1, *4.5, 4.9, 4.10,

5.10, 5.11

6.2, *6.6, 6.7 -6,13

Lock free for all 7

*7.13 start of  lock free queue

8.5, 8,7, 8.8, 8.11, 8.12

9.1-9.4 (threading pools), 9.6-9.9

Also, these skills are top paying where most are C++ low latency multithrading.

http://www.hrg.net/job-listing/?category_id=3

75% approx at top end vs rest maybe for Java

Join my FREE newsletter to learn more about how ++ multithreading is important for automated trading

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Intel TBB Flow Graph dfor rapid multithreading development of High Speed Trading

Intel TBB Flow Graph dfor rapid multithreading development of High Speed Trading

This could be useful GUI utility for some to generate Stub C++ code
Note that this runs on WIndows UGH
https://www.youtube.com/watch?v=m8V9weR7Uwc

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Intel TBB C++ with MIC available for massive multicore HFT

Intel TBB C++ with MIC available for massive multicore HFT

C++  library built for massively-parallel multicore processors

 

https://en.wikipedia.org/wiki/Xeon_Phi

http://www.intel.com/content/www/us/en/architecture-and-technology/many-integrated-core/intel-many-integrated-core-architecture.html

https://www.threadingbuildingblocks.org

NOTE that most offloading libraries use OpenMP but it is commercial. I will stick with TBB for now.

http://stackoverflow.com/questions/615264/c-parallelization-libraries-openmp-vs-thread-building-blocks

http://www.drdobbs.com/parallel/cuda-vs-phi-phi-programming-for-cuda-dev/240144545

 

CUDA programmers need to remember that the Phi is designed as a coprocessor that runs Linux. Unlike GPUs that act only as accelerators, the Phi coprocessor has the ability to be used as a very capable support processor merely by compiling existing applications to run natively on it. Although this means that Phi coprocessors will probably not be a performance star for non-vector applications, they can still be used to speed applications via their many-core parallelism and high memory bandwidth.

http://arstechnica.com/gadgets/2016/08/nvidia-intel-xeon-phi-deep-learning-gpu/?comments=1

Xeon Phi might have the edge on Nvidia GPUs when it comes to double-precision FP. IIRC the performance of Pascal (and other GPUs) on DP is pretty awful, and that’s a big problem for many real-world HPC applications…

The poor double-precision performance is only an issue on consumer-grade Nvidia cards (e.g. anything that is not in their Tesla line of compute cards aimed toward HPC). In recent years, Nvidia has intentionally crippled DP performance on non-professional cards in order to ensure that those who need that aren’t tempted to purchase the much-cheaper Geforce devices instead…

Intel needs to stop playing this game of Xeon Phi vs GPGPUs like this. They are very different, and their strengths are different. After having benchmarked both of these many times, I realized that they should just be clear which problem domains are better on the Xeon Phi. GPGPU cores are “much dumber” and you get a lot more of them, which is perfectly fine for linear algebra. So any task which is asking the GPGPU to do straight repeated linear algebra (machine learning), obviously the GPGPU will be faster because that’s pretty much all it can do.

But the Xeon Phi has much faster data transfers, much faster memory allocation, can be used with standard MPI/OpenMP/OpenACC, and Knights Landing will be byte-compatible with x86. Do you have a code you already setup with MPI or OpenMP? As long as the memory requirements aren’t too high, you probably already set it up to minimize communications, and so you get a free 240 threads for every node you put a Xeon Phi in (without changing your program!). Does your program run for an indeterminate amount of time and have to allocate memory? Then the Xeon Phi will be faster. Do you have to use it simply as an accelerator, i.e. the problem size is too large for the memory of the card so you will have to keep pushing things back to the CPU? Then the Xeon Phi will be faster (and Knights Landing will have more memory, alleviating this problem even more).

Join my FREE newsletter to learn more about these tricks to help automated trading

 

See 18;10 for vanilla pricing engine options example speed up

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Tutorial for C++ with Redis Intel TBB on Ubuntu Linux

Tutorial for C++ with Redis Intel TBB on Ubuntu Linux

Insrtuctions and checklist

Download and install TBB

 

http://stackoverflow.com/questions/25616064/how-to-get-threaded-building-blocks-working-in-ubuntu-14-04

 

Download and build Hiredis C driver

 

http://codingsteps.com/installing-using-hiredis-c-client-library-for-redis/

 

C++ driver for Redis: https://github.com/luca3m/redis3m

Use Install instructions

sudo apt-get install libmsgpack-dev libboost-thread-dev libboost-date-time-dev libboost-test-dev libboost-filesystem-dev libboost-system-dev libhiredis-dev cmake build-essential

 

git clone https://github.com/luca3m/redis3m

cd redis3m

cmake

make

sudo make install

 

In Codeblocks,for each project ensure you tell where the include path (for **h header files). Also, ensure you configure library path for redis3m.so (and any other dependable libraries are included)

 

Build options->Linker settings (tab) and Search Directories (for compiler)

 

More links:
</div>
More links:

http://www.codeblocks.org/downloads/26

http://askubuntu.com/questions/499238/cmake-cant-find-pthread

http://stackoverflow.com/questions/12578499/how-to-install-boost-on-ubuntu

http://stackoverflow.com/questions/24813827/cmake-failing-to-detect-pthreads-due-to-warnings/25130590#25130590

http://www.howtogeek.com/howto/ubuntu/install-an-rpm-package-on-ubuntu-linux/
<div class=”feature-section–center”>

 

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis

https://www.linode.com/docs/databases/redis/redis-on-ubuntu-12-04-precise-pangolin

 

https://github.com/redis/hiredis

 

http://codingsteps.com/installing-using-hiredis-c-client-library-for-redis/

 

http://stackoverflow.com/questions/24813827/cmake-failing-to-detect-pthreads-due-to-warnings/25130590#25130590

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Update on source code for Redis Intel TBB on Ubuntu Linux and Windows

Update on source code for Redis Intel TBB on Ubuntu Linux

For those that watched my video, I am trying to port my Mac Xcode source project into Ubuntu Linux. This is turning into a massive failure as you can combine dynamic share linked libraries with static ones no sweat in Xcode which uses CLang C++ compiler. When you move the CMake project into Linux, the mix of library types conflict during the build process. This now putting me in a rethink mode to go with the original Fastflow (instead of Intel TBB as that build is another issue). So what I am trying to do use a Windows Virtual Box Ubuntu virtual machine with a new project for Fastflow and Redis client project. In the meantime, I have posted last night’s presentation below.

Note for Windows and Visual Studio users. These frameworks will not work on Windows especially Redis for Visual Studio or Windows. I will not have time or focus to maintain different versions of this so I am encouraging everyine interested in this project should move onto a virtual machine with Ubuntu Linux with Virtual Box. These are all free.

I will post my usual updates in video or postings for reference.
Also, this flash sale will be put on hold until I get this completed.

 

Compiled Updates:

I am dumping Codelite as the preferred C++ due to complicated building from source code with multiple dependencies of GTK libssh etc. I am may switch to CLion which is paid.

Join my FREE newsletter to learn when I get a proper fix for these combined frameworks in Linux working

Overview of CMake and C++ HFT like algo trading software project

Monday, Jul 25, 2016, 7:00 PM

9 Members Went

Check out this Meetup →

Overview of CMake and C++ HFT like algo trading software project

Monday, Jul 25, 2016, 7:00 PM

Oline via GotoMeeting
GotoMeeting Toronto, ON

5 Members Went

Next up is my own milestone project for biggest followers at my site of QuantLabs.net. As always, mucho thanks to them for supporting so I can make it this far. As a big thank you, I have combined a C++ project with the world’s fastest NOSQL database (Redis) with Intel TBB for concurrency. This will be used as my blueprint for a next generation alg…

Check out this Meetup →

Next up is my own milestone project for biggest followers at my site of QuantLab

Monday, Jul 25, 2016, 8:00 PM

GotoMeeting Webinar online
GotoMeeting Webinar online Toronto, ON

5 Researching Traders Went

Next up is my own milestone project for biggest followers at my site of QuantLabs.net. As always, mucho thanks to them for supporting so I can make it this far. As a big thank you, I have combined a C++ project with the world’s fastest NOSQL database (Redis) with Intel TBB for concurrency. This will be used as my blueprint for a next generation alg…

Check out this Meetup →

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Demo of C++ Redis NOSQL Intel TBB concurrency together

Demo of C++ Redis NOSQL Intel TBB concurrency together

This could be the blueprint for my upcoming C++ trading systems

Join my FREE newsletter to learn more about when I release this code for all my Quant Elite members

Please watch these videos before the last one which is the overview of this code:

 

Most recent milestone code with Redis and Intel TBB working together

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Overview of Intel TBB Redis NOSQL C++ for potential HFT

Overview of Intel TBB Redis NOSQL C++ for potential HFT

Combined with the links below and videos, I want to showcase the direction I am going with for rapidly implementing independent trading systems. This is similar to Matlab’s Simulink but everything is done is native C++ with 2 open source projects including Redis NOSQL and Intel TBB for the concurrency!

Notes on open source C++ Intel TBB vs Fastflow

Check out this Windows only tool to visually design your parallel components with code generation to native C++

 

 

Quick demo of Intel TBB C++ Flow Graph Designer code generation on Windows

Simple example of flow graph with two algos executed in parallel

https://software.intel.com/en-us/node/506217

JOIN MY FREE NEWSLETTER FOR MY ANNOUNCEMENT OF A LIVE MEETUP DEMO OF THIS

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Quick demo of Intel TBB C++ Flow Graph Designer code generation on Windows

Quick demo of Intel TBB C++ Flow Graph Designer code generation on Windows

This could be a very useful tool to generate STUB C++ code for concurrency

Runs only on Windows unfortunately

https://software.intel.com/en-us/articles/flow-graph-designer

Join my FREE newsletter to see how this C++ tool for automated trading

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Notes on open source C++ Intel TBB vs Fastflow

Notes on open source C++ Intel TBB vs Fastflow

You should know about my Youtube video playlist of Fastflow. As I could not build it on my Mac OSX, I sent out a query to their email list. This was in reference to why their code would not build. Response was:

Your message for list fastflow@di.unito.it
has been rejected by the moderator (torquati@di.unipi.it).

(Subject of your mail: Mac OSX build errors)

Check fastflow list usage:
https://www.di.unito.it/listserver/info/fastflow

wtf? I could build Intel TBB on my Mac no problems with an event provided Xcode solution file. So guess what I will be working with as of now?  Here is what I dug up on this library:

https://www.threadingbuildingblocks.org/documentation

https://compscicenter.ru/media/slides/hp_course_2014_spring/2014_04_06_hp_course_2014_spring.pdf

https://goparallel.sourceforge.net/wp-content/uploads/2014/07/PUM18_Threading_Building_Blocks.pdf

http://www.cs.cmu.edu/afs/cs/academic/class/15499-s09/www/handouts/TBB-HPCC07.pdf

https://software.intel.com/en-us/node/506110

https://software.intel.com/en-us/node/506102

https://www.threadingbuildingblocks.org/tutorial-intel-tbb-concurrent-containers

https://www.threadingbuildingblocks.org/intel-tbb-tutorial

https://www.threadingbuildingblocks.org/docs/help/reference/task_scheduler/priorities.html

Simplest one: http://www.ibm.com/developerworks/aix/library/au-intelthreadbuilding/

https://software.intel.com/en-us/blogs/2011/09/09/a-feature-detection-example-using-the-intel-threading-building-blocks-flow-graph <– closest example for automated trading

http://www.drdobbs.com/tools/the-intel-threading-building-blocks-flow/231900177?pgno=1

https://software.intel.com/en-us/node/506216

Join my FREE newsletter to learn more about how Intel TBB can help in automated trading

 

Most useful for graph processing with events

Look at multifunction_node
For queueing look at queue_node and priority_queue_node

Five dining philosopher example

Streaming feature detector <—

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Demo update of C++ Intel TBB Redis Client on Mac OSX

Demo update of C++ Intel TBB Redis Client on Mac OSX

This is very fluid as nothing is final but I got these 2 libraries working

https://www.threadingbuildingblocks.org/download

https://github.com/Cylix/cpp_redis/blob/master/examples/redis_client.cpp

Join my FREE newsletter to learn more about these libraries for automated trading

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!