From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto estimate progress when using iteration parallelism?

Solved!
Go to solution

If I have a for-loop with iteration parallelism enabled, is there a good method to update a progress bar without eliminating the potential speed boost?  The naive approach of dividing the iteration terminal by the total number of iterations goes completely bonkers when I enable iteration parallelism.  


0 Kudos
Message 1 of 9
(2,668 Views)

Hi Sean,

 

use a FGV (aka ActionEngine aka LV2StyleGlobal) to count iteration and to drive the progress bar...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(2,654 Views)

I have a simple solution that I think I posted long ago. I'll try to dig it up....

Message 3 of 9
(2,648 Views)
Solution
Accepted by topic author SeanDonner

@altenbach wrote:

I have a simple solution that I think I posted long ago. I'll try to dig it up....


Found here.... 😄

0 Kudos
Message 4 of 9
(2,645 Views)

Yes, Christian presents on a silver plate what I had in mind... 🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(2,642 Views)

Thank you all for the quick responses.  I had the FGV in mind when I asked this question but I had some doubts about using it because it is a shared resource.  Won't the blocking nature of the non-reentrant FGV have a pretty big impact on the speed-boost provided by the iteration parallelism?


0 Kudos
Message 6 of 9
(2,632 Views)

Hi Sean,

 

a simple FGV like the one presented here will need a microsecond to process. Drawing the progress bar on the front panel takes significant more time.

How much time does your computation need per iteration? It's just a matter of proportions...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(2,626 Views)

@SeanDonner wrote:

Thank you all for the quick responses.  I had the FGV in mind when I asked this question but I had some doubts about using it because it is a shared resource.  Won't the blocking nature of the non-reentrant FGV have a pretty big impact on the speed-boost provided by the iteration parallelism?


Well, if the computation is fast, you don't need a progress bar. If the computation is slow, the overhead from the FGV is negligible. It executes very fast and in parallel to the code in the loop. It won't be blocking anything in any significant way.

0 Kudos
Message 8 of 9
(2,619 Views)

All good points, thanks for the help


0 Kudos
Message 9 of 9
(2,589 Views)