취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Dual Processor Multi Core Parrell Processing Question

해결 완료!
솔루션으로 이동

Hey Guys

 

I'm looking for a little clarification on an issue with parrell processing in LabView. If I have a Dual Processor machine with two 4 core CPU's will be able to access all 8 cores in the LabView environment. I'm presuming it can use any cores the operating system can see?   

 

Thanks for the help,

 

Tom

0 포인트
1/8 메시지
5,880 조회수

Tom,

 

this is essentially true. But this does not imply that LV runs faster or applications you create using LV are faster/more stable/whatsoever.

Why do you ask this? Do you have any issues? 

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 포인트
2/8 메시지
5,867 조회수

Hey thanks for the reply,

 

The reason I ask is because we are going to be building a LabView VI to control an OCT device and a high speed imaging system simultaneously. I want to farm off different Job's to different processors so they can run in parallel to improve efficiency and simplify timing issues.

 

The OCT system currently uses four cores on a quad core so I will need another chip on the motherboard if I require more cores. I have read a lot about utilising multicourse in LabView but nothing on multiprocessors on multicourses.

 

Thanks,

 

Tom  

0 포인트
3/8 메시지
5,864 조회수

Tom,

 

it is the job of the OS that applications can use all cores if necessarry. So for the application itself, it should make no difference if the system (in hardware) is MultiCPU, MultiCore or even simply HyperThread.....

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 포인트
4/8 메시지
5,860 조회수
Norbert is correct in that your OS usually handles load balancing across the CPUs.  But if you use the Timed Loop construct in LabVIEW (essentially a Do While Loop with more settings) you can specify which core you want the code inside that loop to run on.  
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 포인트
5/8 메시지
5,837 조회수
솔루션
주제 작성자 Tom Drew이(가) 승인함

Norbert B wrote:

 

it is the job of the OS that applications can use all cores if necessarry. So for the application itself, it should make no difference if the system (in hardware) is MultiCPU, MultiCore or even simply HyperThread.....

 

Norbert 


Its true, but I would like to add my 5 cents here.

 

Lets say, if you have single loop like

 

while (true){

//do something

}

 

then OS will get no chance to run it in multiple threads. So, you will get max 12,5% CPU load at 8 cores PC or 50% max on dual core PC.

 

I have dual core PC right now, and lets check it:

 

L-Single.png

 

So, as we can see - 50% CPU load reached (one core loaded more, but its another story).

 

Well, if we will use two while loops, then we will get 100 % load:

 

L-Dual.png

 

Of course, if you will need to load all 8 cores, then you should have 8 parallel loops.

 

Compare BD above with the following:

 

L-SingleD.png

 

We have two Array minmax functions, and they independend, but we have 50% only.

 

Well, you can get also 100% CPU utulization withing single while loop. In th example below you have two SubVI, which called in the same loop:

 

L-Reent.png

 

We have here 100 %. Important, that these VIs should be reenterant!

 

See what happened if they not reeenterant:

 

L-NoReent.png

 

Now a little bit about Vision. Behing of most of the Vision SubVIs are DLL calls. Some Vision functions already optimized for multicore execution. For example, convolution:

 

L-Convol.png

 

On the BD above we have single loop with one SubVI, but both cores are used (because convolute itself already optimized for multi core).

 

Remember, that not all Vision functions optimized yet. For, example, LowPass still single-threaded (compare this BD with BD above):

 

L-LowPass.png

 

Sure, we can utilize multi cores - just perform parallel execution (you have to split image to two parts, then join together and so on):

 

L-LowPass2.png

 

Remember, that SubVIs should be reeentrant, and all DLL calls should be thred safe (not in UI thread). Also good idea to turn off debugging in such experiments for eliminate additional CPU load.

 

Another point about 8 cores. As far as I know, LabVIEW (and LabVIEW-based application) will support only 4 cores within one execution system by default (at least prior to LabVIEW 2009). If you need to utulize all 8 cores, then you should add some lines into LabVIEW.ini. Refer to the following thread where you can found more details:

Interpolate 1d slow on 8 core machine

 

Hope all written above was correct. 

 

Thank for reading and best regards,

 

Andrey.

 

Message Edited by Andrey Dmitriev on 11-27-2009 02:50 PM
6/8 메시지
5,800 조회수

Hey Guys,

 

Thanks very much for your responces! i have a much better idea about what is going on now.  Its really good to see that LabView has such a strong support from its users. 

 

Thanks Again 

 

Tom 

0 포인트
7/8 메시지
5,783 조회수

Tom Drew wrote:

Its really good to see that LabView has such a strong support from its users. 


 

 

That's indeed 100% true. You can learn a lot here.

 

Thanks for marking the solution and also kudos to the person who helped you.

 

Enjoy wiring.

8/8 메시지
5,776 조회수