question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
NFougeroncommented, Nov 21, 2022

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: @.***>

0reactions
germa89commented, Nov 21, 2022

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 to True, 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 with ps aux).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found