MPh-py / MPh

Pythonic scripting interface for Comsol Multiphysics
https://mph.readthedocs.io
MIT License
274 stars 70 forks source link

mph.start() crashes on VSCode at macOS(M3) #183

Closed andrew4ig closed 3 months ago

andrew4ig commented 3 months ago
14:42:05.021 [info] Handle Execution of Cells 0,1,2 for ~/Documents/comsol_modeling/mie.ipynb
14:42:08.001 [error] Disposing session as kernel process died ExitCode: undefined, Reason: 
14:42:08.015 [info] Cell 0 completed in -1720698125.026s (start: 1720698125026, end: undefined)
14:42:13.344 [info] Disposing request as the cell (-1) was deleted ~/Documents/comsol_modeling/mie.ipynb
14:42:31.270 [info] Handle Execution of Cells 0 for ~/Documents/comsol_modeling/mie.ipynb

Im running code in venv, I changed "maci64" with "macarm64", added DYLD_FALLBACK_LIBRARY_PATH according to the (https://github.com/miamvmian/MPh?tab=readme-ov-file) and added it in activate of my venv. Nothing worked.

john-hen commented 3 months ago

Hi. This is an issue you have with that fork, which is why I'll close this issue here. If you want to contact the user, try "pinging" them with "@username" in a comment below. It's possible to enable the Issues tab for the fork as well, but the owner of the fork has to do that, it's somwhere in the settings.

andrew4ig commented 3 months ago

I suppose you got me wrong. I was trying to connect to the comsol server using mph, but I received python kernel crush. Here are logs:


Searching system for available Comsol back-ends.
Searching file system for Comsol executables.
Checking candidate folder "/Applications/COMSOL62".
Found Comsol executable "/Applications/COMSOL62/multiphysics/bin/macarm64/comsol".
Looking for Comsol executable on system search path.
Running shell command "which comsol".
Command exited with an error.
Checking executable "/Applications/COMSOL62/multiphysics/bin/macarm64/comsol".
Found Java VM configuration "/Applications/COMSOL62/multiphysics/bin/macarm64/comsol.ini".
System architecture is "macarm64".
Java VM at relative path "../../java/macarm64/jre/Contents/Home/lib/server/libjvm.dylib".
Root folder is "/Applications/COMSOL62/multiphysics".
Reported version information is "COMSOL Multiphysics 6.2.0.290".
Assigned name "6.2" to this installation.
Starting external server process.
Server restricted to 5 processor cores.
Server listening on port 51917.
JPype version is 1.5.0.
Starting Java virtual machine.
JVM arguments: ['/Applications/COMSOL62/multiphysics/java/macarm64/jre/Contents/Home/lib/server/libjvm.dylib']```

`The Kernel crashed while executing code in the current cell or a previous cell. `
john-hen commented 3 months ago

I did not get you wrong. And you weren't "using mph", you were using a modified version, which crashes when it gets to the very change that you made:

JVM arguments: ['/Applications/COMSOL62/multiphysics/java/macarm64/jre/Contents/Home/lib/server/libjvm.dylib']

It says macarm64 right there. No released version of MPh does that, and that's because it's untested and might crash.