Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel?

Dear all
I'm a user of labview 8.5 in south korea. I wonder that labview parallel process of maxmium ablity.
What is the maxmium size in the labview(parallel possible?)
So i want look about labview parallel processing guide line?
If you have some kind of manual of labview parallel process guide line, Please send to e-mail to me or answer
because my program is low  processing time.
My computer spec is 2-xeon CPU(x5355, 8core), 2-G ram but processing time is low.
please!
0 Kudos
Message 1 of 6
(3,874 Views)

Check the recent discussion about running vision routines in parallel.  It will probably help.

The main detail of the discussion is that you need to change the NI Vision routines to reentrant to maximize your parallel analysis.  There are a couple of functions that could slow down when made reentrant, so be careful.

You also need to make sure your program is running several functions in parallel instead of serially to maximize the processing speed.  There are several NI documents on optimizing programs for multiple processors.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 6
(3,873 Views)
Thank you Bruce Ammons
 
I wonder labview parallel processing time.
I'm test program in singcore, dualcore, 8core
everytime change in my program to parallel
 
I'm check the speed up but now is limited
I'wonder parallel size. I think to much parallel is problem?
 
My program size is 5 MBYTE
 
please
0 Kudos
Message 3 of 6
(3,866 Views)
Hi neonim,
 
Thank you for contacting National Instruments! I believe I understand all of your questions but if I miss something please let me know.
 
LabVIEW allocates four threads for processors with four or less cores. If your processor has more than four cores the number of threads is directly associated with the number of cores, and this will be the number of parallel code sections you should run. Having more parallel code sections than you have allocated threads will cause excessive thread switching which will slow down your code.
 
You also wished to know the largest data size that LabVIEW could process at a single time. This is also system dependent. For the best performance keep the data size small enough to fit in the system cache which varies from processor to processor. If you keep you code within this cache you program will not have to go out to system memory, which is relatively slower. The processor you mentioned has 8MB L2 cache. It also has four cores that are split in half where there is 4MB L2 cache on the first two cores and another 4MB L2 cache on the other two cores. So the maximum data size you can store in cache at a time is 4MB.
 
Please take a look at www.ni.com/multicore for more information.
 
Does this help?
--Michelle

National Instruments
0 Kudos
Message 4 of 6
(3,820 Views)

thank you Michelle

I don't understand thread?

teaching me exact thread?( similar for loop)  If i made forloop into the forloop that is one thread or two thread

 

Another question

You said me L2 cache problem. image size? caculation? (floating point or etc...)  What is exact mean?

Please! Show me the example vi?

 

And last question

Labview execution time and Labwindow cvi execution time which is too faster?

IF Labview into the Labwindow DLL(caculation time is too many point) is execution time up?

thank you regard  

0 Kudos
Message 5 of 6
(3,808 Views)

Hi neomin,

 

I apologize for the confusion. You can think of a thread is a chunk of code that can run independently from other pieces of code. A thread and a for loop are not inherently related. Threading is a way to make the execution of a program more efficient by breaking up the program into parts and running those parts at the same time. Generally speaking, the more threads you can process, while staying within the capabilities of your processor, the more efficient/faster the program can run. Threading is taken care of within the processor so it is hard to tell how the program will be broken up.

 

Another way to think of threading is if you were to have three while loops running simultaneously, each would be allotted its own thread as the while loops will run independently in your code.

L2 Cache is memory that is solely for the processor to use and is located on the processor. It is usually fairly small and is there as quick access memory for the process. Any data that is not located here, the processor must go to the RAM to use. This takes more time than if the processor was fetching data straight from cache. With saying this, there is no way to ensure that all of your program will stay in cache as Windows or whatever operating system you have may be using some of this memory also. But, if you keep your program within the size of your cache you are making it possible to keep the program in cache.

As for you last question, is LabVIEW or LabWindows/CVI faster. In rare cases, LabWindows/CVI may be slightly faster but for the most part you will not see a difference. You can try some benchmarking by writing simple code for each. Also, if you were to call a LabWindows/CVI DLL in LabVIEW I would think that you would be adding one more unnecessary step and adding to execution time. If you write LabWindows/CVI code you should run it in that environment unless you need to interface this with something in LabVIEW. Bringing LabWindows/CVI into LabVIEW will not speed up anything.

Does this make sense? Did I answer your questions?

--Michelle

National Instruments
0 Kudos
Message 6 of 6
(3,768 Views)