LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

same code works different on 2 different PCs

Hi!
 
I have a problem, and i just cannot figure out how to solve it.
I use the same code on my home PC (WinXP SP2), and on the department PC (WinXP SP2). I experiance strange differences in running the code on the 2 PCs.
I tested the code on both PC with the same running options, release mode, and so on...My home PC is much more older, and my code finished processing on a certain file in about 20 minutes. When I tried the same code, the same file, on the brand new office PC, i realized it would take 18 hours!!!!!!!! I was just lost, why?
The algorithms were working on binary files, reading and writing data.  When I checked the Task Manager, I saw that my home PC's CPU working around 90%, but the office PC (the brand new) had maximum 10% CPU usage! I do not understand...
 
 After experiancing such a problems, i optimalized my code by using the algorithm on data in memory instead of the hard disk. The running time is now 2 minutes on my home PC, and about 6-8 minutes on the new office PC.
Everything else is normal with the office PC, any other softwere working fast and fine...
 
I also saw a difference in the behaviour, when I put a block like this in the code:
 
 
for (i=3; i<szamlalo; i+=2)
  {
   
     shift = (indextomb[i+1] - indextomb[2]) - (int) ( (indextomb[i+1] - indextomb[2])/k + 0.5);
   
   
   for (j=indextomb[i]+1 ; j<indextomb[i+1]; j++ )
   
   {
       
    adattomb1[j-shift] += adattomb2[j];
    
   } 
   
  
    csucsindexekszama+= -2;
  
    SetCtrlVal (panelHandle, PANEL_NUMERIC_2, csucsindexekszama);  
  ProcessDrawEvents();
  
  }
On my home PC, the last two commands works just fine, i can see a counter counting back on the UIR.
 But on the office PC, the counter just doesnt do anything, i cannot see any change on the UIR. So strange behaviour.
 
There is LabWindows8.0 on both PC installed.
 
If anybody has an idea what the problem is, or even if just an idea how way we should go in order to find it out,
Thank you very much!
 
 
                  Andras Bukki-Deme  
0 Kudos
Message 1 of 3
(3,030 Views)
hello andras,

i tried to reproduce the behaviour. when i paste your code snippet to a CVI application, it seems to run without problems.

did you try to install the CVI 8.0.1 patch?

regards,

robert h
NI germany
0 Kudos
Message 2 of 3
(2,988 Views)
Hi!

Thank you for the advice, I will try it.
Regards,

 András
0 Kudos
Message 3 of 3
(2,984 Views)