LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timed loop used to force execution on a specific core

We are trying to figure a way force execution to a single core of a sub-section of our code. What has been purposed, or more correctly asked of me, is whether putting a few of our vi's together in a time loop will force their execution to run on a selected core? I'm not sure, so have thrown the question out here.

 

 

Thanks, as usual.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 1 of 11
(3,720 Views)

That is the understanding I have.  I don't know of any way other than using the timed loop.  There is an input for "processor" affinity to the loop.  The tests I have performed in the past (8.5 or 8.6?) showed that it works for the RT and Windows systems.


GCentral
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
Message 2 of 11
(3,718 Views)

Timed seq will have the same effect.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 11
(3,711 Views)

ditto that.  that is what the prophets say and the only way to "Pick" your core that I know of. 

 

Do you really need to be selective of the core or do you simply need a set of functions to operate atomically?  If the exact core is not the issue there are other methods


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 11
(3,708 Views)

@Ben wrote:

Timed seq will have the same effect.

 

Ben


I have not used those.  Good to know same options are there too.

 


GCentral
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 5 of 11
(3,705 Views)

@JÞB wrote:
Do you really need to be selective of the core or do you simply need a set of functions to operate atomically?  If the exact core is not the issue there are other methods

I have ran into situations where I had two processes that just needed to stay out of each other's hair core.  The exact core didn't matter, as long as they were on different ones.  I used the timed loops for that situation.


GCentral
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 6 of 11
(3,699 Views)

Ok, to refine the question, if a few sub-vi's, which themselves run essentially autonomously, can they be coerced to run on a common core this way?

 

Thanks for the rapid response, am at a new gig, where I have been brought in as someone knowledgeable in LabVIEW and of course get asked the more esoteric questions.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 7 of 11
(3,691 Views)

In theory yes.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 11
(3,683 Views)

By using a timed sequence around each of your "Automomous pieces" and wiring the same core into each timed structure you will force all pieces to be on the same core HOWEVER, they will each be in thier own execution systems since each timed structure creates it own threadpool.  What does this mean for your code and code effeciency IDNK Smiley Embarassed Thats as far under that hood as I've ever had to dig.  I suspect that unless this is a very wonkey project (And I almost bet it is) there will be far lower-hanging fruit to optomize the code than eliminating contentions between execution systems running on a common core.

 

But I'll listen if anyone's got more to offer

Spoiler
shut -up and learn now Jeff! 

"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 11
(3,682 Views)

As has been said, any VIs that are called inside of the timed loop/sequence will run in the same core.  I also agree that this as a true need is very rare and a code cleanup may be in order.


GCentral
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 10 of 11
(3,678 Views)