bugrelax - Bugs: bug #20821, Optimisation failure / round error...

 
 
Show feedback again

bug #20821: Optimisation failure / round error on windows 64 bit

Submitted by:  Troels E. Linnet <tlinnet>
Submitted on:  Thu 16 May 2013 10:04:27 PM UTC  
 
Category: Test suiteSpecific analysis category: None
Priority: 5 - NormalSeverity: 3 - Normal
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: Repository: trunkOperating System: All systems

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 20 Jun 2013 02:57:56 PM UTC, comment #7:

As mentioned, this bug is upstream in the WinPython software.

Edward d Auvergne <bugman>
Project Administrator
Thu 20 Jun 2013 02:51:03 PM UTC, comment #6:

Closing of bug #20821: (https://gna.org/bugs/?20821) Optimisation failure / round error on windows 64 bit

This bug should be closed, since the precision problem is due to the Python 64 bit version, winpython 2.7.5.1, on windows.

An installation with 32 bit, showed no Optimisation failure / round error on windows.

It is unknown why this occurs.

Troels E. Linnet <tlinnet>
Project Member
Thu 20 Jun 2013 07:18:23 AM UTC, comment #5:

Reply to bug #20821: (https://gna.org/bugs/?20821) Optimisation failure / round error on windows 64 bit

I experienced more precision problems.

I had a terrible need, to turn down precision, quite a lot.

So much, that I think something is wrong with the MS
Visual Studio Express """ Professional """ 64 bit compilation.

- self.assertAlmostEqual(spin.s2, s2, msg=mesg)
+ self.assertAlmostEqual(spin.s2, s2, places=6, msg=mesg)

- self.assertAlmostEqual(spin.te / 1e-12, te, 5, msg=mesg)
+ self.assertAlmostEqual(spin.te / 1e-12, te, places=1, msg=mesg)

- self.assertAlmostEqual(spin.rex * (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2, rex * (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2, msg=mesg)
+ self.assertAlmostEqual(spin.rex * (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2, rex * (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2, places=4, msg=mesg)

# Optimisation values.
s2 = 0.9699999999999995
te = 2048.000000000022283
rex = 0.14900000000000566 / (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2

My value
# s2: 0.9700002183674102 : Diff -2.18367410709e-07
# te: 2048.015293187 Diff: -0.0152931869779
# rex: 0.14899473115727899 Diff: 5.26884272667e-06

# 64-bit Windows 7 (https://gna.org/bugs/?20821).
# System: Windows
# Release: 7
# Version: 6.1.7601
# Architecture: 64bit WindowsPE
# Machine: AMD64
# Processor: Intel64 Family 6 Model 37 Stepping 2, GenuineIntel
# Python version: 2.7.5
# numpy version: 1.7.1
# Compilation: Visual Studio Express 2012, Professional, for 64 bit compilation
# s2: 0.9700002183674102
# te: 2048.015293187
# rex: 0.14899473115727899
# chi2: 2.3195994119090742e-10
# iter: 116
# f_count: 411
# g_count: 411
# h_count: 0
# warning: None

(file #18123)

Troels E. Linnet <tlinnet>
Project Member
Wed 19 Jun 2013 06:02:59 PM UTC, comment #4:

Just a small suggestion. In the patch there is a lot of whitespace removal from already existing lines of code. This should be in a separate patch as it's not related to fixing the bug. Apart from that, the fix is perfect.

Edward d Auvergne <bugman>
Project Administrator
Wed 19 Jun 2013 05:45:57 PM UTC, comment #3:

Fix for bug #20821: (https://gna.org/bugs/?20821) Optimisation failure / round error on windows 64 bit
For 64-bit Windows 7, with Compilation: Visual Studio Express 2012, Professional, for 64 bit compilation, the precision needed to be decreased by one decimal in the function: test_opt_constr_cd_mt_S2_0_970_te_2048_Rex_0_149 in C:\WinPython27\relax_disp\test_suite\system_tests\model_free.py", line 1762.

Patch attached with comments on machine precission

The correction was:
# S2 order parameter.
if s2 != None:
- self.assertAlmostEqual(spin.s2, s2, msg=mesg)
+ self.assertAlmostEqual(spin.s2, s2, places=6, msg=mesg)

(file #18121)

Troels E. Linnet <tlinnet>
Project Member
Wed 19 Jun 2013 05:42:12 PM UTC, comment #2:

Fix for bug #20821: (https://gna.org/bugs/?20821) Optimisation failure / round error on windows 64 bit

For 64-bit Windows 7, with Compilation: Visual Studio Express 2012, Professional, for 64 bit compilation, the precision needed to be decreased by one decimal in the function: test_opt_constr_cd_mt_S2_0_970_te_2048_Rex_0_149 in C:\WinPython27\relax_disp\test_suite\system_tests\model_free.py", line 1762.

Patch attached

The correction was:
# S2 order parameter.
if s2 != None:
- self.assertAlmostEqual(spin.s2, s2, msg=mesg)
+ self.assertAlmostEqual(spin.s2, s2, places=6, msg=mesg)

(file #18120)

Troels E. Linnet <tlinnet>
Project Member
Tue 18 Jun 2013 04:04:41 PM UTC, comment #1:

It seems from the log file, that the precision on the windows compiled system is bad.

The true value should be:
S2=0.970, te=2048, Rex=0.149

Windows compiled minimise to: s2 0.9700002183674102
which is bad.

But, I don't know where to start?
Is it something with the compilation?
This is 64 bit compiled, and not 32 bit compiled.

Log file is provided.

(file #18115)

Troels E. Linnet <tlinnet>
Project Member
Thu 16 May 2013 10:04:27 PM UTC, original submission:

AssertionError: Optimisation failure

relax trunk, checkout r19694.

Compiled on Windows 64 bit, with MSVS 2012 Professional (64 bit compilation).
Compiled with WinPython 2.7.4.1, 64bit, scons 2.3, bmrblib-1.0.2, minfx-1.0.4

System: Windows
Release: 7
Version: 6.1.7601
Win32 version: 7 6.1.7601 SP1 Multiprocessor Free
Distribution:
Architecture: 64bit WindowsPE
Machine: AMD64
Processor: Intel64 Family 6 Model 37 Stepping 2, GenuineIntel
Python version: 2.7.4
Numpy version: 1.7.1
Libc version:

-------------

-- Error message
Storing the optimisation results for the spin ':ALA@N', the optimised chi-squared value is lower than the current value (2.31959941191e-10 < None).
spin.s2 0.970000218367
s2 0.970000000022
round 7 2e-07
Traceback (most recent call last):
File "test_suite\system_tests\model_free.py", line 1761, in test_opt_constr_cd_mt_S2_0_970_te_2048_Rex_0_149
self.value_test(spin, select=select, s2=s2, te=te, rex=rex, chi2=chi2)
File "test_suite\system_tests\model_free.py", line 3128, in value_test
self.assertAlmostEqual(spin.te / 1e-12, te, 5, msg=mesg)
AssertionError: Optimisation failure.

Troels E. Linnet <tlinnet>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #18123:  patch3 added by tlinnet (2kB - application/octet-stream)
file #18121:  patch2 added by tlinnet (17kB - application/octet-stream)
file #18120:  patch1 added by tlinnet (16kB - application/octet-stream)
file #17972:  relax64_test-suite_v4.txt added by tlinnet (18kB - text/plain - Attach of logfile from test-suite)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bugman (Updated the item)
  • -unavailable- added by tlinnet (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Jun 2013 02:57:56 PM UTCbugmanStatusConfirmed=>Wont Fix
      Open/ClosedOpen=>Closed
    Thu 20 Jun 2013 07:18:23 AM UTCtlinnetAttached File-=>Added patch3, #18123
    Wed 19 Jun 2013 05:45:57 PM UTCtlinnetAttached File-=>Added patch2, #18121
    Wed 19 Jun 2013 05:42:12 PM UTCtlinnetAttached File-=>Added patch1, #18120
    Tue 18 Jun 2013 04:04:41 PM UTCtlinnetAttached File-=>Added 20130618_relax_disp_testsuite.txt, #18115
    Fri 17 May 2013 08:11:19 AM UTCbugmanStatusNone=>Confirmed
      Operating SystemMicrosoft Windows=>All systems
    Thu 16 May 2013 10:04:27 PM UTCtlinnetAttached File-=>Added relax64_test-suite_v4.txt, #17972
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup