Dear Peiwei,
This PR
https://github.com/i-pi/i-pi/pull/85 should fix your troubles and you could continue using pile_g. Could you please check that it does? It works for me now, but you had a different error. You should be able to clone that branch. If not, let me know.
Note that you will have to add to your i-PI input file the line <fixcom> False </fixcom>. The reason is that now i-PI will stop if you try to have fixed center of mass and fixed atoms (which break translational symmetry) at the same time. We may
improve the handling of this in the near future, but for now please add that line _if_ you want to fix atoms in your simulation.
In your simulation, if you are free to use any thermostat, pile_l for example is perhaps a better choice (local thermostat on the centroid) or any sort of nm_gle. However, it is not a must, and things should be fine also with pile_g now.
Cheers,
Mariana