pymapdl icon indicating copy to clipboard operation
pymapdl copied to clipboard

MAPDL releasing license during testing.

Open germa89 opened this issue 1 year ago • 5 comments

As the title.

Requested here: https://github.com/ansys/pymapdl/pull/2533#issuecomment-1873799280

Working on this three issues arise:

  • [ ] Usage of PAUSE over the gRPC interface: https://github.com/ansys/pymapdl/issues/2595#issuecomment-1875635439
  • [ ] Usage of PAUSE on Student version: https://github.com/ansys/pymapdl/issues/2595#issuecomment-1875635896
  • [ ] ~License error showing on the student version:~ https://github.com/ansys/pymapdl/issues/2595#issuecomment-1875638392

germa89 avatar Jan 02 '24 09:01 germa89

Usage of PAUSE over the gRPC interface

Interestingly, it seems that the PAUSE command does not work on gRPC mode.

>> mapdl.run("pause")
CRITICAL - pymapdl_global -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mapdl/pymapdl/src/ansys/mapdl/core/mapdl_core.py", line 2236, in run
    self._raise_errors(text)
  File "/home/mapdl/pymapdl/src/ansys/mapdl/core/mapdl_core.py", line 2682, in _raise_errors
    raise MapdlInvalidRoutineError(text)
ansys.mapdl.core.errors.MapdlInvalidRoutineError: *** WARNING ***                         CP =       2.088   TIME= 15:47:33
 PAUSE is not a recognized BEGIN command, abbreviation, or macro.  This  
 command will be ignored.

Ignore these messages by setting 'ignore_errors'=True

However, it does work in a normal context:

image

I believe I'm using it wrong.... Pinging @mikerife @FredAns @koubaa

germa89 avatar Jan 03 '24 16:01 germa89

Usage of PAUSE on Student version

Additionally, it seems the command PAUSE does not work well in MAPDL student version (or maybe I'm using it wrong).

But if you start an MAPDL instance, and then issue PAUSE:

$ ansys -dir /tmp
...
...
 RUN SETUP PROCEDURE FROM FILE= /ansys_inc/v241/ansys/apdl/start.ans

 /INPUT FILE= /ansys_inc/v241/ansys/apdl/start.ans  LINE=       0

 BEGIN:
pause

 *** WARNING ***                         CP =       0.518   TIME= 16:14:02
 This application is now PAUSED, making its license available for use by 
 another application in this Workbench session.  All commands to this    
 application will be ignored until an UNPAUSE command is typed in the    
 Command Window of this application and successfully processed.          

 BEGIN:

and then start another MAPDL instance, you get a Maximum licensed number of demo users already reached error but it starts.

(.venv) root@67ca9354d958:~/pymapdl# ansys -dir /tmp/tmp

 ANSYS LICENSE MANAGER ERROR:
 Maximum licensed number of demo users already reached.


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       mech_2
 License path:  /var/tmp//616ceecb-5105-43ba-a26d-dd269757afed:
 FlexNet Licensing error:-5,357


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       mech_1
 License path:  /var/tmp//616ceecb-5105-43ba-a26d-dd269757afed:
 FlexNet Licensing error:-5,357


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       meba
 License path:  /var/tmp//616ceecb-5105-43ba-a26d-dd269757afed:
 FlexNet Licensing error:-5,357

germa89 avatar Jan 03 '24 16:01 germa89

License error showing on the student version

Also it seems that launching student version shows the Maximum licensed number of demo users already reached. error before starting successfully:

 ANSYS LICENSE MANAGER ERROR:
 Maximum licensed number of demo users already reached.


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       mech_2
 License path:  /var/tmp//56ebd4ed-9192-4bdb-beb2-34b929b03b83:
 FlexNet Licensing error:-5,357

I have made sure there are no more Ansys processes running using ps aux | grep ansys.

Details

Details

$ (.venv) root@67ca9354d958:~/pymapdl# ansys -dir /tmp/tmp

 ANSYS LICENSE MANAGER ERROR:
 Maximum licensed number of demo users already reached.


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       mech_2
 License path:  /var/tmp//56ebd4ed-9192-4bdb-beb2-34b929b03b83:
 FlexNet Licensing error:-5,357


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       mech_1
 License path:  /var/tmp//56ebd4ed-9192-4bdb-beb2-34b929b03b83:
 FlexNet Licensing error:-5,357


 ANSYS LICENSE MANAGER ERROR:
 No such feature exists.
 Feature:       meba
 License path:  /var/tmp//56ebd4ed-9192-4bdb-beb2-34b929b03b83:
 FlexNet Licensing error:-5,357


 Ansys Mechanical Enterprise Academic Student      


 *------------------------------------------------------------------*
 |                                                                  |
 |   W E L C O M E   T O   T H E   A N S Y S (R)  P R O G R A M     |
 |                                                                  |
 *------------------------------------------------------------------*




 ***************************************************************
 *         ANSYS MAPDL                  LEGAL NOTICES          *
 ***************************************************************
 *                                                             *
 * Copyright 1971-2024 Ansys, Inc.  All rights reserved.       *
 * Unauthorized use, distribution or duplication is            *
 * prohibited.                                                 *
 *                                                             *
 * Ansys is a registered trademark of Ansys, Inc. or its       *
 * subsidiaries in the United States or other countries.       *
 * See the Ansys, Inc. online documentation or the Ansys, Inc. *
 * documentation CD or online help for the complete Legal      *
 * Notice.                                                     *
 *                                                             *
 ***************************************************************
 *                                                             *
 * THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION       *
 * INCLUDE TRADE SECRETS AND CONFIDENTIAL AND PROPRIETARY      *
 * PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS.    *
 * The software products and documentation are furnished by    *
 * Ansys, Inc. or its subsidiaries under a software license    *
 * agreement that contains provisions concerning               *
 * non-disclosure, copying, length and nature of use,          *
 * compliance with exporting laws, warranties, disclaimers,    *
 * limitations of liability, and remedies, and other           *
 * provisions.  The software products and documentation may be *
 * used, disclosed, transferred, or copied only in accordance  *
 * with the terms and conditions of that software license      *
 * agreement.                                                  *
 *                                                             *
 * Ansys, Inc. is a UL registered                              *
 * ISO 9001:2015 company.                                      *
 *                                                             *
 ***************************************************************
 *                                                             *
 * This product is subject to U.S. laws governing export and   *
 * re-export.                                                  *
 *                                                             *
 * For U.S. Government users, except as specifically granted   *
 * by the Ansys, Inc. software license agreement, the use,     *
 * duplication, or disclosure by the United States Government  *
 * is subject to restrictions stated in the Ansys, Inc.        *
 * software license agreement and FAR 12.212 (for non-DOD      *
 * licenses).                                                  *
 *                                                             *
 ***************************************************************


 *** WARNING ***                         CP =       0.405   TIME= 16:21:22
 MISSING DOCUMENTATION FILE                                              
  DOCU LIST FILE = /ansys_inc/v241/ansys/gui/en-us/                      
  MISSING FILE NAME = /__w/mapdl-docker-image-builder/.                  


          *****  MAPDL COMMAND LINE ARGUMENTS  *****
  INITIAL DIRECTORY = /tmp/tmp

 RELEASE=                      BUILD= 24.1      UP20231106   VERSION=LINUX x64   
 CURRENT JOBNAME=file0  16:21:22  JAN 03, 2024 CP=      0.409


 RUN SETUP PROCEDURE FROM FILE= /ansys_inc/v241/ansys/apdl/start.ans

 /INPUT FILE= /ansys_inc/v241/ansys/apdl/start.ans  LINE=       0

 BEGIN:

germa89 avatar Jan 03 '24 16:01 germa89

@germa89 you are not using pause wrong; at least that is what I think. It is pretty strongly implied in the help that it is for mapdl interactive. You can enter other APDL commands while paused but the UI throws an warning for all (except the unpause). My guess is that this is built into the UI and not MAPDL per se....if that makes sense.

mikerife avatar Jan 03 '24 16:01 mikerife

Wrapping PAUSE on a non_interactive context (which uses input) does not help to avoid the error message shown above.

 *** WARNING ***                         CP =       3.962   TIME= 11:51:49
 PAUSE is not a recognized PREP7 command, abbreviation, or macro.        
                                            


Ignore these messages by setting 'ignore_errors'=True.

germa89 avatar Sep 09 '24 11:09 germa89