Open hohiroki opened 3 weeks ago
The warnings are benign. But the NaN are not. Can you try with the native python interface to make sure that works?
The warnings are benign. But the NaN are not. Can you try with the native python interface to make sure that works?
Thank you for your suggestion.
I think I've found the cause of the problem.
Following your suggestion, I conducted tests using Python and found that the compiled Refprop could be normally called through Python and output results.
Comparing with the code in setGlobalrefmatpy.m, it seems that there is a line of statement defining the dynamic link path missing. RP.SETPATHdll('/public3/home/sc54911/software/REFPROP10/build')
After adding this line to the code, the above code can output results normally. It should be noted that the installation address of REFPROP needs to be replaced.
Thanks again!
Yes, that is true, a hard-coded path should not be used. Better would have been to read an environment variable called RPPREFIX.
Or even better, to allow the path to be an argument to the global setter, with default argument of what it is currently.
My colleague made the necessary changes and I pushed them: https://github.com/usnistgov/REFPROP-wrappers/commit/dbb216637dbda2c65abdf9447308785a33545652
I carried out cmake according to the instructions. The result was shown to be completed, and.so and.h files were generated under the ‘build’ folder. However, some warnings appeared during the compilation process. I am not sure if these warnings are normal.
After the compilation ends, I copied the FLUID and MIXTURE folders in REPPROP10 to the ‘build’ folder. And I tried to call REFPROP in Matlab.
However, when I opened the Matlab software and conducted a test, some problems occurred. Calling the reefmatpy file does not give the correct result. The program does not report an error, but instead gives NAN.
Below are the information about my compilation process and the process of calling Matlab.
OS:Centos7 Python3.10 Matlab2024
The matlab problem
The cmake info