lammps as a python library

Hi everyone,

I was wondering about lammps performance when used as a python library (apart from the obvious overhead). I know it can get through mpi tu use multiple processors, but can it use GPU or CUDA properly?

and what about the time cost of functions like lmp.extract_variable(name,group,flag)?

just to give you the idea of what I am doing, in a global sense, I need to do an automatic check for system thermalisation before getting the thermo values of the system, and I thought of python wrapping as the cleanest and easiest solution (I’m still kinda afraid of getting my hands on the c++ code :frowning: )

greetings
pablo

Hi everyone,

I was wondering about lammps performance when used as a python library
(apart from the obvious overhead). I know it can get through mpi tu use
multiple processors, but can it use GPU or CUDA properly?

there is no principal problem. the python library is essentially the
lammps executable with the main() function removed and some
convenience functions in plain C added. those are also the interface
to python (via ctypes).

there may be a benefit to using the GPU package, since it doesn't have
the sophisticated host/gpu data transfer logic.

axel.

ok, great, i’ll try this way then, thanks

pablo