-
Notifications
You must be signed in to change notification settings - Fork 83
Description
MPh 0.8.0, released today, adds support for Linux. That support is slightly limited in that it does not fully work out of the box. In order to start a stand-alone client (as opposed to running the Comsol session in client-server mode), it requires the user take an extra step and configure the search path for shared libraries as described in the documentation.
This is fine, but not ideal. For one thing, it's not just pip install
and be done with it. And for another, it prevents users from easily selecting a specific Comsol version as the computation back-end, which is sometimes useful when reproducing earlier simulation results. So ideally, the manual configuration would not be necessary, but instead be done from Python code.
To perhaps track progress on this, or discuss a possible solution, here are some additional details. MPh now follows the instructions exactly as given in Comsol's Programming Manual (specifically, on pages 23 and 916) for running Java applications from the Eclipse IDE. That is, it sets up the environment in that same way before "initializing" the "stand-alone" client. (As opposed to a client-server connection, which works anyway, without any additional configuration.)
However, that alone does not do it. While all appears to be in working order as far as the Java Virtual Machine is concerned, in that it is aware of the locations of the external (native) libraries, these libraries themselves, which are dynamically loaded, have trouble finding each other, leading to a java.lang.UnsatisfiedLinkError
. Which is odd: One would think that these child processes inherit the environment set up in the parent process.
To showcase all of this, I have added the demo script test_Linux
to the sandbox
branch.