Closed mcMunich closed 3 years ago
spyder returns similar, an error message about the gRPC instance: mapdl = launch_mapdl() Traceback (most recent call last):
File "
File "C:\ProgramData\Anaconda3\lib\site-packages\ansys\mapdl\core\launcher.py", line 926, in launch_mapdl mapdl = MapdlGrpc(ip=LOCALHOST, port=port,
File "C:\ProgramData\Anaconda3\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py", line 224, in init raise IOError('Unable to connect to MAPDL gRPC instance at %s' %
OSError: Unable to connect to MAPDL gRPC instance at 127.0.0.1:50057
Thanks for posting here.
Try the following to debug:
from ansys.mapdl import core as pymapdl
mapdl = pymapdl.launch_mapdl(verbose_mapdl=True, additional_switches='-smp')
Verbose will printout the command used and -smp
will use shared memory parallel (helps with license issues sometimes).
Take a look at output and if it looks correct, try running the same command pymapdl used in a separate command prompt. Quite likely, MAPDL isn't starting for some reason.
import ansys.mapdl as core pymapdl SyntaxError: invalid syntax
I think there is something missing in the first line.
Sorry! This is what I get for multi tasking. Edited and should read:
from ansys.mapdl import core as pymapdl
The smp solution seems to have been the issue. When I use it in my normal call I can proceed.
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(verbose_mapdl=True, additional_switches='-smp')
print(mapdl)
Running "C:\Program Files\ANSYS Inc\v212\ansys\bin\winx64\ansys212.exe" -j file -np 2 -b -i .__tmp__.inp -o .__tmp__.out -smp -port 50056 -grpc
Product: Ansys Mechanical Enterprise
MAPDL Version: RELEASE 2021 R2 BUILD 21.2 UPDATE 20210601
ansys.mapdl Version: 0.58.6
Ah, you're using 2021R2. Ok, DMP is a known issue here on windows and we're looking into this right now. I'll create a hotfix to warn the user that this is failing to launch on 2021R2 and to force SMP for the time being.
We've investigated this locally as as far as we can tell, this is directly related to licencing and the VPN. DMP works without any issues when the license server is on the same network as the MAPDL server.
@akaszynski @germa89 Had to ask a few people on this one. Workaround for VPN with MAPDL post v211 is to use MSMPI on Windows platform
So to the MAPDL command line add -mpi msmpi
Thanks @sa-cross, that's super helpful. Should we make this a default option on Windows?
Yes I would for the 2021 Rx versions specifically.
Closing this issue has the required changed have been implemented and they will go public in 0.60 release.
Trying to launch mapdl from my spyder editor. But the problem is reproducible in a cmd prompt.
After a while it times out apparently and the cmd prompt shows the following:
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.