Esempio n. 1
0
/** Register the backend 'backend' with the cluster */
void Cluster::registerBackend(const Backend &backend)
{
    if (backend.isNull())
        return;

    QMutexLocker lkr( &(globalCluster()->datamutex) );

    if (not globalCluster()->local_backends.contains(backend.UID()))
    {
        globalCluster()->local_backends.insert( backend.UID(), backend );
        
        #ifdef SIRE_USE_MPI
            //now inform the MPI connected nodes that a backend with this
            //UID is available on this node
            if (::usingMPI())
            {
                SireCluster::MPI::MPICluster::registerBackend(backend);
            }
        #endif
    }
}