MPh-py / MPh

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

Server did not shut down within time-out period #106

Closed john-hen closed 1 year ago

john-hen commented 1 year ago

With Comsol 6.1 (on Windows), the server process does not stop within the default time-out period.

>>> import mph
>>> server = mph.Server()
>>> server.version
'6.1'
>>> server.stop()
Server did not shut down within time-out period.

The default time-out period (in MPh 1.2.0) is 10 seconds. It does however work with a somewhat longer time-out: server.stop(timeout=15).

This seems to be a change in the behavior of the Comsol server process. When doing this manually on the command line, it now takes a little over 10 seconds to exit, i.e. after typing "close". Whereas in earlier Comsol versions the server would shut down within a second or two.

$ comsolmphserver
COMSOL Multiphysics server 6.1 (Build: 252) started listening on port 2036
Use the console command 'close' to exit the program
close
john-hen commented 1 year ago

Fixed in MPh 1.2.1, released today.