Discussion of article "How to Install and Use OpenCL for Calculations" - page 5

 

Forum on trading, automated trading systems and testing trading strategies

Discussion of the article "How to install and use OpenCL in calculations"

MetaDriver, 2013.11.27 23:23

...

Some ratings are crazy at you. or counted crookedly. Here are my today's ratings:

2013.11.28 00:04:42     OpenCL  Device #1:  CPU AuthenticAMD AMD Phenom(tm) II X6 1100 T Processor with OpenCL 1.1 (6 units, 3840 MHz, 16345 Mb, version 2.0, rating 17)
2013.11.28 00:04:42     OpenCL  Device #0:  GPU Advanced Micro Devices, Inc. Cayman with OpenCL 1.1 (20 units, 750 MHz, 1024 Mb, version CAL 1.4.1703 (VM), rating 171)

I don't believe in such a difference in ratings. Something is wrong here.

I reinstalled the drivers and now the difference is even greater. In the terminal log, the CPU rating is up to 130 (the video card is also about the same). But in the profile in the Agents section (connected agents to the cloud) the rating is ~170 on average on all cores (maximum 183).

Why such a difference I don't know...

 
tol64:

Reinstalled the drivers and now the difference is even greater. In the terminal log the CPU rating is up to 130 (on the video card it is also about the same). But in the profile in the Agents section (connected agents to the cloud) the rating is ~170 on average on all cores (maximum 183).

Why such a difference I don't know...

No, well agents are a different song, ratings for normal (not OpenCL) calculations are calculated there, i.e. they are calculated in other relative units in general.

I understand about drivers. I'm still slow to reinstall mine - I had problems reinstalling drivers last year. I barely managed without reinstalling the system.

 

Intel® SDK for OpenCL* Applications 2013 - not installed on my PC:

Please tell me where to click :) - Win 7 x64

 
MigVRN:

Intel® SDK for OpenCL* Applications 2013 - not installed on my PC:

Please tell me where to click :) - Win 7 x64

First download from Intel website and then install this file: intel_sdk_for_ocl_applications_2013_r2_runtime_x64_setup.msi.
 
tol64:
Download first from Intel website and then install this file: intel_sdk_for_ocl_applications_2013_r2_runtime_x64_setup.msi.
Thanks a lot - it helped!
 
Can you tell me how to use GPU as an agent for testing, because everything is installed (OpenCL drivers), the terminal finds GPU, but in the list of agents in the tester it is not, only 2 CPU cores?
 

I still didn't really understand about MetaTrader & OpenCL feature.......
As far as I know, OpenCL function is to share PC processor with VGA GPU processor. (mostly for gaming/photo editing).... the point is to make PC processor not working too hard.

I read some reference about OpenCL and MetaTrader 5,,, but mostly contain scripting,
unfortunately I don't know anything about coding,,,,, and the more I read, more I get dizzy.


My Question:....
1. I don't use any EA and only using BollingerBand & Stochastic indicator.....
    if my MetaTrader 5 with it's OpenCL feature actived,, is it able to decrease PC Processor usage to about 50%?

2. If running 8 different 'MetaTrader 5' (with OpenCL active), is it really feel more light and not slowing down PC ?

If anyone know the answered, Please explain with simple english.

 
stivy007:
Could you tell me how to use GPU as an agent for testing, because everything is installed (OpenCL drivers), the terminal finds GPU, but in the list of agents in the tester it is not present, only 2 CPU cores?
no way. it should be just specially written advisors with support.
 

Does anyone know why a simple code for OpenCL works on the processor, but the video driver crashes on the video card?

If you remove the inner loop, it works on the video card without any problems.

#property link      "http://www.mql5.com"
#property version   "1.00"
#property script_show_inputs;

input int _device = 0;        /// OpenCL device number 

string d2s( double arg, int dig )         { return DoubleToString( arg, dig ); }
//+------------------------------------------------------------------+

string i2s( int arg )                     { return IntegerToString( arg ); }
//+------------------------------------------------------------------+

const string clSrc =
      "#pragma  OPENCL EXTENSION cl_khr_fp64 : enable                      \r\n"
      "                                                                    \r\n"
      "__kernel void test( __global double *out )                          \r\n"                 
      "{                                                                   \r\n"                  
      "  double x = 0.0;  double x1 = 0.0;                                 \r\n"                      
      "  for( long j = 0; j < 1000000; j ++ )                              \r\n"
      "  {                                                                 \r\n"
      "     x =x+0.01;                                                     \r\n"     
      "     for( long n = 1; n < 10000; n ++ ) x1=x1+0.01;                 \r\n"
      "  }                                                                 \r\n"
      "  out[ 0 ] = x;                                                     \r\n"
      "}                                                                   \r\n";
      

int OnStart()
{
   int clCtx = CLContextCreate( _device );
   
   int clPrg = CLProgramCreate( clCtx, clSrc );
   int clKrn = CLKernelCreate( clPrg, "test" );

   uint st = GetTickCount( );

   int clMem = CLBufferCreate( clCtx,  sizeof( double ), CL_MEM_READ_WRITE );            
   CLSetKernelArgMem( clKrn, 0, clMem );
   Print (i2s(clCtx)+";"+i2s(clPrg)+";"+i2s(clKrn));
   bool ex = CLExecute( clKrn ); 
                       
   double buf[1];                                                
   uint read = CLBufferRead( clMem, buf );                                                 
   
   Print( "out = " + d2s( buf[0], 12 ) );
      
   CLBufferFree( clMem );
   CLKernelFree( clKrn );
   CLProgramFree( clPrg );
   CLContextFree( clCtx );
   
   double gone = ( GetTickCount( ) - st ) / 1000.;
   Print( "OpenCl: gone = " + d2s( gone, 3 ) + " sec." );
   Print( "________________________" );
   
   return( 0 );
}//+------------------------------------------------------------------+
 

Can you pass indicator or candle or any properties found in the chart into the GPU?

i.e. get the RSI or stochastic or ichimoku or candle OHLC?