ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Optimising code using multicore

Solved!
Go to solution

Morning all,

 

I have a piece of labview code that I want to run 10,000 times, varying my input parameters to see the effect on the output (Monte Carlo simulations). The output of 1 run does not affect the input to the next, so I can define an array of starting parameters. Will my code run more efficiently on a multicore processor if I have 4 For loops, each of 2,500 runs as 1 For loop of 10,000 runs? Is there anyway to optimise this process?

 

Paul

"When I read about the horrors of drinking, I gave up reading"
0 Kudos
Message 1 of 3
(3,686 Views)
Solution
Accepted by topic author MancPablo

Please refer following links: https://www.ni.com/docs/en-US/bundle/labview/page/configuring-parallel-for-loop-iterations-to-tweak-...

and this : http://www.ni.com/white-paper/6423/en/ 

Thanks
uday
Message 2 of 3
(3,679 Views)

For those who are too lazy to hit the links:

The solution is to use a Paralllel FOR Loop.  You can configure the FOR loop to run several iterations in parallel.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(3,650 Views)