-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyMAPDL connect to existing instance instead of creating a new one #1113
Comments
I need to have a look at this and see the implications. I'm creating this issue to raise visibility. |
Hi, I think I have this issue. It seems that when I start an analysis in one instance of APDL and want to work on a second analysis in the meantime both crash and I have some error message saying that I can't use some functions (from the second analysis) in the /SOLU menu (the one where is running the first analysis). Do you have any idea on how to bypass this issue? Thanks |
Hi @NFougeron Can you try specifying the ports for each instance?? from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(port=50052, run_location="C:\temp\temp1") from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(port=50053, run_location="C:\temp\temp2") |
Thanks it seems to work !
Nolwenn Fougeron, Docteur en Biomécanique
Chercheur en post-doctorat au laboratoire TIMC - Équipe Biomeca-TIMC
Univ. Grenoble Alpes - CNRS UMR 5525 - Pavillon Taillefer
Faculté de Médecine - 38706 La Tronche cedex - France
…________________________________
De : German ***@***.***>
Envoyé : vendredi 18 novembre 2022 11:24
À : pyansys/pymapdl ***@***.***>
Cc : NFougeron ***@***.***>; Mention ***@***.***>
Objet : Re: [pyansys/pymapdl] PyMAPDL connect to existing instance instead of creating a new one (Issue #1113)
Hi @NFougeron<https://github.com/NFougeron>
Can you try specifying the ports for each instance??
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(port=50052, run_location="C:\temp\temp1")
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(port=50053, run_location="C:\temp\temp2")
—
Reply to this email directly, view it on GitHub<#1113 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHEOASRK7IVHRDZ3Z3QMRFTWI5KMFANCNFSM5VRUOJTQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
We should probably consider implementing a logic that checks if an MAPDL instance is running already at the given port. If This might require some rewriting on the |
@germa89 |
Hi @SerinaAnsys By default the port is 50052. If the instance is already launched you can check >>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mapdl.port
50052 Ideally a number above 50052. I tend to use any number between 50060-5080. |
AttributeError Traceback (most recent call last) AttributeError: 'MapdlGrpc' object has no attribute 'port' It seems doesn't work. Do you know why? |
Are we able to do that now? Suppose the mapdl is already exited, how can I check that and load a new one? Is there a command? I tried to check ''mapdl' in locals()' and I see it's there.
|
Sorry... I meant |
You can know if the session exited by doing: >>> mapdl._exited
True # if exited. |
Most of the issues raised in this issue were fixed in:
|
=== From internal feedback DK ===
If you have a PyMAPDL session running:
and run another session:
the later will connect into the former, which is not desirable.
The text was updated successfully, but these errors were encountered: