Can't load old CoolProp Mathematica on Apple M1 Max, can't compile with Mathematica module

55 views
Skip to first unread message

Darren Kelly

unread,
Jun 27, 2022, 12:00:50 AM6/27/22
to coolprop-users

I am having trouble running or compiling CoolProp with its (apparently no longer supported) Mathematica module on a new M1 Max MacBook Pro.

There is an old wrapper for CoolProp 5.1.1 for Mathematica that works on my other machines but not on M1 Max. On M1 Max, the Mathematica13 LibraryFunctionLoad gives:

LibraryFunction::libload: The function PropsSI was not loaded from the file ...

The same happens with the latest nightly CoolProp download for Darwin 64 bit (which does not have the Mathematica module in the build).

I can compile CoolProp without the Mathematica module, the built dylib seems to load in Mathematica13, but when you execute a CoolProp command it runs for a while, then returns nothing, and the assigned library variable is reset (turns blue in the Mathematica notebook). Presumably this is because it needs that Mathematica module.

If I try to compile with the Mathematica module flag included, the CMake compilation fails.

$ cmake .. -DCOOLPROP_MATHEMATICA_MODULE=ON -DCMAKE_VERBOSE_MAKEFILE=ON

...

CMake Error at externals/FindMathematica/CMake/Mathematica/FindMathematica.cmake:641 (message):
Unsupported host platform Darwin
Call Stack (most recent call first):
externals/FindMathematica/CMake/Mathematica/FindMathematica.cmake:1248 (_get_host_system_IDs)
externals/FindMathematica/CMake/Mathematica/FindMathematica.cmake:2786 (_setup_mathematica_systemIDs)
CMakeLists.txt:1834 (find_package)

Glad for any advice you can give on getting the CoolProp lib with MMA module to run on my M1 Max.

Maybe somebody knows who maintained that old Mathematica wrapper version.

Darren Kelly

unread,
Jun 27, 2022, 9:24:50 AM6/27/22
to coolprop-users
This problem has been kindly solved by Jeff Henning under the following CoolProp issue report:


---

 Your error is coming from FindMathematica, which is an external submodule that searches for your system architecture (Darwin + specific chip architecture) and the location of your Mathematica version on that OS/architecture. The version in the latest nightly build is about four years old (2018) and there are newer updates that support some OSX specific patches as well as support for finding Mathematica 12.x and 13.x versions. As a suggestion, you might try updating that submodule in your externals directory and see if that provides better support for your hardware/OS version.

I had to update mine to get support for Mathematica 13. It should have no impact on the compilation other than being able to find the Mathematica files that CMake needs to complete the compile. This submodule version should probably be bumped up in the CoolProp nightly build (there is development in the works #2085 that should bump this up) as the current version used definitely does not support up to Mathematica 13. It may actually be sending you a red herring architecture error because of this.


Reply all
Reply to author
Forward
0 new messages