Programming clustered parallel reduction machines