MPh-py / MPh

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

mph can't find cosmol location #149

Closed gtrichardson closed 1 year ago

gtrichardson commented 1 year ago

I'm attempting to use mph on a computing cluster where cosmol is installed at /usr/gapps/estk/comsol. I'm able to activate cosmol from here by simply running the 'comsol' command in the terminal. However, when I run mph.start() I get the error message "Could not locate any Comsol installation.".

Following the installation directions, I tried to solve this by creating a symlink to my comsol location call cosmol_location. However, mph.start() still returns the same error message. Is there perhaps an argument I'm missing, or something else?

P.s: As far as I know, this is a standard 6.1 license, no class kit or other specialization etc.

john-hen commented 1 year ago

This is expected to work, even without the symlink, since comsol is on the search path. You can get more insight into what's going on by running the discovery part of the test suite, with python tools/test.py discovery --log after downloading or cloning the source code from here on GitHub. See the ReadMe's in the tools and tests folders for more detailed instructions.

gtrichardson commented 1 year ago

Hi John! Thank you for the quick reply and the help. With this I was able to determine the problem. I was attempting to run this interactively in a Jupyter notebook which apparently has its own $PATH variable and my comsol was not on that PATH. With this fixed it runs correctly. Thank you so much!