spins model - error: segmentation fault