added getter for the number of worker nodes
now distributes the clusters in a better way (as in mpi_write_alignments)