OpenCL: internal implementation tests in MQL5 - page 69

 

Good afternoon everyone.

A word of advice on this very interesting subject:

1. Are there any EAs for trading that use OpenCL for calculations yet?

(more than a year ago the support was announced and we all together tried the performance on a test script, but a lot of time passed and the topic got quiet...).

2. If I have several video cards installed in my system, will they all be used for calculations or only one of them ?
 
vittt: 1. Are there already any trading EAs that use OpenCL for calculations ?

Probably exist, but it is unlikely to be in a kodobaz. There are few enthusiasts, and not all of them do it.

OpenCL is advantageous when it allows for significant speedup of calculations, which is critical for trading. Cramming it into the algorithm just for the sake of "shoblo" or loading the video card is not too sensible.

Imho, the most serious output from it can be obtained with intensive well-parallellable calculations or for neural network designers. That's probably worth asking them.

For example, personally I have one directionI am interested in, but OpenCL is hardly needed there as it would hardly be of any use (too many random access operations in global memory that only the devil knows how to parallelise). I'm not desperate yet and haven't tried every reasonable possibility - but it's definitely not going to be in free access.

2. If you have more than one video card installed in the system, will they all be used for computation or just one of them ?

The company said something about problems with multiple cards or even double-headed ones. Don't know if they are solved.

 

Hello.

I'm doing bulk calculations in MetaTrader5, solving a problem (modelling a poker game). I'm writing in Mcl5 because I'm a nerd and only know it. In my case performance issues are very important.

So, I understand that tasks, where each successive calculation step isn't tied to results of previous ones, can be parallelized. Good! I have just such a task.

But how can I parallelize it? If my algorithm operates with structures (struct) whose methods

- e.g. open a text file from a hard disk, read it, add information into structure arrays, close the text file

- and other methods contain many standard functions, e.g. rand(), ArrayResize(), etc.

OpenCl, as I understand it, is a language similar to c++. Anyway, my question is, how can I parallelize calculations in general?

 
Stasikusssss:

Hello.

I'm doing bulk calculations in MetaTrader5, solving a problem (modelling a poker game). I'm writing in Mcl5 because I'm a nerd and only know it. In my case performance issues are very important.

So, I understand that tasks, where each successive calculation step isn't tied to results of previous ones, can be parallelized. Good! I have just such a task.

But how can I parallelize it? If my algorithm operates with structures (struct) whose methods

- e.g. open a text file from a hard disk, read it, add information into structure arrays, close the text file

- and other methods contain many standard functions, e.g. rand(), ArrayResize(), etc.

OpenCl, as I understand it, is a language similar to c++. Anyway, my question is: how can I parallelize calculations in general?

Google is the help.

You will not get an answer to such a question on this forum.

For a simple combination of two reasons:

Beginner programmers do not program in OpenCL at all (and do not deal with parallelism at all) since they cannot grasp it.

2 The experienced programmers do not want to tinker with you because it (your question) requires a thorough study of your qualification, to answer it in a language understandable to you, and then give you a long explanation of your answer.

Therefore, respect the time resources of experienced programmers and look into the basics yourself. But when you figure it out and have specific questions about the language (OpenCL), you'll have a better chance of a meaningful conversation.

Быстрое погружение в MQL5
Быстрое погружение в MQL5
  • 2012.08.02
  • MetaQuotes Software Corp.
  • www.mql5.com
Вы решили изучить язык программирования торговых стратегий MQL5, но ничего о нем не знаете? Мы постарались взглянуть на MQL5 и терминал MetaTrader 5 глазами новичка и написали эту небольшую вводную статью. Из неё вы сможете получить краткое представление о возможностях самого языка, а также несколько полезных советов по работе с редактором MetaEditor 5 и самим терминалом.
 

you could answer that it's possible to parallelize

only in pure C, only the simplest arithmetic operations

Документация по MQL5: Основы языка / Операции и выражения / Арифметические операции
Документация по MQL5: Основы языка / Операции и выражения / Арифметические операции
  • www.mql5.com
Основы языка / Операции и выражения / Арифметические операции - Документация по MQL5
 

OpenCL 2.0

OpenCL 2.0 is the latest significant evolution of the OpenCL standard, designed to further simplify cross-platform programming, while enabling a rich range of algorithms and programming patterns to be easily accelerated. As the foundation for these increased capabilities, OpenCL 2.0 defines an enhanced execution model and a subset of the C11 and C++11 memory model, synchronization and atomic operations.

  • post a comment on the OpenCL 2.0 feedback thread on the Khronos forums - good for general feedback and questions
  • file a bug in the Khronos Bugzilla system under OpenCL 2.0 - good for detailed fixes and error founds in the specification.
Official OpenCL 2.0 Feedback thread
Official OpenCL 2.0 Feedback thread
  • www.khronos.org
The Khronos Group promotes the deployment and development of open standard APIs to enable authoring and playback of dynamic media on a wide variety of platforms and embedded devices. Current APIs are OpenGL ES, OpenML, OpenMAX, OpenSL ES, and Collada.
 
tol64:

OpenCL 2.0 is the latest significant evolution of the OpenCL standard,.............

Where are you going with this?
 
MetaDriver:
What's your point?

I saw this news and decided to post it here. It's interesting to delve into it, but I can't find the time yet. Here is the same news in Russian:


OpenCL 2.0specification adopted

Khronos Group announced the ratification and availability of the final version of OpenCL 2.0 specification. According to the developers, the release of OpenCL 2.0 represents a significant milestone in the evolution of an open, free to use standard that simplifies cross-platform parallel programming.

The new version improves the execution model and memory model subsets of C11 and C++11, synchronisation and atomic operations. It is said that the new version of OpenCL allows you to use a much wider range of algorithms and programming patterns. The new version takes into account the wishes of software developers that use OpenCL. The specifications are already available on the Khronos website.

OpenCL 2.0 features and enhancements include: shared virtual memory, nested parallelism, shared address space, better image handling, including sRGB support. In addition, developers highlight atomic C11 operations, in-memory FIFO stack pipelines and installable driver extensions for Android.

Принята спецификация OpenCL 2.0
  • www.ixbt.com
Принята спецификация OpenCL 2.0 Открытый, бесплатный для использования стандарт OpenCL 2.0 упрощает кроссплатформенное параллельное программирование
 
tol64:

I saw this news and decided to post it here. It's interesting to delve into it, but I can't find the time yet. Here is the same news in Russian:


OpenCL 2.0specification adopted

Khronos Group announced the ratification and availability of the final version of OpenCL 2.0 specification. According to the developers, the release of OpenCL 2.0 represents a significant milestone in the evolution of an open source, free to use standard that simplifies cross-platform parallel programming.

The new version improves the execution model and memory model subsets of C11 and C++11, synchronisation and atomic operations. It is said that the new version of OpenCL allows you to use a much wider range of algorithms and programming patterns. The new version takes into account the wishes of software developers that use OpenCL. The specifications are already available on the Khronos website.

OpenCL 2.0 enhancements and new features include: shared virtual memory, nested parallelism, shared address space, better image processing, including sRGB support. In addition, developers highlight atomic C11 operations, in-memory FIFO stack pipelines and installable driver extensions for Android.

Well, that's understandable, what to do with it, dump it in C#/C++?
 
MetaDriver:
What to do with it? Should I dump it in C#/C++?

Maybe Renat can see what can be learnt from this. It is quite possible that new specification will give better performance in MQL5 as well, isn't it?

As for C#/C++, if need be, we can also dump it. The main thing is to get the maximum possible output. ;)

Reason: