Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69090

Pre-conditions for reentrant SubVIs to run in parallel

$
0
0

Hello!

 

In my VI I have two preallocated clones of a SubVI, which I thought would run in a seperate thread each. This SubVI simply takes a reference to a double and increments it. The two clones actually run in parallel, but not in seperate threads. For comparison I made SubVI that does not take a reference - those clones run each in an own thread.

 

I noticed this looking at the CPU usage: in the first case, only one core was used, in the second case two cores were used.

 

1) I wonder which are the pre-conditions for a SubVI to actually run not only in parallel, but actually in seperate threads?

2) Is there a way to find out during compile-time which parts (clumps) of a VI run in parallel, and which SubVIs get actually their own thread for execution?

 

Concerning the reference: execution is quite slow. As I understand it, the GUI runs in its own thread, thus not interfering with the SubVIs that are increasing the references. I think there is also no locking of a reference so reads and writes to a reference should be very quick. Is this correct? If yes, why is execution that slow?

 

Thanks for your answers

Marco

 

(Test computer has a Quad-Core w/ Hyperthreading, using LabVIEW 2012SP1)


Viewing all articles
Browse latest Browse all 69090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>