02-12-2009 10:27 AM - edited 02-12-2009 10:32 AM
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?
02-12-2009 11:26 AM
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)
02-13-2009 09:02 AM
02-13-2009 11:11 AM
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.
02-13-2009 03:58 PM
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?
02-13-2009 04:43 PM
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.
02-13-2009 04:48 PM
02-16-2009 02:04 PM
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.
02-16-2009 03:14 PM
02-17-2009 11:28 AM
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.