Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Implement pbs_ifl module in Cython
    Currently, we use swig to create pbs_ifl.py that provides wrappers to the _pbs_ifl methods. If the same is implemented using Cython, dependency on swig for building can be removed and some performance improvement can be achieved.
    Item 1, 3 and 4 would mean that we convert the yellow boxes in Hooks Interface from Python to Cython.

Running site hooks using Cython (Experimental)

  • Cython does not execute Python statements, it provides a C file as output.

  • To convert the .c file to either a .so or an executable, we need a C compiler to be present.

  • For importing and executing site hooks.

    • a C compiler (gcc for Linux and Build Tools for Windows) would be needed on all hosts.

    • Cython will also be needed to be present on all hosts

    • User provided python file will be converted to a .c file using cython

    • the resultant .c will be compiled into a .so or .pyd using the C compiler.

    • Using dlopen(), the .so will be loaded

    • Using dlsym(), we will get the address of PyInit_<hookname> function.

    • Load the module by calling PyInit_<hookname> function.

...