Skip to content

new installation, but don't pass the test #107

Open
@WuShichao

Description

============================= test session starts ==============================
platform linux2 -- Python 2.7.15, pytest-4.4.2, py-1.8.0, pluggy-0.11.0
rootdir: /home/nightwing
collected 266 items

anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/native/tests/test_cvode.py F [ 0%]
FFFFFFFFFFFFFFFFFFFxFFFFFFFFFFFF [ 12%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/native/tests/test_gsl.py F [ 12%]
FFFFFFFFFFFFFF [ 18%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/native/tests/test_odeint.py F [ 18%]
FFFFFFFFFFx [ 22%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/tests/test_core.py F [ 22%]
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFsssF [ 35%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/tests/test_plotting.py F [ 36%]
F [ 36%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/tests/test_results.py F [ 36%]
FF [ 37%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/tests/test_robertson.py F [ 37%]
FFFFFFFFF [ 41%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/tests/test_symbolic.py . [ 41%]
F.FFFFFFF.FFFFFF..FF....FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 68%]
FFFFFFFFFFFFFFFF.FFFFFF..FFFFF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.. [ 95%]
ssFF..FFF [ 99%]
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/tests/test_util.py F [ 99%]
. [100%]

=================================== FAILURES ===================================
________________________________ test_NativeSys ________________________________

(PS: too long to be put here.....)

== 241 failed, 18 passed, 5 skipped, 2 xfailed, 17 warnings in 75.23 seconds ===

Activity

bjodah

bjodah commented on May 13, 2019

@bjodah
Owner

Hi @WuShichao, thank you for reporting this.
What's the output of pytest --pyargs pyodesys -x?
Also for Python 2 I would probably recommend python2 -m pip install 'pyodesys<=0.12'
You can also look at https://github.com/bjodah/pyodesys/blob/master/scripts/environment/Dockerfile for an example of an environment which should pass all tests.

WuShichao

WuShichao commented on May 13, 2019

@WuShichao
Author

@bjodah So should I install sundials-2.7.0.tar.gz and boost_1_65_0.tar.bz2 first, and then 'python2 -m pip install 'pyodesys<=0.12'?

WuShichao

WuShichao commented on May 13, 2019

@WuShichao
Author

@bjodah the output of pytest --pyargs pyodesys -x
============================= test session starts ==============================
platform linux2 -- Python 2.7.15, pytest-4.4.2, py-1.8.0, pluggy-0.11.0
rootdir: /home/nightwing
collected 266 items

anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/native/tests/test_cvode.py F [ 0%]

=================================== FAILURES ===================================
________________________________ test_NativeSys ________________________________

@pytest.mark.veryslow
@requires('pycvodes')
def test_NativeSys():
  _test_NativeSys(NativeSys, integrator='cvode')

anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/native/tests/test_cvode.py:27:


anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/native/tests/_tests.py:21: in _test_NativeSys
native = NativeSys.from_callback(vdp_f, 2, 1)
anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/symbolic.py:443: in from_callback
exprs = _ensure_4args(rhs)(x, _y, _p, be)


func = <function vdp_f at 0x7fdba7807f50>

def _ensure_4args(func):
    """ Conditionally wrap function to ensure 4 input arguments

    Parameters
    ----------
    func: callable
        with two, three or four positional arguments

    Returns
    -------
    callable which possibly ignores 0, 1 or 2 positional arguments

    """
    if func is None:
        return None
    if isinstance(func, _Blessed):  # inspect on __call__ is a hassle...
        return func

    self_arg = 1 if inspect.ismethod(func) else 0
  args = inspect.getfullargspec(func)[0]

E AttributeError: 'module' object has no attribute 'getfullargspec'

anaconda3/envs/pyodesys/lib/python2.7/site-packages/pyodesys/util.py:139: AttributeError
=========================== 1 failed in 4.75 seconds ===========================

bjodah

bjodah commented on May 13, 2019

@bjodah
Owner

You can install sundials-3.2.1 if you're compiling from source. 2.7.0 should also work. (this is for pycvodes). Any recent boost version should do, again, if you're compiling from source I would go with latest (1.70.0). For GSL any recent version should do (say >2).

For python2 I would then recommend:

$ python2 -m pip install --upgrade "pyodeint>=0.9.8,<0.10.0" "pygslodeiv2>=0.8.4,<0.9.0" "pycvodes>=0.10.16,<0.11.0" "pycodeexport>=0.1.2,<0.2.0" "pycompilation>=0.4.3,<0.5.0" "pyodesys>=0.11.19,<0.12.0"

If you're using Python 3.5+ you should be able to install latest versions of everything.

WuShichao

WuShichao commented on May 13, 2019

@WuShichao
Author

@bjodah Thanks, so you mean if I don't install sundials/boost from source or apt-repo, pyodesys will not work?

bjodah

bjodah commented on May 13, 2019

@bjodah
Owner

pyodesys will work (with scipy backend), but the pyodesys.native subpackage require one or more of pycvodes/pygslodeiv2/pyodeint (each requiring sundials/GSL/boost respectively).

The pyodesys.native subpackage generates C++ code and compiles on the fly for fast integration of systems of modest size (say <100 variables).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      new installation, but don't pass the test · Issue #107 · bjodah/pyodesys