LSDM in C/C++, for cluster use