SST/macro
Classes | Enumerations | Functions
uq.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uq_param_t
 

Enumerations

enum  uq_param_type_t {
  ByteLength, Bandwidth, Latency, Time,
  Frequency, String, ValueWithUnits
}
 
enum  uq_spawn_type_t { Fork, MPIScan }
 

Functions

double ** allocate_results (void *queue, int njobs, int nresults)
 Allocate a 2D double array. More...
 
double ** allocate_values (void *queue, int njobs, int nparams)
 Allocate a 2D double array. More...
 
uq_param_t ** allocate_params (int njobs, int nparams)
 Allocate a 2D array of param structs. More...
 
int sstmac_uq_int_param (void *queue, const char *param)
 
int sstmac_uq_double_param (void *queue, const char *param)
 
int sstmac_uq_sim_nproc (void *queue)
 
int sstmac_uq_max_nproc (void *queue)
 
void free_results (double **results)
 Free a 2D array allocated by allocate_results function. More...
 
void free_values (double **values)
 Free a 2D array allocated by allocate_values function. More...
 
void free_params (uq_param_t **params)
 Free a 2D array allocated by allocate_params function. More...
 
void * sstmac_uq_init (int argc, char **argv, int *workerID)
 
void sstmac_uq_stop (void *queue)
 
void sstmac_uq_busy_loop (void *queue)
 
void sstmac_uq_run (void *queue, int njobs, int nparams, int nresults, int max_nthread, const char *param_names[], uq_param_t *param_values[], double *results[], uq_spawn_type_t ty)
 Run a set of jobs with particular parameters, forking new procs for parallelism. More...
 
void sstmac_uq_run_units (void *queue, int njobs, int nparams, int nresults, int max_nthread, const char *param_names[], double *param_values[], const char *units[], double *results[], uq_spawn_type_t spwan_ty)
 Run a set of jobs with particular parameters. More...
 
void sstmac_uq_finalize (void *queue)
 

Enumeration Type Documentation

Enumerator
ByteLength 
Bandwidth 
Latency 
Time 
Frequency 
String 
ValueWithUnits 

Definition at line 8 of file uq.h.

Enumerator
Fork 
MPIScan 

Definition at line 18 of file uq.h.

Function Documentation

uq_param_t** allocate_params ( int  njobs,
int  nparams 
)

Allocate a 2D array of param structs.

Parameters
njobs
nparams
double** allocate_results ( void *  queue,
int  njobs,
int  nresults 
)

Allocate a 2D double array.

Parameters
njobs
nresults
double** allocate_values ( void *  queue,
int  njobs,
int  nparams 
)

Allocate a 2D double array.

Parameters
njobs
nparams
void free_params ( uq_param_t **  params)

Free a 2D array allocated by allocate_params function.

Parameters
params
void free_results ( double **  results)

Free a 2D array allocated by allocate_results function.

Parameters
results
void free_values ( double **  values)

Free a 2D array allocated by allocate_values function.

Parameters
values
void sstmac_uq_busy_loop ( void *  queue)
int sstmac_uq_double_param ( void *  queue,
const char *  param 
)
void sstmac_uq_finalize ( void *  queue)
Parameters
queueA pointer to a queue object created by sstmac_uq_init After finalize, the queue is no longer usable and all resources used by the queue are freed
void* sstmac_uq_init ( int  argc,
char **  argv,
int *  workerID 
)
Parameters
argcThe argc that would be used by a standalone SST/macro simulation
argvThe argv that would be used by a standalone SST/macro simulation
workerIDThe ID of this worker in a parallel group. 0 return means master. Workers who receiver other than zero should immediately go into sstmac_uq_busy_loop and do nothing else.
Returns
A void* pointer to the simulation queue object. This pointer should NOT be freed. Value is void* for C compatibility.
int sstmac_uq_int_param ( void *  queue,
const char *  param 
)
int sstmac_uq_max_nproc ( void *  queue)
void sstmac_uq_run ( void *  queue,
int  njobs,
int  nparams,
int  nresults,
int  max_nthread,
const char *  param_names[],
uq_param_t param_values[],
double *  results[],
uq_spawn_type_t  ty 
)

Run a set of jobs with particular parameters, forking new procs for parallelism.

Parameters
queueA pointer to a queue object created by sstmac_uq_init
njobsThe number of jobs (simulations) to run
nparamsThe number of parameters to set for each job
nresultsThe number of results returned by each job
max_nthreadThe maximum number of threads or, i.e. the max number of jobs that can run simultaneously
param_namesAn array of size nparams. The name of each parameter to configure for each job
param_valuesA 2D array of size njobs X nparams The value corresponding to each paramter for all jobs Indexed as p[jobID][paramID]
resultsA 2D array of size njobs X nresults Will hold the result values for each job Indexed as p[jobID][resultID]
tyThe type of run to perform. Fork new procs or MPI scan.
void sstmac_uq_run_units ( void *  queue,
int  njobs,
int  nparams,
int  nresults,
int  max_nthread,
const char *  param_names[],
double *  param_values[],
const char *  units[],
double *  results[],
uq_spawn_type_t  spwan_ty 
)

Run a set of jobs with particular parameters.

Parameters
queueA pointer to a queue object created by sstmac_uq_init
njobsThe number of jobs (simulations) to run
nparamsThe number of parameters to set for each job
nresultsThe number of results returned by each job
max_nthreadThe maximum number of threads or, i.e. the max number of jobs that can run simultaneously
param_namesAn array of size nparams. The name of each parameter to configure for each job
param_valuesA 2D array of size njobs X nparams The value corresponding to each paramter for all jobs Indexed as p[jobID][paramID]
resultsA 2D array of size njobs X nresults Will hold the result values for each job Indexed as p[jobID][resultID]
int sstmac_uq_sim_nproc ( void *  queue)
void sstmac_uq_stop ( void *  queue)