charmplusplus / charm4py

Parallel Programming with Python and Charm++
https://charm4py.readthedocs.io
Apache License 2.0
290 stars 21 forks source link

Deprecate CTypes Backend #193

Open ZwFink opened 3 years ago

ZwFink commented 3 years ago

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 commented 3 years ago

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

evan-charmworks commented 3 years ago

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

rbuch commented 3 years ago

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.