LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

levenberg marquardt slower in LV7

I wrote this LV application using the Levenberg-Marquardt algorithm. In LV6.1 it worked perfectly, but after converting it to a LV7 program, it runs much slower (maybe 10x slower)
Does someone know this problem (and a solution??)
0 Kudos
Message 1 of 7
(3,122 Views)
During the conversion, were the L-M vi's converted to LV7 or fully replaced? There appear to be a few changes between 6.1 & 7 LM vis... several of the lower level subvi's go changed to CIN's, vs pure LV. You may want to see if it's just LV 7 running slower (LV 7 uses more resources than 6 in general... I've got both on an old 400 MHz AMD w/ 96 Mb of RAM... 6.1 cruises... 7 is a drag).

You might want to try using the LM vi's from 6.1 (do a save out w/ options to save all vi's), to see if it's LV7 itself or just the newer LM vis that's slogging it down.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 7
(3,122 Views)
Thanks for your answer.

I replaced the LV7 L-M vi's with the LV6.1 ones but nothing changed.
Do you think that LV7 itself now is the problem? My computer is an Intel Pentium IV with 512 MB RAM.

Regards,

Ruud
0 Kudos
Message 3 of 7
(3,122 Views)
It sounds like you have more than enough power:
http://ni.com/labview/requirements.htm
although it could be the OS...

Did you just replace the top level L-M vi's or all of them? Like I said, the majority of the changes appeared to be buried in the lowest level subvis.

You may want to try using the vi profiler to see where the majority of the time is being spent and isolate that vi. (Tools->advanced->Profile vis... at least in LV 6.1 I'm not at a station w/ LV7 presently). You'll want to select Timing details. See if any vi is running a long time or an excessive amount of calls and compare this vi to the LV6 version. If it's different, replace w/ the LV6 version. If it still slogs... hmmmm... maybe format and do a clean LV7 instal
l? 🙂

Lemme know what happens, since I use L-M frequently... just not in LV7 yet.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 4 of 7
(3,122 Views)
Ruud,
I just ran the standard Parameter Fit LM.vi (search examples for levenberg) on both LV6.1 and 7 on the same computer (400 MHz AMD, 96 Mb RAM, Win XP Pro) with the default inputs, except I set the total pts to 2000. Both gave equivalent results in 24 s.

Perhaps it's some other conflict on your setup or your modified vi. You may want to run the same experiment to see if it truly is the L-M routine or something else.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 5 of 7
(3,122 Views)
I will have a look if there's something wrong with the Analog Input in
the same VI. If not than I think I will just convert the whole thing
back to LV6.1 and stop bothering with LV7...
0 Kudos
Message 6 of 7
(3,122 Views)
> I will have a look if there's something wrong with the Analog Input in
> the same VI. If not than I think I will just convert the whole thing
> back to LV6.1 and stop bothering with LV7...

I don't know if anyone has mentioned it, but anytime you want to profile
something in LV, make sure to save the VIs first. When VIs are loaded
into a newer version or on a different platform, the VI's diagram and
panel need to come into memory for the recompile. When panels are
loaded into memory, more data is copied around so that opening a panel
will show what is going on there.

Anway, either copy the VIs to a LV7 location and save the VIs, or load
them and save with options to a LV7 location. I think this will
p
robably take care of your performance problems. Also keep in mind that
opened panels slow things down even more.'

Greg McKaskle
0 Kudos
Message 7 of 7
(3,122 Views)