Page 1 of 1

For loop and parallel computing

Posted: Tue Sep 01, 2015 7:28 am
by loulouviews
Hi everybody,

I have a for loop on variables on which I applyied a kalman filter.The iterations are independent. But because of the specifications of the kalman filter, the program is very long.

Code: Select all

for %var var1 var2 var3 ... 'kalman filter on %var
Is EViews able to split and distribute the iterations of the for loop on different cores so the process will be faster ?

Thanks a lot !

Loulouviews

Re: For loop and parallel computing

Posted: Tue Sep 01, 2015 8:22 am
by EViews Gareth
Unfortunately not.

Re: For loop and parallel computing

Posted: Wed Sep 02, 2015 12:22 pm
by CharlieEVIEWS
Ive encountered a similar problem like this before. One solution to max out your cpu useage (spread across cores) is to write the code into chunks/split the variables in your loop into different .prgs, and then open multiple eviews instances: one per core/+virtual cores if hyperthreading. Not ideal, but made a previously computationally difficult algorithm entirely viable in my case.

Charlie

Re: For loop and parallel computing

Posted: Thu Sep 03, 2015 3:36 am
by loulouviews
Ok thanks for your answers !
Charlie, that's a good idea, I'll try that. Which language would you advise for openning multiple EViews instances ?

Loulouviews

Re: For loop and parallel computing

Posted: Thu Sep 03, 2015 3:46 am
by CharlieEVIEWS
i took a rather crude approach and just opened them each separately from windows explorer :wink: . From my experiences: it might be optimal to open more instances than cores+virtual cores if your desire is to truly max out you CPU (I dont think a single instance will max out a single core, dependent on how your program is written), and that your instances wont complete at the same speed, which i think is due to how system processes are allocated across cores, meaning that some instances will share cores which are bogged down with running other background tasks. Naturally, you'll need to make sure you have enough ram for the task: I believe this is conditional on what your program writes to workfiles: e.g. if you're storing large matrices on each recursion or using high frequency data or creating a lot of auxiliary objects, you'll need more ram.

Please let me know if you have any further questions on this topic - very happy to help (if I have said anything incorrect in the above paragraph,which is likely, i'd be grateful for any corrections!)

Charlie

Re: For loop and parallel computing

Posted: Fri Sep 04, 2015 6:05 am
by loulouviews
Thanks a lot Charlie. I'll keep you in touch with how we finally handle this :) !

Loulouviews