ROSS
specialized-lps.c
Go to the documentation of this file.
1#include "ross.h"
2#include "analysis-lp.h"
3
4/*
5 * This file is for general set up functions related to setting up any
6 * ROSS specialized LPs.
7 *
8 * TODO add some output on these LPs, add some counters that can be subtracted from other counters, so we're not including this in the model info
9 */
10
14
17
19{
22 {
25 }
26 else
27 return;
28
29 // determine total LPs used by model and assign value to analysis_start_gid
31 MPI_Allreduce(&g_tw_nlp, &g_st_total_model_lps, 1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, MPI_COMM_ROSS);
32 else
34
36 g_st_analysis_nlp = g_tw_nkp; // # of analysis LPs per PE
37
38
39}
40
42{
43 tw_lpid lpid;
44 for(lpid = 0; lpid < g_st_analysis_nlp; lpid++)
45 {
47 tw_lp_onkp(g_tw_lp[g_tw_nlp + lpid], g_tw_kp[lpid]); // analysis lpid == kpid
49 }
50}
51
53{
54 // has to be set at beginning of tw_run, in case model changes g_tw_ts_end between calling tw_init and tw_run
55 if (g_st_sampling_end == 0)
57}
58
60{
61 TWOPT_GROUP("Specialized ROSS LPs"),
62 //TWOPT_UINT("analysis-lps", g_st_use_analysis_lps, "Set to 1 to turn on analysis LPs (1 per KP) for virtual time sampling"),
63 TWOPT_UINT("sample-count", g_st_sample_count, "Number of samples to allocate in memory"),
64 TWOPT_END()
65};
66
68{
69 return special_lp_opt;
70}
void st_analysis_lp_settype(tw_lpid lpid)
tw_lpid analysis_start_gid
@ ALL_STATS
int g_st_model_stats
@ ANALYSIS_LP
double g_st_sampling_end
void st_buffer_init(int type)
int g_st_engine_stats
tw_lpid g_st_analysis_nlp
int g_st_sample_count
tw_lpid g_st_total_model_lps
int g_st_use_analysis_lps
MPI_Comm MPI_COMM_ROSS
Definition network-mpi.c:4
uint64_t tw_lpid
Definition ross-base.h:49
tw_pe * g_tw_pe
Definition ross-global.c:79
tw_lp ** g_tw_lp
Definition ross-global.c:28
tw_kpid g_tw_nkp
Definition ross-global.c:27
tw_kp ** g_tw_kp
Definition ross-global.c:29
tw_peid g_tw_mynode
Definition ross-global.c:92
void tw_lp_onkp(tw_lp *lp, tw_kp *kp)
Definition tw-lp.c:73
tw_lpid g_tw_nlp
Definition ross-global.c:24
tw_synch g_tw_synchronization_protocol
Definition ross-global.c:19
double g_tw_ts_end
Definition ross-global.c:72
void tw_lp_onpe(tw_lpid index, tw_pe *pe, tw_lpid id)
Definition tw-lp.c:57
@ SEQUENTIAL
Definition ross-types.h:37
#define TWOPT_UINT(n, v, h)
Definition tw-opts.h:33
#define TWOPT_GROUP(h)
Definition tw-opts.h:30
#define TWOPT_END()
Definition tw-opts.h:39
const tw_optdef * st_special_lp_opts(void)
const tw_optdef special_lp_opt[]
void specialized_lp_setup()
void specialized_lp_init_mapping()
void specialized_lp_run()