charm4py icon indicating copy to clipboard operation
charm4py copied to clipboard

Deprecate CTypes Backend

Open ZwFink opened this issue 4 years ago • 3 comments

Currently, Charm4Py uses 3 different backends to interface with the Charm++ runtime library: Cython, CFFI, and Ctypes. In the manual, Cython and CFFI are recommended for different Python builds, but Ctypes is not recommended. It also doesn't look like there is a way to build Charm4Py with the Ctypes backend in the installation script.

Given this, I think it would be appropriate to deprecate the Ctypes backend to reduce the amount of work required to make changes to the Charm++/Charm4Py interface.

ZwFink avatar Dec 23 '20 19:12 ZwFink

Mentioning @rbuch and @matthiasdiener as I think you're the two within PPL that are involved in Charm4Py development.

ZwFink avatar Dec 23 '20 19:12 ZwFink

It would be good to know what exactly is bad about ctypes before deprecating it.

evan-charmworks avatar Dec 23 '20 20:12 evan-charmworks

I think this probably makes sense to do. Based on a cursory investigation, it seems like CFFI is basically a better replacement for Ctypes, the only caveat being that Ctypes is in the standard library, so it's perhaps a bit more portable, but I think that's moot given the state of Python package management.

It might also be worth looking into cppyy or pybind11, if they improve performance or ease of use.

rbuch avatar Dec 23 '20 20:12 rbuch