Changeset 20103

Show
Ignore:
Timestamp:
05/02/07 08:21:06 (2 years ago)
Author:
aronb
Message:

Remove code that is no longer useful.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/cluster/ClusterManager.cpp

    r20074 r20103  
    153153   ClusterManager::ClusterManager() 
    154154      : mClusterActive( false ) 
    155       , mClusterReady( false ) 
    156155      , mClusterStarted( false ) 
    157156      , mIsMaster(false) 
     
    224223      if (mIsMaster) 
    225224      { 
    226          std::cout << "XXX: ClusterManager::start() MASTER" << std::endl; 
    227225         if (NULL == mClusterElement.get()) 
    228226         { 
     
    251249            (*itr)->send(cfg_pkt); 
    252250         } 
    253          std::cout << "Before barrier" << std::endl; 
    254251         sendEndBlocksAndSignalUpdate(0); 
    255          std::cout << "After barrier" << std::endl; 
    256          //while(true) 
    257          //{;} 
    258          // Wait for all needed configuration. 
    259          // Connect to all nodes. 
    260252      } 
    261253      else if (mIsSlave) 
    262254      { 
    263          std::cout << "XXX: ClusterManager::start() SLAVE" << std::endl; 
    264255         // Start listening on known port for connections. 
    265256         mClusterNetwork->waitForConnection(); 
    266          std::cout << "Before barrier" << std::endl; 
    267257         sendEndBlocksAndSignalUpdate(0); 
    268          std::cout << "After barrier" << std::endl; 
    269          //while(true) 
    270          //{;} 
    271258      } 
    272259   } 
     
    274261   bool ClusterManager::isClusterReady() 
    275262   { 
    276       // -If the cluster is active and not ready 
    277       //   -If a StartBarrier jccl::ConfigElement does not exist 
    278       //    -Warn the user and set cluster ready 
    279       //   -Get new value of mClusterReady from asking all plugins 
    280       // -Return the new mClusterReady 
    281  
    282       vpr::Guard<vpr::Mutex> ready_guard( mClusterReadyLock ); 
    283263      vpr::Guard<vpr::Mutex> active_guard( mClusterActiveLock ); 
    284264 
    285       if ( mClusterActive && !mClusterReady ) 
    286       { 
    287          if ( !jccl::ConfigManager::instance()->hasElementType( "start_barrier_plugin" ) ) 
    288          { 
    289             vprDEBUG(gadgetDBG_RIM, vprDBG_WARNING_LVL) 
    290                << clrOutBOLD(clrCYAN, "NOTE:") << std::endl << vprDEBUG_FLUSH; 
    291             vprDEBUG_NEXT(gadgetDBG_RIM, vprDBG_WARNING_LVL) 
    292                << "The start_barrier_plugin config element does not exist.\n" 
    293                << vprDEBUG_FLUSH; 
    294             vprDEBUG_NEXT(gadgetDBG_RIM, vprDBG_WARNING_LVL) 
    295                << "If your application depends on each node starting at the " 
    296                << "same time,\n" << vprDEBUG_FLUSH; 
    297             vprDEBUG_NEXT(gadgetDBG_RIM, vprDBG_WARNING_LVL) 
    298                << "then you should load and configure the Start Barrier " 
    299                << "Plug-in.\n" << vprDEBUG_FLUSH; 
    300  
    301             mClusterReady = true; 
    302          } 
    303       } 
     265      const std::string window_type("display_window"); 
     266      bool pending_windows = false; 
     267      //bool pending_windows = jccl::ConfigManager::instance()->isElementTypeInPendingList(window_type); 
     268 
    304269      // Lock it here so that we can avoid confusion in pluginsReady() 
    305270      vpr::Guard<vpr::Mutex> guard( mPluginsLock ); 
    306       return( mClusterReady && pluginsReady() ); 
     271      return( !pending_windows && pluginsReady() ); 
    307272   } 
    308273 
  • juggler/trunk/modules/gadgeteer/cluster/ClusterManager.h

    r20079 r20103  
    266266 
    267267   /** 
    268     * Change the ready state of the ClusterManager. 
    269     */ 
    270    void setClusterReady( const bool ready ) 
    271    { 
    272       vpr::Guard<vpr::Mutex> guard( mClusterReadyLock ); 
    273  
    274       vprDEBUG( gadgetDBG_RIM, vprDBG_CONFIG_LVL ) 
    275          << clrOutBOLD( clrCYAN, "[ClusterManager]" ) 
    276          << " Cluster is ready." << std::endl << vprDEBUG_FLUSH; 
    277  
    278       mClusterReady = ready; 
    279    } 
    280  
    281    /** 
    282268    * Output the current status of the cluster. 
    283269    */ 
     
    351337   bool                         mClusterActive;      /**< Flag informing us if this app is running on a cluster. */ 
    352338 
    353    vpr::Mutex                   mClusterReadyLock;   /**< Lock on ClusterReady bool.*/ 
    354    bool                         mClusterReady;       /**< Flag set true when all dependancies are satisfied. */ 
    355  
    356339   bool                         mClusterStarted;     /**< If the cluster has already started. */ 
    357340 
  • juggler/trunk/modules/gadgeteer/gadget/AbstractNetworkManager.cpp

    r20078 r20103  
    296296   { 
    297297      // -Set New State 
    298       if (node == NULL) 
    299       { 
    300          return; 
    301       } 
    302  
     298      vprASSERT(NULL != node.get() && "Can't have a NULL node."); 
    303299      node->setUpdated( true ); 
    304300      return; 
    305301   } 
    306    else if (packet->getPacketType() == cluster::Header::RIM_CONNECTION_REQ || 
    307             packet->getPacketType() == cluster::Header::RIM_CONNECTION_ACK) 
    308    { 
    309       //handleLocalPacket(packet, node); 
    310        
    311       vprDEBUG( gadgetDBG_NET_MGR, vprDBG_CRITICAL_LVL ) 
    312          << clrOutBOLD( clrRED, "[ERROR] " ) 
    313          << "RIM_CONNECTION_REQ & RIM_CONNECTION_ACK data packet types are depreciated." 
    314          << std::endl << vprDEBUG_FLUSH; 
    315       return; 
    316    } 
    317302 
    318303   vpr::GUID handler_guid = packet->getPluginId(); 
    319  
    320304   PacketHandler* temp_handler = getHandlerByGUID( handler_guid ); 
    321305 
  • juggler/trunk/modules/gadgeteer/plugins/ApplicationDataManager/ApplicationDataManager.cpp

    r20074 r20103  
    3030 
    3131#include <cluster/ClusterManager.h> 
    32 #include <gadget/AbstractNetworkManager.h> 
    3332#include <gadget/Node.h> 
    3433#include <gadget/Util/Debug.h>