jowr / librefprop.so

Create a shared library from the Fortran sources provided by Refprop from NIST. This project provides an alternative to the refprop.dll that comes with the software. Please use the official instructions if possible

Home Page:https://github.com/usnistgov/REFPROP-cmake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anaconda

abahman opened this issue · comments

Hello,

I had REFPROP 9.0 working in CoolProp perfectly before I installed Anaconda to update CoolProp to v5.1.1.
The problem now is the compiler stops when it reaches any line calls REFPROP.
Any one can help me this matter ?

I'm using OSX 10.10.5
librefprop v0.2
Eclipse Lunar 4.4.2

? When you say compiler, do you mean python? Or is it really the
compilation that is failing? I'm on 10.10 and it compiled ok for me.
Error log?

On Wed, Sep 23, 2015 at 10:27 PM, Ammar Bahman notifications@github.com
wrote:

Hello,

I had REFPROP working in CoolProp perfectly before I installed Anaconda to
update CoolProp to v5.1.1.
The problem now is the compiler stops when it reaches any line calls
REFPROP.
Any one can help me this matter ?

I'm using Mac OS X 10.10.5
Eclipse Lunar 4.4.2


Reply to this email directly or view it on GitHub
#34.

Hello Ian,
I meant that the compilation stopped. No error messages.
I tried to change the path directory (lines 42 and 43) in the MAKEFILE and reinstall it, but nothing happened.
Did you use v0.2 ?

What version of REFPROP do you use?

On Wed, Sep 23, 2015 at 10:34 PM, Ammar Bahman notifications@github.com
wrote:

Hello Ian,
I meant that the compilation stopped. No error messages.
I tried to change the directory in the MAKE file and reinstall it, but
nothing happened.
Did you use v0.2 ?


Reply to this email directly or view it on GitHub
#34 (comment).

Ok. When I tried to run through Terminal I got the following message:

Segmentation fault: 11

Update:
I tried to make uninstall and reinstall libreprop again. I managed to get the following error message:

Good news: It is possible to use REFPROP on your system! However, the library 
could not be loaded. Please make sure that REFPROP is available on your system.

Neither found in current location nor found in system PATH.
If you already obtained a copy of REFPROP from http://www.nist.gov/srd/, 
add location of REFPROP to the PATH environment variable or your library path.

In case you do not use Windows, have a look at https://github.com/jowr/librefprop.so 
to find instructions on how to compile your own version of the REFPROP library.


Traceback (most recent call last):
  File "/Users/ammarbahman/Desktop/Test/PathCheck.py", line 70, in <module>
    print 'Temp of Water at 101.325 kPa is: ',CoolProp.CoolProp.PropsSI('T','P',101325,'Q',0,'REFPROP::Water'), 'K'
  File "CoolProp/CoolProp.pyx", line 216, in CoolProp.CoolProp.PropsSI (CoolProp/CoolProp.cpp:25933)
  File "CoolProp/CoolProp.pyx", line 296, in CoolProp.CoolProp.PropsSI (CoolProp/CoolProp.cpp:25734)
  File "CoolProp/CoolProp.pyx", line 185, in CoolProp.CoolProp.__Props_err2 (CoolProp/CoolProp.cpp:24059)
ValueError: Initialize failed for backend: "REFPROP", fluid: "Water" fractions "[ 1.0000000000 ]"; error: You cannot use the REFPROPMixtureBackend. : PropsSI("T","P",101325,"Q",0,"REFPROP::Water")

Update:
While playing around, I figured out that when I switched back the Python interpreter (in Eclipse) to the original directory (/usr/bin/python), everything works fine!
screen shot 2015-09-24 at 23 37 14

Maybe one is 32bit and the other is 64 bit? Though that doesn't make a lot
of sense on osx 10.10, where both should be 64 but
On Sep 24, 2015 9:40 PM, "Ammar Bahman" notifications@github.com wrote:

Update:
While playing around, I figured out that when I switched back the Python
interpreter (in Eclipse) to the original directory (/usr/bin/python),
everything works fine!
[image: screen shot 2015-09-24 at 23 37 14]
https://cloud.githubusercontent.com/assets/11583412/10092537/84985f1a-6315-11e5-95fd-466832a8928b.png


Reply to this email directly or view it on GitHub
#34 (comment).

Probably an issue with something in eclipse. Path setup or something.
Make sure the script runs outside of eclipse with both python versions
On Sep 24, 2015 9:42 PM, "Ian Bell" ian.h.bell@gmail.com wrote:

Maybe one is 32bit and the other is 64 bit? Though that doesn't make a
lot of sense on osx 10.10, where both should be 64 but
On Sep 24, 2015 9:40 PM, "Ammar Bahman" notifications@github.com wrote:

Update:
While playing around, I figured out that when I switched back the Python
interpreter (in Eclipse) to the original directory (/usr/bin/python),
everything works fine!
[image: screen shot 2015-09-24 at 23 37 14]
https://cloud.githubusercontent.com/assets/11583412/10092537/84985f1a-6315-11e5-95fd-466832a8928b.png


Reply to this email directly or view it on GitHub
#34 (comment).

Well, both directories have the latest python version.
Does the version of CoolProp has anything to do with it? (/usr/bin/python has CoolProp v5.0.8)
screen shot 2015-09-24 at 23 50 01

It shouldn't. I use the anaconda python with up to date CoolProp
On Sep 24, 2015 9:53 PM, "Ammar Bahman" notifications@github.com wrote:

Well, both directories have the latest python version.
Does the version of CoolProp has anything to do with it? (/usr/bin/python
has CoolProp v5.0.8)
[image: screen shot 2015-09-24 at 23 50 01]
https://cloud.githubusercontent.com/assets/11583412/10092676/21c8d5b6-6317-11e5-907c-787f861c9a9e.png


Reply to this email directly or view it on GitHub
#34 (comment).

Could it be that I had the REFPROP files in the wrong directory path!? Could you please tell me which line should I change in MAKEFILE of librefprop (since I'm having REFPROP v9.0, I'm using librefprop v0.2)

It may be an environment definition problem, maybe. Is the REFPROP binary found, to start with, from inside the anaconda environment?

Speredenn,
Yes, it is. It is a segmentation error because I have REFPROP v9.0 and need to update to v9.1. I found it out here (no.2 ): https://github.com/CoolProp/CoolProp/blob/master/FAQ.md
I noticed that CoolProp v5.0.8 still work fine with REFPROPv9.0, but v5.1.1 does not.
I think there is no other way but to update to v9.1.

@bo3mrh: @ibell is the best guy around there to tell you if there is a way or not - noboby knows CoolProp internals better than he does ;-). IMO, there is no other way, however.