How to run MPI jobs on a cluster

Are you able to submit a working example? Running the current code gives

ERROR: LoadError: UndefVarError: n_samples not defined