From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Discussion: LabVIEW and processor cores usage.

Solved!
Go to solution

Dear LabVIEW community,

 

I have a question regarding the utilisation of the Cores of a processor, next gen PC's will be having 16 or even higher core numbers..

 

How does LV use those cores or does it not?

 

What are the programming strategies to take maximum advantages of the cores?

 

I look forward eagerly to responses!!

 

Thank you.

 

 

0 Kudos
Message 1 of 14
(3,202 Views)

LV is already good at utilizing multiple cores and several of the built in functions are multithreaded. But in order to improve it you'll need to keep it in mind and parallellize for loops and use several event and queue based processes.

Is it some specific problem/issue you're thinking about?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 14
(3,191 Views)

I heard from an unqualified source that LV probably uses only one core.. If not I am interested to know how to make sure to optimise the core usage when programming. Or how to improve core usage and performance.

 

Specifically: how to program to make most use of the cores and improve performance..

 

 

0 Kudos
Message 3 of 14
(3,174 Views)

Hi rajiv,

 


@rajiv85 wrote:

I heard from an unqualified source that LV probably uses only one core..


You should question your "unqualified source"…

 

LabVIEW is multi-core-aware since ages. (I still have a "Multi-core" promotion t-shirt of the LV8 era.)

LabVIEW has some features like parallized FOR loops where you explicitely can influence the usage of multiple cores. There are functions to read the number of available cores. Several structures allow pinning to a certain core (timed while loop).

Other structures will also influence CPU core usage, like sequences…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 14
(3,165 Views)

@GerdW, thank you very much for these. Can I further please ask if you can recommend me some books or pages where I can read more about this?

0 Kudos
Message 5 of 14
(3,162 Views)

Hi rajiv,

 

sorry, no book recommendations from me.

 

Use "THINK DATAFLOW!" to implement code running in parallel as much as possible…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(3,158 Views)

It should be simple enough to make a stupid program that uses all cores to show it. Something like Create a noise signal of some length and let a couple of FFTs and filters work in parallell in a While loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 14
(3,146 Views)

Just google labview multiple core and be done with it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 14
(3,128 Views)

Though, to be correct, the Compiler that builds an .exe is single threaded, as most all compilers are. Maybe your buddy heard some rumour about that and thought the resulting .exe is single threaded? Anyhow, LV is good at threading. 🙂

http://www.ni.com/tutorial/9393/en/

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 14
(3,124 Views)

@Yamaeda wrote:

Though, to be correct, the Compiler that builds an .exe is single threaded, as most all compilers are. Maybe your buddy heard some rumour about that and thought the resulting .exe is single threaded? Anyhow, LV is good at threading. 🙂

http://www.ni.com/tutorial/9393/en/

/Y


Especially when humans don't try to influence the dataflow.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 14
(3,118 Views)