{"action":"created","issue":{"url":"https://api.github.com/repos/BenThelen/python-refprop/issues/11","labels_url":"https://api.github.com/repos/BenThelen/python-refprop/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/BenThelen/python-refprop/issues/11/comments","events_url":"https://api.github.com/repos/BenThelen/python-refprop/issues/11/events","html_url":"https://github.com/BenThelen/python-refprop/issues/11","id":55880581,"number":11,"title":"A problem with Jowr's librefprop.so","user":{"login":"chengdi123000","id":10754664,"avatar_url":"https://avatars.githubusercontent.com/u/10754664?v=3","gravatar_id":"","url":"https://api.github.com/users/chengdi123000","html_url":"https://github.com/chengdi123000","followers_url":"https://api.github.com/users/chengdi123000/followers","following_url":"https://api.github.com/users/chengdi123000/following{/other_user}","gists_url":"https://api.github.com/users/chengdi123000/gists{/gist_id}","starred_url":"https://api.github.com/users/chengdi123000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chengdi123000/subscriptions","organizations_url":"https://api.github.com/users/chengdi123000/orgs","repos_url":"https://api.github.com/users/chengdi123000/repos","events_url":"https://api.github.com/users/chengdi123000/events{/privacy}","received_events_url":"https://api.github.com/users/chengdi123000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-29T10:16:09Z","updated_at":"2015-01-30T07:52:57Z","closed_at":null,"body":"platform:\r\n```\r\nUbuntu server 64bit 14.04\r\ngcc 4.8.2\r\ngfortran 4.8.2\r\nrefprop 9.0\r\nlibrefprop.so v0.2\r\npython 2.7.6\r\n```\r\ncompiled with a lot of warnings but test successfully with the *pyrp.py* in librefprop.so v0.2. And the librefprop.so and fluids/mixtures folder were located in /opt/refprop/ by defaut.\r\n\r\nSo I have to modify the refprop.py at line 97:\r\n```\r\n  97 _fpath = u'/opt/refprop/'\r\n```\r\nand run the test by:\r\n```\r\npython -c \"import rptest;rptest.settest('refprop')\"\r\n```\r\nand the output is \r\n```\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"rptest.py\", line 22, in settest\r\n    _maintest(rp)\r\n  File \"rptest.py\", line 32, in _maintest\r\n    if rp.test(): #if True; rptest =>>for testing purpose\r\n  File \"refprop.py\", line 921, in test\r\n    prop = setup(u'def', u'air')\r\n  File \"refprop.py\", line 1688, in setup\r\n    return _setmix(mix, hrf, hfmix)\r\n  File \"refprop.py\", line 1957, in _setmix\r\n    _rpsetmix_(byref(_hmxnme), byref(_hfmix), byref(_hrf), byref(_nc),\r\nNameError: global name '_rpsetmix_' is not defined\r\n```\r\nI used ipython load refprop.py and found that there is no _rpsetmix_ in the dict of refprop. I do not know what happened. I used ipython debugger to see what was defined in the process:\r\n```\r\nipdb> _\r\nDisplay all 210 possibilities? (y or n)\r\n_A                   _acf                 _dhdt_p              _hfld                _nc                  _seterrordebug       _tmax\r\n_Ar                  _b                   _dip                 _hfm                 _nc_rec              _setinputerrorcheck  _tmin\r\n_D                   _ba                  _dnadn               _hfmix               _nmxpar              _setktv_rec          _tnbpt\r\n_D1                  _beta                _dpdD                _hjt                 _nroot               _setmix              _ts\r\n_D2                  _betas               _dpdt                _hmix                _outputierrcheck     _setmod              _ttrp\r\n_D3                  _bs                  _e                   _hmodij              _p                   _setmod_pre_rec      _u\r\n_Dcrit               _c                   _eE                  _hmxnme              _p0                  _setmod_rec          _v\r\n_Dlbub               _ca                  _er                  _hmxrul              _p1                  _setref_rec          _vE\r\n_Dliq                _checksetupmodel     _eta                 _hn80                _p2                  _setup0              _var1\r\n_Dmax                _cp                  _f                   _hname               _p3                  _setup_rec           _var2\r\n_Dmin                _cpr                 _fij                 _hpth                _pbub                _setupprop           _w\r\n_Ds                  _cs                  _fixicomp            _hr                  _pcrit               _setwarning          _wliq\r\n_Dvap                _csat                _fldext              _hrf                 _pdew                _sigma               _wmix\r\n_Dvdew               _cv                  _fluidextention      _htype               _pint                _spare1              _wmm\r\n_Fpv                 _cv2p                _fpath               _icomp               _pmax                _spare2              _ws\r\n_G                   _cvr                 _gE                  _ierr                _pr                  _spare3              _wvap\r\n_Gr                  _d                   _gerg04              _inputerrorcheck     _preos_rec           _spare4              _x\r\n_Rgas                _d2pdD2              _gerg04_pre_rec      _ixflag              _prop                _spht                _x0\r\n_Setuprecord         _dDdp                _gerg04_rec          _jcomp               _ps                  _sr                  _xbub\r\n_Z                   _dDdt                _h                   _k1                  _purefld_rec         _t                   _xdew\r\n__IPYTHON__          _dadn                _h0                  _k2                  _q                   _t0                  _xisenk\r\n__IPYTHON__active    _dbt                 _hE                  _k3                  _qkg                 _t1                  _xkappa\r\n__debug__            _dct                 _hbinp               _kguess              _routine             _t2                  _xkg\r\n__doc__              _dct2                _hcas                _kph                 _rp                  _t3                  _xkkt\r\n__file__             _de                  _hcite               _kq                  _s                   _tbub                _xkt\r\n__import__           _dhdD_p              _hcode               _kr                  _s0                  _tcrit               _xliq\r\n__name__             _dhdD_t              _hcomp               _ksat                _sE                  _tcx                 _xlkg\r\n__package__          _dhdp_D              _herr                _loadfile            _set                 _tdew                _xvap\r\n_aE                  _dhdp_t              _hfij                _maxcomps            _setaga_rec          _test                _xvkg\r\n_abfl2               _dhdt_D              _hfile               _name                _seterror            _thrott              _zcrit\r\n```\r\nThere is a *_setmix* but no global *_rpsetmix_*\r\n\r\nI am a windows user, not familiar with debugging in command line using ipdb. I think this might be helpful to find out what happened:\r\n```\r\nipdb> w\r\n  <ipython-input-9-c9e031ecf5c0>(1)<module>()\r\n----> 1 import rptest;rptest.settest('refprop')\r\n\r\n  /home/vagrant/refprop/python-refprop/python2.7/rptest.py(22)settest()\r\n     20     if test == u'refprop':\r\n     21         import refprop as rp\r\n---> 22         _maintest(rp)\r\n     23     elif test == u'multiRP':\r\n     24         import multiRP as rp\r\n\r\n  /home/vagrant/refprop/python-refprop/python2.7/rptest.py(32)_maintest()\r\n     30     rp.SetErrorDebug.off() #turn on =>> for testing purpose\r\n     31\r\n---> 32     if rp.test(): #if True; rptest =>>for testing purpose\r\n     33         print u'refprop installed correctely'\r\n     34\r\n\r\n  /home/vagrant/refprop/python-refprop/python2.7/refprop.py(921)test()\r\n    919\r\n    920     #test no. 1\r\n--> 921     prop = setup(u'def', u'air')\r\n    922     prop = wmol(prop[u'x'])\r\n    923     testresult += u'check molar mass of air'\r\n\r\n> /home/vagrant/refprop/python-refprop/python2.7/refprop.py(1688)setup()\r\n   1686         for item in listhfld:\r\n   1687             mix = unicode(item)\r\n-> 1688         return _setmix(mix, hrf, hfmix)\r\n   1689     else:\r\n   1690         if u'hmxnme' in _setupprop:\r\n\r\n  /home/vagrant/refprop/python-refprop/python2.7/refprop.py(1957)_setmix()\r\n   1955     _hrf.value = hrf.upper().encode(u'ascii')\r\n   1956\r\n-> 1957     _rpsetmix_(byref(_hmxnme), byref(_hfmix), byref(_hrf), byref(_nc),\r\n   1958                byref(_hfld), _x, byref(_ierr), byref(_herr), c_long(255),\r\n   1959                c_long(255), c_long(3), c_long(10000), c_long(255))\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/BenThelen/python-refprop/issues/comments/72166012","html_url":"https://github.com/BenThelen/python-refprop/issues/11#issuecomment-72166012","issue_url":"https://api.github.com/repos/BenThelen/python-refprop/issues/11","id":72166012,"user":{"login":"AndySchroder","id":4065710,"avatar_url":"https://avatars.githubusercontent.com/u/4065710?v=3","gravatar_id":"","url":"https://api.github.com/users/AndySchroder","html_url":"https://github.com/AndySchroder","followers_url":"https://api.github.com/users/AndySchroder/followers","following_url":"https://api.github.com/users/AndySchroder/following{/other_user}","gists_url":"https://api.github.com/users/AndySchroder/gists{/gist_id}","starred_url":"https://api.github.com/users/AndySchroder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndySchroder/subscriptions","organizations_url":"https://api.github.com/users/AndySchroder/orgs","repos_url":"https://api.github.com/users/AndySchroder/repos","events_url":"https://api.github.com/users/AndySchroder/events{/privacy}","received_events_url":"https://api.github.com/users/AndySchroder/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T07:52:57Z","updated_at":"2015-01-30T07:52:57Z","body":"Actually, I don't normally use multiRP, but I just ran the command you have listed above and I am getting the same error. That looks like a refprop bug/error and not a configuration error on your end. I have cases where refprop can not get a solution, but I'm not sure why the test program has a case selected that refprop doesn't work with. In cases where refprop has problems like this converging, it seems to me like it is usually sensitive to the independent variables that you choose. A workaround I usually use is to pre-populate some tables using other independent variable combinations (making the problem independent variable now a dependent variable while pre-populating) and then interpolate instead."}}