You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the env var PYMAPDL_IP is set, the start_instance is set to False silently. Because PyMAPDL assumes that if you are using an IP, you are not launching MAPDL, just connecting to a remote instance. If you were going to connect to a local instance, already launched, the natural choice is to set start_instance to False, such as:
mapdl=launch_mapdl(start_instance=False, port=50052) # port is optional
WSL edge case
When working on WSL (MAPDL installed in Windows, and PyMAPDL running on WSL), you can have a bit of a contradicting case, where you need to launch MAPDL in another IP.
should it raise an exception? should it connect to the given instance IP?
TL,DR
Which should have priority and override the other arguments?
a) Env vars have the priority
b) The script arguments (i.e. launch_mapdl(start_instance=False))
The text was updated successfully, but these errors were encountered:
Current behaviour
If the env var
PYMAPDL_IP
is set, thestart_instance
is set toFalse
silently. Because PyMAPDL assumes that if you are using an IP, you are not launching MAPDL, just connecting to a remote instance. If you were going to connect to a local instance, already launched, the natural choice is to setstart_instance
toFalse
, such as:WSL edge case
When working on WSL (MAPDL installed in Windows, and PyMAPDL running on WSL), you can have a bit of a contradicting case, where you need to launch MAPDL in another IP.
For more info check: https://mapdl.docs.pyansys.com/version/stable/getting_started/wsl.html#launch-mapdl-in-the-windows-host-os
Internally, PyMAPDL sets
start_instance
equal toIssues
Clearly, setting the
start_instance
toFalse
silently is a problem. PyMAPDL should be more explicit.Options
Option A:
Raise an exception.
If
PYMAPDL_IP
is used andstart_instance=True
is passed tolaunch_mapdl
or the env varPYMAPDL_START_INSTANCE
is present.Option B:
Just print a warning, it makes sense if you are using
PYMAPDL_IP
you want to connect.Option C:
If you are using
start_instance=True
is clear you want to start PyMAPDL, forget about thePyMAPDL_IP
env var.Option D:
Dont assume the start instance is False
Collorary
What should the expected output from this code:
should it raise an exception? should it connect to the given instance IP?
TL,DR
Which should have priority and override the other arguments?
a) Env vars have the priority
b) The script arguments (i.e.
launch_mapdl(start_instance=False)
)The text was updated successfully, but these errors were encountered: