Giter Site home page Giter Site logo

jowr / librefprop.so Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 8.0 303 KB

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

Shell 7.82% MATLAB 0.15% Python 78.49% Smarty 2.15% Fortran 1.40% Makefile 9.98%

librefprop.so's People

Contributors

heineken avatar ibell avatar jowr avatar nkampy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librefprop.so's Issues

El Cap librefprop issues

Hey all,
I just made the mistake of updating the El Cap to find refprop no longer functional in my python codes. I was using librefprop on yosemite and it was working great.

When I try to run the code that used to work I get this error
"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."

At first I thought it was that I needed to re-install java. I did that.

Next I reinstalled gfortran and command line tools.

Finally I tried to reinstall librefprop and ran into this error when I get to the sudo make install step

*** No rule to make target fortran/PASS_FTN.FOR', needed bysrc/PASS_FTN_ALT.f'. Stop.

I am not sure whats up, but I am really regretting updating... any advice would be helpful.

[Equation of state limits]

Problem:

I was trying to increase the temperature limit of the transport equations (viscosity) from 1350.0 K to 2000.0 K (for water).

For the purpose, I followed the procedure from: NIST-LFAQ

In brief, I (1) opened the the WATER.FLD file and (2) modified the corresponding upper temperature limit under the banner #ETA. As the changes were accounted for in Refprop: Substance/Fluid Information as in Excel, the range was not increased for Matlab.

Interestingly, if I change the temperature limit of the #EOS, changes are taken into account in Refprop, Excel and Matlab. Therefore it is not a compilation issue but maybe Matlab reads the limit somewhere else... Does anybody have an idea how to solve this?

Have a nice day,

Tonkiplis

Systems:

Refprop v9.1
Windows 7
Matlab R2012a
Excel 2010

and

Refprop v9.1
MAC OS X 10.8.5
Matlab R2011

Anaconda

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

Intel-style exports for REFPROP

Hey @jowr, is it possible to export the symbols in the dynamic library in the same way that is used in the windows REFPROP DLL? That would allow us to use the REFPROP dylib on OSX more or less natively with the refpropm MATLAB file available from the REFPROP FAQ.

Make clean command

oh no! In working with your code, I realized that this post was completely in error. You included a make clean command, I just didn't see it right away. Since then I haven't found any problems using it. =)

Compile Erorr

I am having trouble compiling. I get this error:

make: *** No rule to make target fortran/PASS_FTN.FOR', needed by src/PASS_FTN_ALT.f'. Stop.

This is in response to a simple make command. Any advice?

Thanks,

Kevin

9.11 additional functions clash

In version 9.11 of REFPROP, the additional functions that are included in src/PASS_FTN_ALT.f are no longer needed since they are provided in REFPROP itself. Not sure how best to fix this, but I "fixed" it by commenting out these functions in src/PASS_FTN_ALT.f. Fun times.

Matlab Integration

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.

Build still fails on OSX

When I try to build I get lots of warnings along the lines of

Warning: Obsolescent feature: Old-style character length at (1)
COMMONS.for:361.17:
    Included at src/PASS_FTN_ALT.for:1344:

      character*3 hagasv                                                
                 1

and then it fails with

make: *** No rule to make target `fortran/SETUP.o', needed by `bin/librefprop.dylib'.  Stop.

Make error,

I regularly get (and cannot build beyond) a problem when building the library:

make: *** No rule to make target 'fortran/COMMON.for', needed by 'src/PASS_FTN_ALT.for'.  Stop.

[Fortran libraries on mac OS X 10.8.5 and linked with Matlab 64 bits]

Fortran

So I managed quite easily to compile the fortran libraries on : Mac OS X 10.8.5.

The important features of my system are:

  • X-Code 5.1.1 with its command-line developer tool
  • gcc: Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4 svn)
  • gfortran : 4.8.1

and I followed the installation instructions indicated on : https://github.com/jowr/librefprop.so
everything worked fine until I called make fortest (in order to test the installation), the logs I got are :

make fortest
%-----------------------------
gfortran -O3 -ffast-math -fPIC -g -o ./src/ex_mix.o -c ./src/ex_mix.for
gfortran -g -o ./bin/ex_mix_for ./src/ex_mix.o -lrefprop -lgfortran
Undefined symbols for architecture x86_64:
"start", referenced from:
-u command line option
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: [bin/ex_mix_for] Error 1

%-----------------------------

To make it work, I had to change it to:

%-----------------------------
gfortran -O3 -ffast-math -fPIC -g -o ./src/ex_mix.o -c ./src/ex_mix.for
gfortran -g -o ./bin/ex_mix_for ./src/ex_mix.o -lrefprop -lgfortran -lcrt1.o
%-----------------------------
Note: This can be done directly in the Makefile in the line 336.

and then it compiled properly. I don't know exactly why, I found on the web it has to do with some static libraries which are not linked without this option, but I am not a specialist....
Afterward I could execute ./bin/ex_mix_for without any problem.

I hope this can help some users of Mac OS...

Matlab

Then, I wanted to get the Integration with Matlab
For sake of completeness I have a 64 bit installation (MATLAB_R2011a).
I performed the steps as indicated on: https://github.com/jowr/librefprop.so

  1. The first step of the manual work (as indicated during the make matlab) went w/o problem.
  2. Then the second step:

Open Matlab, and run: "cd /Users/thierrymeier/Documents/MATLAB/PhD/refProp9.1/librefprop.so-master/matlab;"
"run('thunk.m');"
proceed by pressing ENTER.

 _rm matlab/refpropm.m.org matlab/rp_proto64.m.org_

There I had a problem while running thunk.m, as I currently have two gcc compiler installed ( Apple LLVM version 5.1 and gcc4.8.1) but none of them correspond exactly to gcc-4.2. Thus I created a symlink:

sudo ln -s /usr/bin/gcc /usr/bin/gcc4.2

and it worked (I know its a little bit brute force but as a first shot...).

  1. I ran the sudo make matlab-install and the matlab function and the libraries were successfully copied in /opt/refprop as expected.
  2. running path(path, '/opt/refprop') permits to have a system wide use of the refprop functions.
  3. As I run test.m the refpropm function is called and Matlab crashes.... The log I get:

%-----------------------------
Process: MATLAB [2368]
Path: /Applications/MATLAB_R2011a.app/Contents/MacOS/StartMATLAB
Identifier: com.mathworks.matlab
Version: MATLAB Release 2011a (2.1)
Code Type: X86-64 (Native)
Parent Process: launchd [127]
User ID: 501

Date/Time: 2015-04-22 12:05:40.073 +0200
OS Version: Mac OS X 10.8.5 (12F2518)
Report Version: 10

Interval Since Last Report: 149802 sec
Crashes Since Last Report: 4
Per-App Interval Since Last Report: 14710 sec
Per-App Crashes Since Last Report: 3
Anonymous UUID: 0FA54308-2534-36FE-FC59-4636403F2392

Crashed Thread: 3

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

_Dyld Error Message:
Symbol not found: _gfortran_transfer_character_write
Referenced from: /opt/refprop/librefprop.dylib
Expected in: /Applications/MATLAB_R2011a.app/sys/os/maci64/libgfortran.3.dylib

%-----------------------------

suggests a problem with the dylib library. To overcome it, I read the thread on w3.mathworks.com (here) where Nathan suggest to rename the DYLIB fil in the MATLAB application directory and create a symlink with the one located in /usr/local/lib:
ln -s /usr/local/lib/libgfortran.3.dylib /Applications/MATLAB_R2011a.app/sys/os/maci64/libgfortran.3.dylib

and then everything works. I hope this can help some users of Mac OS...
I am not sure whether it is the nicest solution to do it, but who cares?

Cheers,

Tonkiplis

Errors Compiling on OS X Yosemite

Hi Guys,

Happy Holidays to you!

I have the latest Command line tools, HPC gfortran, and a licensed version of REFPROP 9.1 source code. When i tried to compile librefprop my initial problem was with this error -> clang: error: unknown argument: '-mpreferred-stack-boundary=8'. I'm not sure what affect that would have with or without it. So, i commented it out for the time being. After, the next attempt I now get the following 'warning/error'

clang: warning: argument unused during compilation: '-fbounds-check'
fortran/UTILITY.c:8:10: fatal error: 'fcrt.h' file not found

include <fcrt.h>

I've checked my system thoroughly and cannot find this file. Any ideas, insight, education would be helpful.

Regards

William

ref prop 2310 compile error

I receive the following error when running make with the v10 of refprop.

ld: 77 duplicate symbols for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [bin/librefprop.dylib] Error 1

I have the most current gcc and gfortran (and Xtools command line tools) installed.

Any thoughts on what needs to be changed?
thanks

Rename library

As a follow up on Eric Lemmon's mail, we should replace refprop with REFPROP for further integration with the Windows world.

Matlab 64bit installation on Linux (Ubuntu)

First of all let me thank everyone for all the work done to make Refprop available on Linux.
I installed librefprop following the instructions and successfully ran the Fortran test. Then I tried to do the matlab integration (Matlab R2015b 64bit). I ran make matlab and again followed the instructions. The next step is where I ran into problems.
Running sudo make matlab-install results in:

mv ./matlab/refpropm.m ./matlab/rp_proto64.m /opt/refprop
mv ./matlab/librefprop_thunk_glnxa64.so /opt/refprop
chmod /opt/refprop/*.m /opt/refprop/*.so
chmod: invalid mode: ‘/opt/refprop/refpropm.m’
Try 'chmod --help' for more information.
make: *** [matlab-install] Error 1

However, upon re-running sudo make matlab-install I get a different feedback:

curl http://www.boulder.nist.gov/div838/theory/refprop/LINKING/refpropm.m > ./matlab/refpropm.m.org
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 31730  100 31730    0     0  55333      0 --:--:-- --:--:-- --:--:-- 55375
cp ./matlab/refpropm.m.org ./matlab/refpropm.m
curl http://www.boulder.nist.gov/div838/theory/refprop/LINKING/rp_proto64.m > ./matlab/rp_proto64.m.org
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 51741  100 51741    0     0  86152      0 --:--:-- --:--:-- --:--:-- 86091
cp ./matlab/rp_proto64.m.org ./matlab/rp_proto64.m
mv ./matlab/refpropm.m ./matlab/rp_proto64.m /opt/refprop
mv ./matlab/librefprop_thunk_glnxa64.so /opt/refprop
mv: cannot stat ‘./matlab/librefprop_thunk_glnxa64.so’: No such file or directory
make: *** [matlab-install64] Error 1
rm matlab/refpropm.m.org matlab/rp_proto64.m.org

Every helpful input is greatly appreciated!

MATLAB 64 bit Does not work

I'm running MATLAB 2012a on a Mac 10.7.5, after following the directions including testing the fortran code and getting the correct results and then downloading the 3 matlab files and converting them with the fixfiles.sh script, rebooting MATLAB provides the error message below. I think this might have to do with the fact that MATLAB uses the THUNK method for 64 bit machines, which REFPROP has provided the THUNK dll to go with the main 64 bit dll for refprop. I'll ask Eric Lemmon about sharing the source code for the 64 bit THUNK dll.

T=refpropm('T','C',0,' ',0,'water')
Warning: The function 'setupdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setrefdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setmixdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setmoddll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setpathdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'gerg04dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setktvdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'getktvdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'getfijdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'preosdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setagadll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'unsetagadll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'namedll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'pureflddll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'setncdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'rpversion_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'critpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'thermdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'therm2dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'therm3dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'therm0dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'pressdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'enthaldll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'entrodll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'cvcpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'gibbsdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'agdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'residualdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'cp0dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dpdddll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dpdd2dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dpdtdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dddpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dddtdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dhd1dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'virbdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'vircdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'virbadll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'vircadll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dbdtdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'b12dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'fgctydll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'fgcty2dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'fugcofdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'chempotdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'actvydll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'excessdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'SATSPLNdll' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'sattpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'sattdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'satpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'satddll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'sathdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'satedll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'satsdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'cv2pkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'csatkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dptsatkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'psatkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dlsatkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dvsatkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'melttdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'mlth2odll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'meltpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'subltdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'sublpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'tprhodll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'tpflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'tdflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'pdflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'phflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'psflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'peflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'thflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'tsflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'teflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dhflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dsflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'deflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'hsflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'esflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'tqflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'pqflshdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'abfl1dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'abfl2dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dbfl1dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dbfl2dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'pdfl1dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'phfl1dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'psfl1dll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'trnprpdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'dielecdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'surftdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'surtendll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'heatdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'cstardll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'fpvdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'wmoldll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'xmassdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'xmoledll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'qmassdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'qmoledll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'infodll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'limitsdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'limitxdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: The function 'limitkdll_' was not found in the library
In loadlibrary at 403
In refpropm at 224
Warning: No functions found in library.
In loadlibrary at 410
In refpropm at 224
Error using calllib
Method was not found.

Error in refpropm (line 259)
[nc path hmix href ierr errTxt] =
calllib(libName,'setupdll_',numComponents,path,hmix,href,0,32*ones(255,1),10000,255,3,255);

[No rule to make target 'fortran/COMMONS.f',needed by 'src/PASS_FTN_ALT.f'. Stop]

Merry Christmass!

I tried to install the shared library with Refprop 9.0 on a 10.10.1 Mac OS X system.

For the purpose I followed the instructions provided on :

https://github.com/jowr/librefprop.so

and I used GCC4.2.1 and gfortran 4.8.2.

however, during the sudo make install I run into the following problem :

make: *** No rule to make target fortran/COMMONS.f', needed by src/PASS_FTN_ALT.f'. Stop.

I found that I don't have the COMMONS.f from my fortran directory in REFPROP\fortran.

Where can I find this COMMONS.f file?

With Kind Regards,

Choi

Next steps for REFPROP & CoolProp

Hello @ibell,

Now that you work close to both projects, can you share with us some insights of how will evolve the two projects? Will they merge to become an only one CoolProp project?

bug report of -fPIC option of gcc in v0.2 for refprop 9.0

I tried to use v0.2 to compile the refprop 9.0 in ubuntu 14.04 server.
gcc 4.8.2 and gfotran 4.8.2 were used.
The output is the same as Link to a former ISSUE
According to the error message, I added the -fPIC option to the compiler by modifying the line of OPTFLAGS in the Makefile as:

OPTFLAGS   =-fPIC -O3 -ffast-math -ffloat-store # optimisation, remove for debugging

And I successfully compiled the files into a .so file, though there were a lot of warnings.
This is the test result:

vagrant@vagrant-ubuntu-trusty-64:~/refprop/librefprop.so-0.2/python$ python example.py

   Point       Temperature,    Pressure,      Enthalpy,       Entropy,
                    C             bar           kJ/kg         kJ/kg-K
========================================================================
Point 1              20.000          1.638        105.738          0.612
Point 2              24.117         40.000        118.551          0.633
Point 3             250.000         39.500        912.754          2.558
Point 4             177.568          2.138        791.765          2.649


    Parameter         Value     Unit
=====================================
subcooling              5.000   K
HX pressure drop        0.500   bar
eta pump               50.000   %
eta expander           75.000   %
Pump work              12.813   kJ/kg
added heat            794.203   kJ/kg
expander work        -120.989   kJ/kg
thermal efficiency     13.621   %
power, 50 g/s           5.409   kW

[No rule to make target 'fortran/COMMONS.f',needed by 'src/PASS_FTN_ALT.f'. Stop]

Hello,

I tried to compile the Fortran files included with Refprop 7.1 on a 10.6.8 Mac OS X system. For the purpose I followed the instructions provided on :

https://github.com/jowr/librefprop.so

and I used GCC4.2.1 and gfortran 4.6.2.

however, during the sudo make install I run into the following problem :

make: *** No rule to make target fortran/COMMONS.f', needed bysrc/PASS_FTN_ALT.f'. Stop.

it seems that the COMMONS.f is missing from my fortran directory. Did anybody encounter the same problem? Where can I find this COMMONS.f file?

With Kind Regards,

Tonkiplis

-m32 causes crash on arm processors

gfortran on arm processors doesn't like the -m32 flag. It causes 'gfortran: error: unrecognized command line option ‘-m32’'. I was able to solve it by commenting on the like in the Makefile where it is set, ARCHFLAG :=-m32.

Mac 64bit matlab integration

Mac OSX 10.9.4, Matlab R2013b. Successfully integrated librefprop.dylib with python using the steps outlined here (thanks!)
When I try to perform the matlab integration, I run into this error in one of the manual intermediate steps. Unix terminal asks to edit 'refprop.m', then run 'thunk.m'.

This is the error for running thunk.m:
attempted to access out(0); index must be a positive integer or logical.

Error in loadlibrary>getLoadlibraryCompilerConfiguration (line 539)
if (strcmp(out(end), char(10)))

Error in loadlibrary (line 253)
[thunk_build_fn,preprocess_command]=getLoadlibraryCompilerConfiguration(ccinclude,header,headername,compilerConfiguration);

Error in thunk (line 2)
loadlibrary('librefprop','header.h','mfilename','rp_proto64')

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


Also, here is my gcc info:

gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)

OPENMP

I guess we have most of the issues resolved on OSX, but I tried to rebuild today and I couldn't. It worked fine if I commented out the -fopenmp. Was there some magic that we did to get it to build? I think it is ok to not have openmp support though. I guess the issue was with my gfortran, right?

OSX installation failure

make header library succeeds with plenty of warnings while make install gives

Ians-Mac-mini:librefprop Ian$ make install
mkdir -p  /opt/refprop
cp  -r ./files/* /opt/refprop
cp: ./files/*: No such file or directory
make: *** [install-fluids] Error 1

And there is nothing in ./files/ folder. Should there be?

Build fails on OSX

Tried to build on OSX. Checked out sources, installed gfortran from HPC, copied 9.1 sources, but build fails (see below). Any ideas what is up? Got an email from a guy who wants to use REFPROP on OSX

Ians-Mac-mini:librefprop Ian$ make
mkdir -p  ./bin
cp  src/refprop_lib.h bin/refprop_lib.h
mkdir -p  ./bin
cp  src/refprop_constants.h bin/refprop_constants.h
mkdir -p  ./bin
cp  src/refprop_names.h bin/refprop_names.h
mkdir -p  ./bin
cp  src/refprop_types_c.h bin/refprop_types_c.h
mkdir -p  ./bin
cp  src/refprop_types_cpp.h bin/refprop_types_cpp.h
mkdir -p  ./bin
cp  src/refprop_types.h bin/refprop_types.h
sed 's/dll_export/!dll_export/g' ./fortran/PASS_FTN.FOR > ./src/PASS_FTN_ALT.for
cat ./src/PASS_FTN_ALT.FOR.tpl >> ./src/PASS_FTN_ALT.for
sed -i "s/'commons.for'/'COMMONS.for'/" ./src/PASS_FTN_ALT.for
sed: 1: "./src/PASS_FTN_ALT.for": invalid command code .
make: *** [src/PASS_FTN_ALT.for] Error 1

Consider deprecating this repo

@jowr et al., I have (in my NIST capacity), developed a CMake-based workflow for building the REFPROP shared library reliably on windows/linux/OSX, with the nicest feature: all the functions are ALSO output with mixed case when compiling with gfortran. It is exceptionally easy to use the cmake workflow, and I would appreciate testing from folks.

The repo is here: https://github.com/usnistgov/REFPROP-cmake

C interface

Write an interface in C that allows us to use the same function names on Windows and Linux. Eventually, this will solve most of the header issues and we do not need the scripts to fix the Matlab files.

Version issue

Does it works for REFPROP 8.0? When I try to make this error appears:

No rule to make target fortran/COMMONS.f', needed bysrc/PASS_FTN_ALT.f'.

relocation R_X86_64_32 against `.rodata' error

Hello,

First, thank you for this effort - very useful.

I tried compiling with $make header library as directed, but receive the following error even after adding '-fPIC' to the compiler options for C,C++,Fortran.

gfortran -rdynamic -fPIC -shared -Wl,-soname,librefprop.so.9 -O3 -ffast-math -Wall -pedantic -o ./bin/librefprop.so ./src/PASS_FTN_LIN.o ./fortran/SETUP.o ./fortran/CORE_ANC.o ./fortran/CORE_BWR.o ./fortran/CORE_CPP.o ./fortran/CORE_DE.o ./fortran/CORE_ECS.o ./fortran/CORE_FEQ.o ./fortran/CORE_MLT.o ./fortran/CORE_PH0.o ./fortran/CORE_QUI.o ./fortran/CORE_STN.o ./fortran/CORE_PR.o ./fortran/FLASH2.o ./fortran/FLSH_SUB.o ./fortran/IDEALGAS.o ./fortran/MIX_AGA8.o ./fortran/MIX_HMX.o ./fortran/PROP_SUB.o ./fortran/REALGAS.o ./fortran/SAT_SUB.o ./fortran/SETUP2.o ./fortran/TRNS_ECS.o ./fortran/TRNS_TCX.o ./fortran/TRNS_VIS.o ./fortran/TRNSP.o ./fortran/UTILITY.o
/usr/bin/ld: ./src/PASS_FTN_LIN.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
./src/PASS_FTN_LIN.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

Thank you!

R

OSX removal of FORTRAN files

On OSX, when running make header library, it removes most (but not all) of the .for files from the fortran library, though the dynamic library gets built. After running make header library, here is an ls of fortran folder:

Ians-Mac-mini:librefprop Ian$ ls fortran/
COMMONS.FOR CORE_ECS.o  CORE_STN.o  MIX_HMX.o   SETUP2.o
COMTRN.FOR  CORE_FEQ.o  FLASH2.o    PASS_FTN.FOR    TRNSP.o
CORE_ANC.o  CORE_MLT.o  FLSH_SUB.o  PROP_SUB.o  TRNS_ECS.o
CORE_BWR.o  CORE_PH0.o  IDEALGAS.o  REALGAS.o   TRNS_TCX.o
CORE_CPP.o  CORE_PR.o   MANUAL.TXT  SAT_SUB.o   TRNS_VIS.o
CORE_DE.o   CORE_QUI.o  MIX_AGA8.o  SETUP.o     UTILITY.o
Ians-Mac-mini:librefprop Ian$ 

Latest version v0.6 has wrong URL_NIST in MakeFile

First of all, thanks a lot for all the hard work to make Refprop work on Linux. Perhaps the master branch is just fine for this project, but I usually just check out the most recent version. So I checked out v0.6, I noticed that the URL_NIST variable in the MakeFile is wrong. Since you're also advising people to download the latest release you could perhaps make a note of this or push a new version. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.