cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes
load_balance Class Reference

#include <mpi_utilities.h>

Collaboration diagram for load_balance:
Collaboration graph
[legend]

Public Member Functions

 load_balance ()
 
 load_balance (unsigned int nJobs, unsigned int nCPU)
 
 ~load_balance ()
 
void clear ()
 
void init (unsigned int nJobs, unsigned int nCPU)
 
int next_job ()
 
void finalize (exit_type exit_status)
 

Private Member Functions

void p_clear0 ()
 
void p_clear1 ()
 

Private Attributes

vector< int > p_jobs
 
unsigned int p_ptr
 
unsigned int p_rank
 
unsigned int p_ncpu
 

Detailed Description

Definition at line 99 of file mpi_utilities.h.

Constructor & Destructor Documentation

load_balance::load_balance ( )
inline

Definition at line 116 of file mpi_utilities.h.

References p_clear1().

Here is the call graph for this function:

load_balance::load_balance ( unsigned int  nJobs,
unsigned int  nCPU 
)
inline

Definition at line 120 of file mpi_utilities.h.

References init(), and p_clear1().

Here is the call graph for this function:

load_balance::~load_balance ( )
inline

Definition at line 125 of file mpi_utilities.h.

References p_clear0().

Here is the call graph for this function:

Member Function Documentation

void load_balance::clear ( )
inline

Definition at line 129 of file mpi_utilities.h.

References p_clear0(), and p_clear1().

Here is the call graph for this function:

void load_balance::finalize ( exit_type  exit_status)

Definition at line 112 of file mpi_utilities.cpp.

References cpu, t_cpu::i(), t_cpu_i::lgMPI(), MPI_Barrier, p_ncpu, p_rank, and wait.

Referenced by main().

Here is the call graph for this function:

void load_balance::init ( unsigned int  nJobs,
unsigned int  nCPU 
)

Definition at line 61 of file mpi_utilities.cpp.

References cpu, EXIT_FAILURE, fork, fprintf(), t_cpu::i(), ioQQQ, t_cpu_i::lgMPI(), min(), MPI_Bcast, t_cpu_i::nRANK(), p_jobs, p_ncpu, p_ptr, p_rank, pid_t, and t_cpu_i::set_nRANK().

Referenced by load_balance().

Here is the call graph for this function:

int load_balance::next_job ( )
inline

Definition at line 135 of file mpi_utilities.h.

References p_jobs, p_ncpu, and p_ptr.

Referenced by main().

void load_balance::p_clear0 ( )
inlineprivate

Definition at line 105 of file mpi_utilities.h.

References p_jobs.

Referenced by clear(), and ~load_balance().

void load_balance::p_clear1 ( )
inlineprivate

Definition at line 109 of file mpi_utilities.h.

References p_ncpu, p_ptr, and p_rank.

Referenced by clear(), and load_balance().

Field Documentation

vector<int> load_balance::p_jobs
private

Definition at line 101 of file mpi_utilities.h.

Referenced by init(), next_job(), and p_clear0().

unsigned int load_balance::p_ncpu
private

Definition at line 104 of file mpi_utilities.h.

Referenced by finalize(), init(), next_job(), and p_clear1().

unsigned int load_balance::p_ptr
private

Definition at line 102 of file mpi_utilities.h.

Referenced by init(), next_job(), and p_clear1().

unsigned int load_balance::p_rank
private

Definition at line 103 of file mpi_utilities.h.

Referenced by finalize(), init(), and p_clear1().


The documentation for this class was generated from the following files: