MPh-py / MPh

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

Could not locate Comsol 5.3a installation #105

Closed s-romeni closed 1 year ago

s-romeni commented 1 year ago

I have installed the module typing in the command prompt

pip install MPh

Then typed

python
>>> import mph
>>> client = mph.start(cores=1)

and I get the error Could not locate any Comsol installation.

My Comsol installation (the executables comsol.exe and comsolmphserver.exe) is in C:\Program Files\COMSOL\COMSOL53a\Multiphysics\bin\win64, what should I do?

john-hen commented 1 year ago

Hi. You should upgrade to a more recent version of Comsol. Comsol 5.3a was released more than five years ago and is not supported, see the documentation:

Versions 5.5 and newer are expected to work, i.e. have been tested.

That's because 5.5 was the current Comsol version back when MPh was first released. I believe MPh used to work with 5.3a for a while, so downgrading MPh might help, but I cannot be sure in which version the 5.3a support was "lost", if it was ever there, as that's not being tested. (See also issue #96, related to Comsol 5.3, released six month before 5.3a.)

Nefteslon commented 5 months ago

To launch 5.4, replacing the file "COMSOL\COMSOL54\Multiphysics\bin\win64\comsol.ini" with the same one, but from older versions, worked (maybe it will work for 5.3). comsol.ini.txt (remove the txt extension from the name of the attached file)