ansys / pyansys

Delivering PyAnsys libraries as a bundle
https://docs.pyansys.com
MIT License
139 stars 67 forks source link

Add server license option to switch between read only and read/write or check in license #691

Open dkowollik opened 1 week ago

dkowollik commented 1 week ago

📝 Description of the feature

Hi, our plan is to use several pyansys packages (four to five) in an optimization workflow. The launch, open, save and exit of all the ansys services takes a lot of overhead in such a workflow. Therefore, it would be beneficial to be able to launch the services at the beginning and do the update loops subsequently in each needed service. Unfortunately, at the moment this means to check out four to five licenses at the same time for larger pyansys workflows. It is not possible to pass on i.e. a preppost increment between the packages. A helper class like a LaunchHandler that can take care of multiple pyansys services and pass on lincenses in between servicese would be great.

As a minimum enhancement it would be great to have at least a license_check_in() and license_check_out() method. With these methods in place, one does not block too many licenses. The overhead would be reduced. For example PyACP only uses check_in and check_out during update loops.

Each pyansys service behaves differently. For the license usage it would be great, if they are harmonized and the backends are enhanced to be able to provide such a behaviour.

For example, in-memory model transfer between services in combination with the ability to pass on licenses between services would be a perfect combination for complex workflows.

Thanks!

💡 Steps for implementing the feature

No response

🔗 Useful links and references

No response

RobPasMue commented 1 week ago

Hi @dkowollik - thanks for opening this issue. Since this is a general request for all packages let me transfer it to the https://github.com/ansys/pyansys repository for a broader audience.

dkowollik commented 1 week ago

Hi @RobPasMue,

thank you for the transfer! lol - You responded and transfered the request so fast, that I thought the request disappeard somehow.