LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel processing questions

I'm running into some more strange behavior.

 

SmoothChannels2mm calls smooth2mm 4 times.  When I make smooth2mm reentrant so it can run in parallel smooth2mm takes about 800ms to run.  When I change it to not reentrant it runs in about 200ms.  (The time difference is noticeable to me as I'm running the Profiling tool)  It is my understanding thath making a vi reentrant should have the effect of parallelizing operations so it can run faster.  I'm seeing the exact opposite of this. 

 

The computer I'm using has a I.87 GHz Intel Xeon dual core

 

For now I'm just leaving it not reentrant because it seems to work faster.

 

Any ideas?
Message Edited by elset191 on 02-12-2009 10:32 AM
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 11 of 26
(1,047 Views)

elset191 wrote:
Any ideas?

 

This looks like a bug.

 

(btw. it only takes about 80ms here on my computer. You should also eliminate the last two local variables)

0 Kudos
Message 12 of 26
(1,034 Views)
What looks like a bug?  That it runs faster non reentrant?
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 13 of 26
(998 Views)

elset191 wrote:
What looks like a bug?  That it runs faster non reentrant?

Yes. reentrant should be similar if there is no multicore optimization, or faster if there is. A 5x slowdown is a bug!

 

Curiously, there is now slowdown on a single-core machine, but I have not fully tested all scenarios, of course. It could be very CPU architecture dependent.

 

 

If you are on SSP, you might want to try upgrading to the just released 8.6.1. No guarantees, though.

0 Kudos
Message 14 of 26
(985 Views)

Hi Tim,

 

I tested your VIs on my Intel Core 2 duo system with WinXP and LabVIEW 8.6.1.

 

Here are the results.:

 

With smooth2mmMOD.vi set as reentrant with the share clones between instances selected, the result is 85ms

With smooth2mmMOD.vi set to non-reentrant, it is 139ms.

 

Therefore, I am not able to replicate your issue on my system, as what I am seeing is expected behavior with non-reentrant taking longer than re-entrant.

 

Were you able to test this on a different system and see if the issue still persists?

 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 15 of 26
(965 Views)

Karunya_R wrote:

I tested your VIs on my Intel Core 2 duo system with WinXP and LabVIEW 8.6.1.


 

I see the 5x re-entrant slowdown on a dual core machine in LabVIEW 8.5.1.

 

I guess the question is if there is a difference between 8.6.1 and 8.6 in this respect.

0 Kudos
Message 16 of 26
(955 Views)
I have only run it with a dual core, and my old laptop which is not dual core.
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 17 of 26
(952 Views)

Hi Tim,

 

I tested this in LabVIEW 8.5. My results are:

 

Non-reentrant at 123ms.

 

Re-entrant at 383ms. 

 

I can understand this is counter-intuitive. 

 

The problem seems to be only for LabVIEW 8.5.1/LabVIEW 8.5.

 

Do you have any other version that you can test this on? This issue doesn't seem to propogate for LabVIEW 8.6.

 

 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 18 of 26
(927 Views)
I was running LabVIEW 8.6 when I ran my tests
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 19 of 26
(917 Views)

I rechecked the programs again today and the numbers remain about the same. 

 

Do you have 8.6.1 installed to test this? I will try to find a system here to check this in the mean while.

 

 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 20 of 26
(896 Views)