PyMAPDL connect to existing instance instead of creating a new one
See original GitHub issue=== From internal feedback DK ===
If you have a PyMAPDL session running:
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(run_location="C:\temp\temp1")
and run another session:
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(run_location="C:\temp\temp2")
the later will connect into the former, which is not desirable.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
First setup: Unable to connect to APDL server · Issue #137
I'm running: Windows 10 64-bit python 3.6.8 (ansys-cobra 0.1.0, ... The "Unable to connect to APDL server" is rather instant and by default, ......
Read more >PyMAPDL Documentation 0.63.4 — PyMAPDL
Using gRPC, PyMAPDL can convert Python statements into APDL commands that can then be transmitted to an MAPDL instance running anywhere, while producing ......
Read more >PyMAPDL Language and Usage - Lesson 2 - YouTube
APIs act as a bridge between two programs, so it's important to understand the philosophy behind PyMAPDL if we hope to build reliable...
Read more >How to initialize new instance *as* existing instance?
Currently I have to set each attribute on its own. Is there a way to do that in one line? from variadic_foo_operations import...
Read more >Cheatsheet for PyMAPDL - Ansys Innovation Courses
To connect to an existing instance of MAPDL at IP ... To create and exit a pool of instances ... PyMAPDL commands are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 @NFougeronhttps://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 GitHubhttps://github.com/pyansys/pymapdl/issues/1113#issuecomment-1319809346, or unsubscribehttps://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
start_instance
is equal toTrue
, we should launch another instance in another port.This might require some rewriting on the
launcher
module which might be difficult. Also we will need to list the instances (e.g.posix
withps aux
).