Changeset 868
- Timestamp:
- 01/29/08 12:48:55
- Files:
-
- trunk/include/vpb/MachinePool (modified) (2 diffs)
- trunk/include/vpb/System (modified) (1 diff)
- trunk/src/vpb/MachinePool.cpp (modified) (1 diff)
- trunk/src/vpb/System.cpp (modified) (2 diffs)
- trunk/src/vpb/TaskManager.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/vpb/MachinePool
r829 r868 184 184 Machine* getMachine(const std::string& hostname); 185 185 186 unsigned int getNumMachines() const { return _machines.size(); } 187 186 188 void startThreads(); 187 189 … … 207 209 208 210 bool write(const std::string& filename) const; 211 212 bool setUpOnLocalHost(); 209 213 210 214 /** Send a signal to the all running tasks. */ trunk/include/vpb/System
r816 r868 34 34 extern VPB_EXPORT std::string& getTaskDirectory(); 35 35 extern VPB_EXPORT std::string& getMachineFileName(); 36 extern VPB_EXPORT std::string& getCacheFileName(); 36 37 37 38 inline bool getAttributeValue(const std::string& field, const std::string& name, std::string& value) trunk/src/vpb/MachinePool.cpp
r864 r868 678 678 } 679 679 680 bool MachinePool::setUpOnLocalHost() 681 { 682 log(osg::NOTICE,"Setting up MachinePool to use all %i cores on this machine.",OpenThreads::GetNumberOfProcessors()); 683 addMachine(vpb::getLocalHostName(),vpb::getCacheFileName(),std::string(),std::string(),OpenThreads::GetNumberOfProcessors()); 684 } 685 680 686 void MachinePool::removeAllOperations() 681 687 { trunk/src/vpb/System.cpp
r831 r868 48 48 std::string& vpb::getTaskDirectory() { return System::instance()->getTaskDirectory(); } 49 49 std::string& vpb::getMachineFileName() { return System::instance()->getMachineFileName(); } 50 std::string& vpb::getCacheFileName() { return System::instance()->getCacheFileName(); } 50 51 51 52 /////////////////////////////////////////////////////////////////////////////////////////////////// … … 170 171 MachinePool* System::getMachinePool() 171 172 { 172 if (!_machinePool && !_machineFileName.empty())173 if (!_machinePool) 173 174 { 174 175 _machinePool = new MachinePool; 175 _machinePool->read(_machineFileName); 176 177 if (!_machineFileName.empty()) 178 { 179 _machinePool->read(_machineFileName); 180 } 181 182 if (_machinePool->getNumMachines()==0) 183 { 184 _machinePool->setUpOnLocalHost(); 185 } 176 186 } 177 187 trunk/src/vpb/TaskManager.cpp
r854 r868 126 126 } 127 127 128 129 128 while (arguments.read("--modified")) 130 129 {
