Add domain_write_mpi example and fix cmake