Closed FiniteShekhar closed 2 years ago
Hi @FiniteShekhar
It seems you have a problem with the license:
LicenseServerConnectionError: Exceeded 10 seconds while waiting for C:\Users\Shekhar Srivastava\AppData\Local\Temp\.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out to exist.
Can you check you can run MAPDL using the Mechanical Launcher?
Hello Thanks for your reply.
I have installed Ansys student. Also, I have checked and the mapdl is working perfectly fine.
I don't know why there is a license error.
On Tue, Aug 9, 2022, 6:04 PM German @.***> wrote:
Hi @FiniteShekhar https://github.com/FiniteShekhar
It seems you have a problem with the license:
LicenseServerConnectionError: Exceeded 10 seconds while waiting for C:\Users\Shekhar Srivastava\AppData\Local\Temp.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out to exist.
Can you check you can run MAPDL using the Mechanical Launcher?
— Reply to this email directly, view it on GitHub https://github.com/pyansys/pymapdl/issues/1330#issuecomment-1209324449, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2NEPW7Z7KKPPJXLTQUHPZ3VYJF7BANCNFSM557UHG2A . You are receiving this because you were mentioned.Message ID: @.***>
Can you post here the result of the following python code:
from ansys.mapdl.core import Report
print(Report())
Also, can you try to run the following code in a terminal/windows shell:
& 'C:\Program Files\ANSYS Inc\v212\ansys\bin\winx64\ANSYS212.exe' -grpc
or in Linux:
/ansys_inc/v212/ansys/bin/ANSYS212.exe -grpc
Replace the path with your ANSYS installation path.
Here it is:
PyMAPDL Software and Environment Report
Packages Requirements
ansys.mapdl.core : 0.63.1 numpy : 1.20.3 appdirs : 1.4.4 scipy : 1.7.1 grpc : Package not found ansys.api.mapdl.v0 : 0.4.1 ansys.mapdl.reader : 0.51.14 google.protobuf : Package not found
matplotlib : 3.4.3 pyvista : 0.34.2 pyiges : 0.2.1 tqdm : 4.62.3
Ansys Installation
Unable to locate any Ansys installations
Ansys Environment Variables
ANSYS222_DIR C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS ANSYSLIC_DIR C:\Program Files\ANSYS Inc\Shared Files\licensing ANSYSLMD_LICENSE_FILE C:\Program Files\ANSYS Inc\Shared Files\licensing\license_files\ansyslmd.lic ANSYS_SYSDIR winx64 ANSYS_SYSDIR32 win32 AWP_ROOT222 C:\Program Files\ANSYS Inc\ANSYS Student\v222 CADOE_LIBDIR222 C:\Program Files\ANSYS Inc\ANSYS Student\v222\CommonFiles\Language\en-us
OK. Can you try the following?
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe")
print(mapdl.prep7())
By inputting above command snippet, same error is occurring.
---------------------------------------------------------------------------
MapdlDidNotStart Traceback (most recent call last)
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
1513 elif mode == "grpc":
-> 1514 port, actual_run_location = launch_grpc(
1515 port=port,
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_grpc(exec_file, jobname, nproc, ram, run_location, port, ip, additional_switches, override, timeout, verbose, add_env_vars, replace_env_vars, **kwargs)
534 if not has_ans:
--> 535 raise MapdlDidNotStart(
536 f"MAPDL failed to start (No err file generated in '{run_location}')"
MapdlDidNotStart: MAPDL failed to start (No err file generated in 'C:\Users\Shekhar Srivastava\AppData\Local\Temp\ansys_bahhhhudgb')
During handling of the above exception, another exception occurred:
LicenseServerConnectionError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11492/1219766555.py in <module>
1 from ansys.mapdl.core import launch_mapdl
2
----> 3 mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe")
4
5 print(mapdl.prep7())
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
1536 # to the license check
1537 if license_server_check:
-> 1538 lic_check.check()
1539 # pass
1540 raise exception
C:\Anaconda\lib\site-packages\ansys\mapdl\core\licensing.py in check(self)
443 return True
444 elif self._license_file_success is False:
--> 445 raise LicenseServerConnectionError("\n".join(self._license_file_msg))
446
447 if self._license_checkout_success:
LicenseServerConnectionError: Exceeded timeout of 108.0 seconds while examining:
C:\Users\Shekhar Srivastava\AppData\Local\Temp\.ansys\licdebug.DESKTOP-N96VMAF.FEAT_ANSYS.222.out
Mmhh... It seems a problem with the MPI.
Could you try:
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp")
print(mapdl.prep7())
New error:
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11492/965426865.py in <module>
1 from ansys.mapdl.core import launch_mapdl
2
----> 3 mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp")
4
5 print(mapdl.prep7())
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
1538 lic_check.check()
1539 # pass
-> 1540 raise exception
1541
1542 return mapdl
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
1520 **start_parm,
1521 )
-> 1522 mapdl = MapdlGrpc(
1523 ip=ip,
1524 port=port,
C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py in __init__(self, ip, port, timeout, loglevel, log_file, cleanup_on_exit, log_apdl, set_no_abort, remove_temp_files, print_com, channel, remote_instance, **start_parm)
300 self._port = port
301 self._ip = ip
--> 302 super().__init__(
303 loglevel=loglevel,
304 log_apdl=log_apdl,
C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl.py in __init__(self, loglevel, use_vtk, log_apdl, log_file, local, print_com, **start_parm)
199 self._log.debug("Logging set to %s", loglevel)
200
--> 201 from ansys.mapdl.core.parameters import Parameters
202
203 self._parameters = Parameters(self)
C:\Anaconda\lib\site-packages\ansys\mapdl\core\parameters.py in <module>
4
5 try:
----> 6 from ansys.mapdl.reader._reader import write_array
7
8 _HAS_READER = True
C:\Anaconda\lib\site-packages\ansys\mapdl\reader\__init__.py in <module>
6
7 from ansys.mapdl.reader._version import __version__
----> 8 from ansys.mapdl.reader.archive import (Archive, write_cmblock, write_nblock,
9 save_as_archive)
10 from ansys.mapdl.reader.cell_quality import quality
C:\Anaconda\lib\site-packages\ansys\mapdl\reader\archive.py in <module>
18 import pyvista as pv
19
---> 20 from ansys.mapdl.reader import _reader, _archive
21 from ansys.mapdl.reader.misc import vtk_cell_info, chunks
22 from ansys.mapdl.reader.mesh import Mesh
ansys\mapdl\reader\cython\_reader.pyx in init ansys.mapdl.reader._reader()
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
I see you are using an old version of Reader.
Can you upgrade the reader package (ansys-mapdl-reader
)??
pip install ansys-mapdl-reader -U
Did it. What should i do now?
Requirement already satisfied: ansys-mapdl-reader in c:\anaconda\lib\site-packages (0.51.14) Collecting ansys-mapdl-reader Downloading ansys_mapdl_reader-0.51.15-cp39-cp39-win_amd64.whl (1.1 MB) ---------------------------------------- 1.1/1.1 MB 2.3 MB/s eta 0:00:00 Requirement already satisfied: pyvista>=0.32.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (0.34.2) Requirement already satisfied: matplotlib>=3.0.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (3.4.3) Requirement already satisfied: tqdm>=4.45.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (4.62.3) Requirement already satisfied: numpy>=1.16.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (1.20.3) Requirement already satisfied: appdirs>=1.4.0 in c:\anaconda\lib\site-packages (from ansys-mapdl-reader) (1.4.4) Requirement already satisfied: pillow>=6.2.0 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (8.4.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (1.3.1) Requirement already satisfied: python-dateutil>=2.7 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (2.8.2) Requirement already satisfied: pyparsing>=2.2.1 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (3.0.4) Requirement already satisfied: cycler>=0.10 in c:\anaconda\lib\site-packages (from matplotlib>=3.0.0->ansys-mapdl-reader) (0.10.0) Requirement already satisfied: vtk in c:\anaconda\lib\site-packages (from pyvista>=0.32.0->ansys-mapdl-reader) (-PKG-VERSION) Requirement already satisfied: scooby>=0.5.1 in c:\anaconda\lib\site-packages (from pyvista>=0.32.0->ansys-mapdl-reader) (0.5.12) Requirement already satisfied: imageio in c:\anaconda\lib\site-packages (from pyvista>=0.32.0->ansys-mapdl-reader) (2.9.0) Requirement already satisfied: colorama in c:\anaconda\lib\site-packages (from tqdm>=4.45.0->ansys-mapdl-reader) (0.4.4) Requirement already satisfied: six in c:\anaconda\lib\site-packages (from cycler>=0.10->matplotlib>=3.0.0->ansys-mapdl-reader) (1.16.0) Installing collected packages: ansys-mapdl-reader Attempting uninstall: ansys-mapdl-reader Found existing installation: ansys-mapdl-reader 0.51.14 Uninstalling ansys-mapdl-reader-0.51.14: Successfully uninstalled ansys-mapdl-reader-0.51.14 Successfully installed ansys-mapdl-reader-0.51.15 Note: you may need to restart the kernel to use updated packages.
doesn't it work now?
No it does not work.
which error now? the same about reader?
Can you try also?
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp",
license_server_check = False
)
print(mapdl.prep7())
Now this is the error:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
1521 )
-> 1522 mapdl = MapdlGrpc(
1523 ip=ip,
C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py in __init__(self, ip, port, timeout, loglevel, log_file, cleanup_on_exit, log_apdl, set_no_abort, remove_temp_files, print_com, channel, remote_instance, **start_parm)
350 # connect and validate to the channel
--> 351 self._multi_connect(timeout=timeout)
352
C:\Anaconda\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py in _multi_connect(self, n_attempts, timeout, set_no_abort)
412 if not connected:
--> 413 raise IOError(
414 f"Unable to connect to MAPDL gRPC instance at {self._channel_str}"
OSError: Unable to connect to MAPDL gRPC instance at 127.0.0.1:50053
During handling of the above exception, another exception occurred:
LicenseServerConnectionError Traceback (most recent call last)
<ipython-input-2-2f85dfd4d228> in <module>
1 from ansys.mapdl.core import launch_mapdl
2
----> 3 mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp")
4
5 print(mapdl.prep7())
C:\Anaconda\lib\site-packages\ansys\mapdl\core\launcher.py in launch_mapdl(exec_file, run_location, jobname, nproc, ram, mode, override, loglevel, additional_switches, start_timeout, port, cleanup_on_exit, start_instance, ip, clear_on_connect, log_apdl, remove_temp_files, verbose_mapdl, license_server_check, license_type, print_com, add_env_vars, replace_env_vars, **kwargs)
1536 # to the license check
1537 if license_server_check:
-> 1538 lic_check.check()
1539 # pass
1540 raise exception
C:\Anaconda\lib\site-packages\ansys\mapdl\core\licensing.py in check(self)
443 return True
444 elif self._license_file_success is False:
--> 445 raise LicenseServerConnectionError("\n".join(self._license_file_msg))
446
447 if self._license_checkout_success:
LicenseServerConnectionError: 2022/08/09 22:42:38 DENIED ansys 22.2 (2022.0502) 1/0/0/0 1/1/1/1 2252:FEAT_ANSYS:Shekhar Srivastava@DESKTOP-N96VMAF:winx64 6900:192.168.1.6
Maximum licensed number of demo users already reached.
In [3]: from ansys.mapdl.core import launch_mapdl
...: mapdl = launch_mapdl(exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe", additional_switches="-smp",
...: license_server_check = False
...: )
...:
...: print(mapdl.prep7())
*** MAPDL - ENGINEERING ANALYSIS SYSTEM RELEASE 2022 R2 22.2 ***
Ansys Mechanical Enterprise Academic Student
00000000 VERSION=WINDOWS x64 22:45:27 AUG 09, 2022 CP= 0.312
***** MAPDL ANALYSIS DEFINITION (PREP7) *****
LicenseServerConnectionError: 2022/08/09 22:42:38 DENIED ansys 22.2 (2022.0502) 1/0/0/0 1/1/1/1 2252:FEAT_ANSYS:Shekhar Srivastava@DESKTOP-N96VMAF:winx64 6900:192.168.1.6
Maximum licensed number of demo users already reached.
It seems you don't have licenses?
But with license_server_check=False
it does work.
But I am using Ansys Student Version. Does it not have license?
I'm not 100% sure, but maybe the license in the student version is embedded. Hence the license check is bound to fail.
how can I get it working?
It seems it works if you use license_server_check
.
Hence, until we fix this in the next release, just use:
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(
exec_file=r"C:\Program Files\ANSYS Inc\ANSYS Student\v222\ANSYS\bin\winx64\ANSYS222.exe",
additional_switches="-smp", # this might not be needed
license_server_check = False
)
Okie will keep it posted here if it works. Try to fix it further.
Before submitting the issue
Description of the bug
I have used the following command snippet to run pymapdl:
but it is showing an entry point error every time and it does not start.
Steps To Reproduce
Which Operating System are you using?
Windows
Which Python version are you using?
3.9
Installed packages