LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-threaded LabVIEW?

I am trying to multithread labview to test something and I need to have labview load up my cpu. I have a 4 core machine so it might take a lot.

I have a main VI that invokes a reentrant node repeatedly. This reentrant node can be set to chew up CPU time. THe problem is as I launch multiple copies of this reentrant node, they all slow down and thus the overall program does not load the CPU at all. Once I have lauched 3 or 4 copies they all stop and there is essentially no load. This seems a classic "more is less".

The sub-vis are set to reentrant and the VI reference open prepares them for reentrant execution. Is it that they are not truely reentrant?

I have set LV to use 8 threads for each execution engine and each priority. "vi.lib/Utility/sysinfo.llb/threadconfig.vi"
But that seems to have no effect? Same with changing various execution engines for the sub-vi.

Mac OS X 10.4.8 / LV 8.20
Example VI attached
-Scott

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 1 of 2
(2,145 Views)
OK, I get to answer my own problem! It seems that the random number generator is not reentrant and was blocking. It is obvious once I thought about it since it saves an internal state. Once I eliminate the random number generator I get the expected behavior.

It took me most of today to figure out the answer and I got it right after I posted of course!

-Scott

Message Edited by sth on 01-18-2007 04:06 PM

LabVIEW ChampionLabVIEW Channel Wires

Message 2 of 2
(2,140 Views)