Software Archive
Read-only legacy content

Wrong answer

Intel_C_Intel
Employee
221 Views
In executing this section of code in DVF 6.5A an incorrect answer is calculated for "q.efg(i).pos.e." I set a breakpoint at this line. Before pressing the F11 key to step into this statemnet, the values of the affected variables displayed in the watch window were:

	i =1 
	q,n_of_vectors = 1 
	q.step = 0.500000000 
	q.efg(i).pos.e = 1571.38499309947 
	q.prior_efg(i).pos.e = 1571.38499309947 
	q.prior_efg(i).vel.e = 3.97531397560359 
	a1(i).e = -2.1438381921103193E-003 


After pressing the F11 key to step into the statement, the
value of "q.efg(i).pos.e" changes to 0.993761498957395. When running the same program in DVF 5.0A the value of "q.efg(i).pos.e" is calculated as 1572.37865459843. Using a calculator out to the sixth decimal place the answer is 1572.378888.

             do 230 i=1, q.n_of_vectors 
                q.efg(i).pos.e  
     +                 =q.prior_efg(i).pos.e 
     +                 +(q.step/2.0d0)*q.prior_efg(i).vel.e 
     +                 +(q.step*q.step/8.0d0)*a1(i).e 
                q.efg(i).vel.e  
     +                 =q.prior_efg(i).vel.e 
     +                 +(q.step/2.0d0)*a1(i).e          
                q.efg(i).pos.f  
     +                 =q.prior_efg(i).pos.f 
     +                 +(q.step/2.0d0)*q.prior_efg(i).vel.f 
     +                 +(q.step*q.step/8.0d0)*a1(i).f 
                q.efg(i).vel.f 
     +                 =q.prior_efg(i).vel.f 
     +                 +(q.step/2.0d0)*a1(i).f          
                q.efg(i).pos.g 
     +                 =q.prior_efg(i).pos.g 
     +                 +(q.step/2.0d0)*q.prior_efg(i).vel.g 
     +                 +(q.step*q.step/8.0d0)*a1(i).g 
                q.efg(i).vel.g 
     +                 =q.prior_efg(i).vel.g 
     +                 +(q.step/2.0d0)*a1(i).g          
230          continue 


These are the compiler options I am using in the debug mode.

/check:bounds /check:power /check:overflow /check:underflow
/compile_only /debug:full /nologo /real_size:64 /traceback
/warn:argument_checking /warn:nofileopt /module:"Debug
/" /object:"Debug/" /pdbfile:"Debug
/DF60.PDB" /alignment

Can anyone help me solve this problem? Is there any other information that I could provide to help someone solve the problem? The only thing I know about compilers is how to spell it.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
221 Views
I suggest sending a copy of your project as a ZIP archive, including everything necessary to reproduce the problem, to us at vf-support@compaq.com

Steve
0 Kudos
Reply