nirinA / erfa_python

Python wrapper for ERFA library
The Unlicense
6 stars 0 forks source link

3 failures in the post-installation tests #6

Open yanwang2012 opened 10 years ago

yanwang2012 commented 10 years ago

Hello nirinA,

I have installed the latest erfa_python following the instruction in the main page. The installation was quite smooth, however there are a few failures below, wish it helps in the development of erfa_python. Thanks.

-Yan

p.s. I am working with Fedora 14 32 bits, python 2.7, numpy 1.8.1, astropy 0.4.dev242. ++++++++++++++++ Ran 214 tests in 0.024s

FAILED (failures=3) Traceback (most recent call last): File "erfa_test.py", line 2588, in support.run_unittest(Validate) File "/usr/lib/python2.7/test/test_support.py", line 1055, in run_unittest _run_suite(suite) File "/usr/lib/python2.7/test/test_support.py", line 1038, in _run_suite raise TestFailed(err) test.test_support.TestFailed: multiple errors occurred

nirinA commented 10 years ago

hi Yan, thank you for the report. i cannot reproduce the failure on my platform: slackware64-current, python 2.7.7 will try on a 32-bit platform. the development of erfa_python is mainly done with Python-3.4, so maybe the failure is with the unitest version of Python 27; can you, please, try to run erfa_test.py by changing the last line:

support.run_unittest(Validate)

with

if __name__ == '__main__':
    unittest.main()

thanks,

nirinA

yanwang2012 commented 10 years ago

The error message is now as follows:

........................................................................F........................................................erfa_test.py:1597: Warning: year outside range(1000:3000) pv = erfa.plan94(2400000.5, -320000, 3)

..................................................................................FF.

FAIL: test_fad03 (main.Validate)

Traceback (most recent call last): File "erfa_test.py", line 1211, in test_fad03 self.assertAlmostEqual(d, 1.946709205396925672, 12) AssertionError: 1.9467092053976993 != 1.9467092053969257 within 12 places

FAIL: test_xys00a (main.Validate)

Traceback (most recent call last): File "erfa_test.py", line 2144, in test_xys00a self.assertAlmostEqual(y, 0.4020595661591500259e-4, places=17) AssertionError: 4.0205956615939944e-05 != 4.0205956615915e-05 within 17 places

FAIL: test_xys00b (main.Validate)

Traceback (most recent call last): File "erfa_test.py", line 2150, in test_xys00b self.assertAlmostEqual(y, 0.4020553681373720832e-4, places=16) AssertionError: 4.020553681381186e-05 != 4.0205536813737205e-05 within 16 places


Ran 214 tests in 0.019s

FAILED (failures=3)

On Fri, Jun 13, 2014 at 8:01 PM, Yan Wang yan.wang.fire@gmail.com wrote:

Thanks, nirinA! Now it runs without a problem. Yan

On Fri, Jun 13, 2014 at 6:53 PM, nirinA notifications@github.com wrote:

hi Yan, thank you for the report. i cannot reproduce the failure on my platform: slackware64-current, python 2.7.7 will try on a 32-bit platform. the development of erfa_python is mainly done with Python-3.4, so maybe the failure is with the unitest version of Python 27; can you, please, try to run erfa_test.py by changing the last line:

support.run_unittest(Validate)

with

if name == 'main': unittest.main()

thanks,

nirinA

— Reply to this email directly or view it on GitHub https://github.com/nirinA/erfa_python/issues/6#issuecomment-46071710.

nirinA commented 10 years ago

Yan, thanks a lot for testing. the first warning is expected, the last 3 are really errors. i think one reason of these errors is that you are running on 32-bits machine, but this is an acceptable argument for the 2nd error, which occurs within 17 digits, not for the fad03 function within 12 digits. i'll check further and let you know if those tests can be corrected. thanks again, nirinA

nirinA commented 10 years ago

Hello Yan, i ran erfa_test.py on a 32-bits platform and all tests passed.

root@beaglebone:~# python erfa_test.py 
................................................................................................................................./media/BoneExt4/erfa_python/erfa_test.py:1594: Warning: year outside range(1000:3000)
  pv = erfa.plan94(2400000.5, -320000, 3)
.....................................................................................
----------------------------------------------------------------------
Ran 214 tests in 0.501s

OK

the system is a BeagleBone Black:

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13 #1 SMP Mon May 20 17:07:58 CEST 2013 armv7l GNU/Linux
root@beaglebone:~# cat /proc/version
Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Mon May 20 17:07:58 CEST 2013

and the Python version is:

root@beaglebone:~# python -c "import sys; print sys.version"
2.7.3 (default, May 20 2013, 12:03:28) 
[GCC 4.7.3 20130205 (prerelease)]

what version of GCC and GLIBC are you using ?

nirinA

yanwang2012 commented 10 years ago

Hi nirinA,

Thanks!

$ uname -a Linux yan 2.6.35.14-106.fc14.i686 #1 SMP Wed Nov 23 13:57:33 UTC 2011 i686 i686 i386 GNU/Linux

$ cat /proc/version Linux version 2.6.35.14-106.fc14.i686 ( mockbuild@x86-01.phx2.fedoraproject.org) (gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) ) #1 SMP Wed Nov 23 13:57:33 UTC 2011

$ python -c "import sys; print sys.version" 2.7 (r27:82500, Sep 16 2010, 18:03:06) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)]

$ gcc --version gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)

$ ldd --version ldd (GNU libc) 2.13

Best, Yan

On Sat, Jun 14, 2014 at 12:28 AM, nirinA notifications@github.com wrote:

Hello Yan, i ran erfa_test.py on a 32-bits platform and all tests passed.

root@beaglebone:~# python erfa_test.py ................................................................................................................................./media/BoneExt4/erfa_python/erfa_test.py:1594: Warning: year outside range(1000:3000) pv = erfa.plan94(2400000.5, -320000, 3)

.....................................................................................

Ran 214 tests in 0.501s

OK

the system is a BeagleBone Black:

root@beaglebone:~# uname -a Linux beaglebone 3.8.13 #1 SMP Mon May 20 17:07:58 CEST 2013 armv7l GNU/Linux root@beaglebone:~# cat /proc/version Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Mon May 20 17:07:58 CEST 2013

and the Python version is:

root@beaglebone:~# python -c "import sys; print sys.version" 2.7.3 (default, May 20 2013, 12:03:28) [GCC 4.7.3 20130205 (prerelease)]

what version of GCC and GLIBC are you using ?

nirinA

— Reply to this email directly or view it on GitHub https://github.com/nirinA/erfa_python/issues/6#issuecomment-46079082.

nirinA commented 10 years ago

Hi Yan, the errors in erfa_test.py maybe from the GCC. newer version may internally use libquadmath, __float128 datatype on the C side, long long double on Python side, which cause the numerical result to differ, but that's just a guess. is it possible for you to compile Python and erfa_python with newer GCC version, say 4.7, to see if you still have these failures?

thanks, nirinA

dreamalligator commented 9 years ago

Hi, I similarly get the following.

erfa_test.py:1585: Warning: year outside range(1000:3000)
  pv = erfa.plan94(2400000.5, -320000, 3)

I have gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1).

nirinA commented 9 years ago

hi, this warning is expected, as the algorithm used by the function plan94 is only accurate in between the year 1000 and 3000 if you compare it with the result given by JPL ephemeris, for example; it is even preferable to use date between 1800 and 2050. but the test should pass. do you have other errors or only this warning? thanks for the report anyway and for your interest in erfa_python nirinA

dreamalligator commented 9 years ago

It was the only warning when running python erfa_test.py, thanks :)

nirinA commented 9 years ago

there is also a similar warning with the function epv00, and the result is really bad if you compute outside the year [1900:2100].