@prakashcv13 : nice start on exploring how to import PBS Python hooks implementation by using cython. I also feel that we shouldn’t be converting user’s python hook scripts to cython. But if we do, would it be like when the site hook is imported, pbs would dynamically run cython to produce C equivalent files, and then compile into shared object, before PBS executes them? That might actually add a delay when importing hooks.
On the other hand, the pbs hooks can be converted by cython since PBS internally ships them.
It would be nice too if this use of cython can de-couple python hook execution from main pbs_server. Currently, if there’s a problem with the hook (like a bad mem acess) and causes a process crash, it also likely to take down pbs_server as interpreter is embedded. That doesn’t happen with mom hooks as pbs_mom calls ‘pbs_python’ to execute the hook, and if there’s a problem, only the ‘pbs_python’ process goes down.