fixed test for serial / MPI version generate routine of heisenberg_hamiltonian