Fix and workaround memory errors.
Allocage the parent array on the device, for the call to initPotential.