An object that tracks the available resources for the main simulation runner.  
 More...
#include <ResourceAllocator.h>
An object that tracks the available resources for the main simulation runner. 
◆ ResourceAllocator() [1/2]
      
        
          | lm::main::ResourceAllocator::ResourceAllocator | ( | int | processNumber, | 
        
          |  |  | int | numberCpuCores, | 
        
          |  |  | float | cpuCoresPerReplicate ) | 
      
 
Create a ResourceAllocator. 
- Parameters
- 
  
    | processNumber | The process identifier |  | numberCpuCores | The number of cores on teh resource |  | cpuCoresPerPrelicate | The number of cores to be used by each simulation replicate |  
 
 
 
◆ ResourceAllocator() [2/2]
      
        
          | lm::main::ResourceAllocator::ResourceAllocator | ( | int | processNumber, | 
        
          |  |  | int | numberCpuCores, | 
        
          |  |  | float | cpuCoresPerReplicate, | 
        
          |  |  | vector< int > | cudaDevices, | 
        
          |  |  | float | cudaDevicesPerReplicate ) | 
      
 
Create a ResourceAllocator. 
- Parameters
- 
  
    | processNumber | The process identifier |  | numberCpuCores | The number of cores on teh resource |  | cpuCoresPerPrelicate | The number of cores to be used by each simulation replicate |  | cudaDevices | A set of the identifiers for the available CUDA devices |  | cudaDevicesPerReplicate | The number of GPUs to be used by each simulation replicate |  
 
 
 
◆ ~ResourceAllocator()
  
  | 
        
          | lm::main::ResourceAllocator::~ResourceAllocator | ( |  | ) |  |  | virtual | 
 
 
◆ assignReplicate()
Assign a replicate to free resources. 
- Parameters
- 
  
    | replicate | The replicate identifier |  
 
- Returns
- A class representing the compute resources given to the replicate 
 
 
◆ getAvailableCpuCores()
  
  | 
        
          | vector< int > lm::main::ResourceAllocator::getAvailableCpuCores | ( |  | ) |  |  | static | 
 
Parse CPU affinity list from /proc/self/status. 
- Returns
- Vector of available CPU core indices 
 
 
◆ getMaxSimultaneousReplicates()
  
  | 
        
          | int lm::main::ResourceAllocator::getMaxSimultaneousReplicates | ( |  | ) |  |  | virtual | 
 
Get maximum number of replicates that can run at a time on the available resources based on cudaDevices and numberCpuCores. 
 
 
◆ removeReplicate()
  
  | 
        
          | void lm::main::ResourceAllocator::removeReplicate | ( | int | replicate | ) |  |  | virtual | 
 
Remove a replicate from those that are running. 
- Parameters
- 
  
    | replicate | The replicate identifier |  
 
 
 
◆ reserveCpuCore()
  
  | 
        
          | int lm::main::ResourceAllocator::reserveCpuCore | ( |  | ) |  |  | virtual | 
 
Reserve a particular core. 
- Returns
- The identifer fo the core that has been reserved 
 
 
◆ availableCpuCores
  
  | 
        
          | vector<int> lm::main::ResourceAllocator::availableCpuCores |  | protected | 
 
 
◆ cpuSlots
  
  | 
        
          | int** lm::main::ResourceAllocator::cpuSlots |  | protected | 
 
 
◆ cpuSlotsPerCore
  
  | 
        
          | int lm::main::ResourceAllocator::cpuSlotsPerCore |  | protected | 
 
 
◆ cpuSlotsPerReplicate
  
  | 
        
          | int lm::main::ResourceAllocator::cpuSlotsPerReplicate |  | protected | 
 
 
◆ cudaDevices
  
  | 
        
          | vector<int> lm::main::ResourceAllocator::cudaDevices |  | protected | 
 
 
◆ cudaSlots
  
  | 
        
          | int** lm::main::ResourceAllocator::cudaSlots |  | protected | 
 
 
◆ cudaSlotsPerDevice
  
  | 
        
          | int lm::main::ResourceAllocator::cudaSlotsPerDevice |  | protected | 
 
 
◆ cudaSlotsPerReplicate
  
  | 
        
          | int lm::main::ResourceAllocator::cudaSlotsPerReplicate |  | protected | 
 
 
◆ mutex
  
  | 
        
          | pthread_mutex_t lm::main::ResourceAllocator::mutex |  | protected | 
 
 
◆ numberCpuCores
  
  | 
        
          | int lm::main::ResourceAllocator::numberCpuCores |  | protected | 
 
 
◆ processNumber
  
  | 
        
          | int lm::main::ResourceAllocator::processNumber |  | protected | 
 
 
◆ reservedCpuCores
  
  | 
        
          | int lm::main::ResourceAllocator::reservedCpuCores |  | protected | 
 
 
The documentation for this class was generated from the following files: