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
https://github.com/usnistgov/REFPROP-cmake
33 stars 8 forks source link

Matlab Integration #33

Closed jaabarreto closed 9 years ago

jaabarreto commented 9 years ago

While using the matlab I got this error when I call the test.m file, I'm working on 64 bit MacOSx

Error using loadlibrary (line 440) Not enough input arguments. Error in ==>rp_proto64 at 10 There was an error running /opt/refprop/rp_proto64.m. Run rp_proto64 from the command line to reproduce the error and fix it.

Error in refpropm (line 242) [notfound,warnings]=loadlibrary(strcat(BasePath,dllName),prototype,'alias',libName);

Error in test (line 2) Tp=refpropm('T','C',0,' ',0,'water');

Error in run (line 63) evalin('caller', [script ';']);

Caused by: Error using rp_proto64 (line 10) Not enough input arguments.

ibell commented 9 years ago

What version of MATLAB? @jowr is not available for a while - perhaps I can help you.

On Fri, Aug 28, 2015 at 10:10 AM, Jorge Barreto notifications@github.com wrote:

While using the matlab I got this error when I call the test.m file, I'm working on 64 bit MacOSx

Error using loadlibrary (line 440) Not enough input arguments. Error in ==>rp_proto64 at 10 There was an error running /opt/refprop/rp_proto64.m. Run rp_proto64 from the command line to reproduce the error and fix it.

Error in refpropm (line 242)

[notfound,warnings]=loadlibrary(strcat(BasePath,dllName),prototype,'alias',libName);

Error in test (line 2) Tp=refpropm('T','C',0,' ',0,'water');

Error in run (line 63) evalin('caller', [script ';']);

Caused by: Error using rp_proto64 (line 10) Not enough input arguments.

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33.

jaabarreto commented 9 years ago

R2014b

ibell commented 9 years ago

What is in line 10 of rp_proto64? I don't have access to this system configuration to test on my side.

On Fri, Aug 28, 2015 at 10:12 AM, Jorge Barreto notifications@github.com wrote:

R2014b

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135821916.

jaabarreto commented 9 years ago

ThunkLibName=fullfile(basePath,'librefprop_thunk_maci64');

ibell commented 9 years ago

Do you have that file (librefprop_thunk_maci64) somewhere on your computer?

On Fri, Aug 28, 2015 at 11:21 AM, Jorge Barreto notifications@github.com wrote:

ThunkLibName=fullfile(basePath,'librefprop_thunk_maci64');

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135837955.

jaabarreto commented 9 years ago

Yes, I have the .dylib file

ibell commented 9 years ago

Where is that dylib file located?

On Fri, Aug 28, 2015 at 11:34 AM, Jorge Barreto notifications@github.com wrote:

Yes, I have the .dylib file

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135840509.

ibell commented 9 years ago

Also, can you please run:

otool -L /path/to/dylib

and report the output?

On Fri, Aug 28, 2015 at 11:45 AM, Ian Bell ian.h.bell@gmail.com wrote:

Where is that dylib file located?

On Fri, Aug 28, 2015 at 11:34 AM, Jorge Barreto notifications@github.com wrote:

Yes, I have the .dylib file

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135840509.

jaabarreto commented 9 years ago

At /opt/refprop

No dia 28/08/2015, às 18:46, Ian Bell notifications@github.com escreveu:

Where is that dylib file located?

On Fri, Aug 28, 2015 at 11:34 AM, Jorge Barreto notifications@github.com wrote:

Yes, I have the .dylib file

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135840509.

— Reply to this email directly or view it on GitHub.

ibell commented 9 years ago

Can you please email me your rp_proto64 to ian.bell@nist.gov?

On Fri, Aug 28, 2015 at 11:51 AM, Jorge Barreto notifications@github.com wrote:

At /opt/refprop

Jorge André Barreto jorgeandrebarreto@gmail.com

No dia 28/08/2015, às 18:46, Ian Bell notifications@github.com escreveu:

Where is that dylib file located?

On Fri, Aug 28, 2015 at 11:34 AM, Jorge Barreto < notifications@github.com> wrote:

Yes, I have the .dylib file

— Reply to this email directly or view it on GitHub < https://github.com/jowr/librefprop.so/issues/33#issuecomment-135840509>.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135844681.

jaabarreto commented 9 years ago

yes.

jaabarreto commented 9 years ago

Which directory I have to run the 'otool -L /path/to/dylib'?

ibell commented 9 years ago

How about this: otool -L /opt/refprop/librefprop.so ?

On Fri, Aug 28, 2015 at 12:30 PM, Jorge Barreto notifications@github.com wrote:

Which directory I have to run the 'otool -L /path/to/dylib'?

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135854838.

jaabarreto commented 9 years ago

/opt/refprop/librefprop.dylib: /home/jorgebarreto1/lib/librefprop.9.1.dylib (compatibility version 9.1.0, current version 9.1.0) /usr/local/lib/gcc/5/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

ibell commented 9 years ago

Hmm... that all seems ok as far as I see...

On Fri, Aug 28, 2015 at 12:33 PM, Jorge Barreto notifications@github.com wrote:

/opt/refprop/librefprop.dylib: /home/jorgebarreto1/lib/librefprop.9.1.dylib (compatibility version 9.1.0, current version 9.1.0) /usr/local/lib/gcc/5/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

— Reply to this email directly or view it on GitHub https://github.com/jowr/librefprop.so/issues/33#issuecomment-135855347.

jaabarreto commented 9 years ago

Problem solved, I had to change some directories rproto and refprop.m and placed all the files on HOME/Documents/matlab...even with the dylib file (soft link) and the thunk.dylib