For loop and parallel computing

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

For loop and parallel computing

Postby loulouviews » Tue Sep 01, 2015 7:28 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: For loop and parallel computing

Postby EViews Gareth » Tue Sep 01, 2015 8:22 am

Unfortunately not.
Follow us on Twitter @IHSEViews

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: For loop and parallel computing

Postby CharlieEVIEWS » Wed Sep 02, 2015 12:22 pm

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

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Re: For loop and parallel computing

Postby loulouviews » Thu Sep 03, 2015 3:36 am

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

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: For loop and parallel computing

Postby CharlieEVIEWS » Thu Sep 03, 2015 3:46 am

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

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

Re: For loop and parallel computing

Postby loulouviews » Fri Sep 04, 2015 6:05 am

Thanks a lot Charlie. I'll keep you in touch with how we finally handle this :) !

Loulouviews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 50 guests