Charades
Macros | Functions | Variables
lp.C File Reference

Definitions of methods associated with LPs. More...

#include "lp.h"
#include "avl_tree.h"
#include "event.h"
#include "factory.h"
#include "globals.h"
#include "mapper.h"
#include "mpi-interoperate.h"
#include "scheduler.h"
#include "statistics.h"
#include "util.h"
#include <assert.h>
#include <float.h>
#include "lp.def.h"

Macros

#define PE_VALUE(x)   scheduler->globals->x
 
#define PE_STATS(x)   scheduler->stats->x
 

Functions

void create_lps ()
 Calls ckNew to create the LP chare array (only if we are rank 0), and then starts the charm scheduler on every rank.
 
void init_lps ()
 Calls init on the array of LP chares (only if we are rank 0), and then starts the charm scheduler on every rank.
 
LB Helper Functions

Functions for converting timestamps to weights based on the selected metric.

Conversions can be inverted to switch what is considered heavy vs light.

double tsPercent (Time ts)
 
double tsAbs (Time ts)
 
double timeToWeight (Time ts)
 

Variables

CProxy_LPChare lps
 A readonly declaration for a global lp proxy. More...
 
int isLpSet = 0
 A flag determining whether the lps global proxy is valid. More...
 

Detailed Description

Definitions of methods associated with LPs.

Function Documentation

◆ timeToWeight()

double timeToWeight ( Time  ts)
Parameters
tstimestamp to convert to a weight
Returns
the result of tsAbs or tsPercent based on metric configuration

◆ tsAbs()

double tsAbs ( Time  ts)
Parameters
tstimestamp to convert to a weight
Returns
the timestamp bounded by end time, and inverted if required

◆ tsPercent()

double tsPercent ( Time  ts)
Parameters
tstimestamp to convert to a weight
Returns
how close the timestamp is to the simulation end time, as a percent

Variable Documentation

◆ isLpSet

int isLpSet = 0

A flag determining whether the lps global proxy is valid.

It is needed due to the fact that the array isn't created in a mainchare, so the readonly value is not automatically propogated.

◆ lps

CProxy_LPChare lps

A readonly declaration for a global lp proxy.

Todo:
Re-evaluate need for global/readonly proxies with the new arch