Mechanism to manually release license

Gareth Williams
Gareth Williams Altair Community Member
edited February 18 in Community Q&A

Hi there,


It would be very helpful to have a mechanism to manually force a license release from the command line.


In doing VPI work, one finds oneself gleefully slinging around raw pointers across language boundaries with joyful abandon.  It's pretty to easy to cause segfaults due to human error.


Having to wait for the 5 minute timeout makes for long debug cycles.


A simple command to explicitly request a release of license from a crashed sim would be a nice consideration to the intrepidif incompetent user.



Related:  https://help.metrics.ca/support/discussions/topics/154000621898


Tagged:

Best Answer

  • d3jones
    d3jones New Altair Community Member
    Answer ✓

    There is no way to manually release a license. Unfortunately, providing a way to do this opens an avenue for unsavory users to tamper with the license mechanism. Your only recourse if a license is suspended is to wait for the timeout.


    However, recent releases of DSim will automatically release the license if the program segfaults. Furthermore, this behavior is accessible from a debugger. You may be used to quitting GDB after investigating a segfault. Instead, when you are ready to quit, simply continue execution! GDB will deliver the signal to DSim, which will then release the license and exit, at which point you can exit GDB and re-run as necessary.


    Another tip: the `-trace-vpi` command line option will log all VPI calls (supported or otherwise) and may provide good information without having to use a debugger.


Answers

  • d3jones
    d3jones New Altair Community Member
    Answer ✓

    There is no way to manually release a license. Unfortunately, providing a way to do this opens an avenue for unsavory users to tamper with the license mechanism. Your only recourse if a license is suspended is to wait for the timeout.


    However, recent releases of DSim will automatically release the license if the program segfaults. Furthermore, this behavior is accessible from a debugger. You may be used to quitting GDB after investigating a segfault. Instead, when you are ready to quit, simply continue execution! GDB will deliver the signal to DSim, which will then release the license and exit, at which point you can exit GDB and re-run as necessary.


    Another tip: the `-trace-vpi` command line option will log all VPI calls (supported or otherwise) and may provide good information without having to use a debugger.


  • Gareth Williams
    Gareth Williams Altair Community Member

    Fair enough --  I am, however, using what I believe is the latest version of DSim[1], and I fairly frequently crash DSim without the license being released (generally, I think it happens when my code is at fault on the app side). 


    I've managed to crash the linker, too, a few times, which definitely doesn't release license.



    -trace-vpi has been indeed a handy source of useful info -- thank you.


    [1] $ dsim -version -> 20240923.5.0


  • Shaun_Altair
    Shaun_Altair
    Altair Employee

    DSim 20240923.9.0 is the latest version, if you want to try it.