| Cyclops Tensor Framework
    parallel arithmetic on multidimensional arrays | 
Linear performance models, which given measurements, provides new model guess. More...
#include <model.h>


| Public Member Functions | |
| LinModel (double const *init_guess, char const *name, int hist_size=32768) | |
| constructor  More... | |
| LinModel () | |
| ~LinModel () | |
| void | update (MPI_Comm cm) | 
| updates model based on observarions  More... | |
| void | observe (double const *time_param) | 
| records observation consisting of execution time and nparam paramter values  More... | |
| bool | should_observe (double const *time_param) | 
| decides whether the current instance should be observed  More... | |
| double | est_time (double const *param) | 
| estimates model time based on observarions  More... | |
| void | print () | 
| prints current parameter estimates  More... | |
| void | print_uo () | 
| prints time estimate errors  More... | |
| double * | get_coeff () | 
| return the turned model coefficients  More... | |
| void | load_coeff (std::string file_name) | 
| load model coefficients from file  More... | |
| void | write_coeff (std::string file_name) | 
| write model coefficients to file  More... | |
| void | dump_data (std::string path) | 
| dump model data to a file  More... | |
| Data Fields | |
| int | hist_size | 
| the number of latest observations we want to consider when updating the model  More... | |
| double * | time_param_mat | 
| matrix containing parameter/time obervations, with hist_size columns and nmat_lda rows, stores the last hist_size paramstime obervations  More... | |
| double | coeff_guess [nparam] | 
| current coefficients for each paramter that the linear model will use  More... | |
| char * | name | 
| name of model  More... | |
Linear performance models, which given measurements, provides new model guess.
| CTF_int::LinModel< nparam >::LinModel | ( | double const * | init_guess, | 
| char const * | name, | ||
| int | hist_size = 32768 | ||
| ) | 
constructor
| [in] | init_guess | array of size nparam consisting of initial model parameter guesses | 
| [in] | name | identifier | 
| [in] | hist_size | number of times to keep in history | 
Definition at line 122 of file model.cxx.
References CTF_int::alloc(), and CTF_int::get_all_models().
| CTF_int::LinModel< nparam >::LinModel | ( | ) | 
| CTF_int::LinModel< nparam >::~LinModel | ( | ) | 
Definition at line 159 of file model.cxx.
References CTF_int::cdealloc().
| 
 | virtual | 
dump model data to a file
Reimplemented from CTF_int::Model.
Definition at line 686 of file model.cxx.
References ctf.core::np(), ctf.core::rank(), and ctf.core::string.
Referenced by CTF_int::CubicModel< nparam >::dump_data().
| double CTF_int::LinModel< nparam >::est_time | ( | double const * | param | ) | 
estimates model time based on observarions
| [in] | param | array of size nparam of form [val_1,val_2,...,val_nparam] | 
Definition at line 530 of file model.cxx.
Referenced by CTF_int::blres_est_time(), CTF_int::CubicModel< nparam >::est_time(), CTF_int::seq_tsr_spctr::est_time_fp(), CTF_int::seq_tsr_ctr::est_time_fp(), CTF_int::spctr_pin_keys::est_time_fp(), CTF_int::CommData::estimate_allred_time(), CTF_int::CommData::estimate_alltoall_time(), CTF_int::CommData::estimate_alltoallv_time(), CTF_int::CommData::estimate_bcast_time(), and CTF_int::CommData::estimate_red_time().
| double * CTF_int::LinModel< nparam >::get_coeff | ( | ) | 
return the turned model coefficients
Definition at line 556 of file model.cxx.
Referenced by CTF_int::CubicModel< nparam >::get_coeff().
| 
 | virtual | 
load model coefficients from file
| [in] | file_name | the file we wish to load model coefficients from | 
Reimplemented from CTF_int::Model.
Definition at line 622 of file model.cxx.
References ctf.core::string.
Referenced by CTF_int::CubicModel< nparam >::load_coeff().
| void CTF_int::LinModel< nparam >::observe | ( | double const * | time_param | ) | 
records observation consisting of execution time and nparam paramter values
| [in] | time_param | array of size nparam+1 of form [exe_sec,val_1,val_2,...,val_nparam] | 
Definition at line 168 of file model.cxx.
Referenced by CTF_int::CommData::all_to_allv(), CTF_int::CommData::allred(), CTF_int::CommData::bcast(), CTF_int::block_reshuffle(), CTF_int::CubicModel< nparam >::observe(), CTF_int::CommData::red(), CTF_int::seq_tsr_spctr::run(), CTF_int::seq_tsr_ctr::run(), and CTF_int::spctr_pin_keys::run().
| 
 | virtual | 
prints current parameter estimates
Reimplemented from CTF_int::Model.
Definition at line 539 of file model.cxx.
Referenced by CTF_int::CubicModel< nparam >::print().
| 
 | virtual | 
prints time estimate errors
Reimplemented from CTF_int::Model.
Definition at line 550 of file model.cxx.
Referenced by CTF_int::CubicModel< nparam >::print_uo().
| bool CTF_int::LinModel< nparam >::should_observe | ( | double const * | time_param | ) | 
decides whether the current instance should be observed
| [in] | time_param | array of size nparam+1 of form [exe_sec,val_1,val_2,...,val_nparam] | 
Definition at line 215 of file model.cxx.
References ASSERT.
Referenced by CTF_int::CommData::all_to_allv(), CTF_int::CommData::allred(), CTF_int::CommData::bcast(), CTF_int::block_reshuffle(), CTF_int::CommData::red(), CTF_int::seq_tsr_spctr::run(), CTF_int::seq_tsr_ctr::run(), and CTF_int::CubicModel< nparam >::should_observe().
| 
 | virtual | 
updates model based on observarions
| [in] | cm | communicator across which we should synchronize model (collect observations) | 
Reimplemented from CTF_int::Model.
Definition at line 227 of file model.cxx.
References CTF_int::alloc(), ctf.core::b, CTF_int::cdealloc(), CTF_int::cdgelsd(), CTF_int::cdgeqrf(), CTF_int::cdormqr(), CTF_int::lda_cpy(), ctf.core::np(), ctf.core::rank(), and REG_LAMBDA.
Referenced by CTF_int::CubicModel< nparam >::update().
| 
 | virtual | 
write model coefficients to file
| [in] | file_name | the file we wish to write model coefficients to | 
Reimplemented from CTF_int::Model.
Definition at line 561 of file model.cxx.
References ctf.core::string.
Referenced by CTF_int::CubicModel< nparam >::write_coeff().
| double CTF_int::LinModel< nparam >::coeff_guess[nparam] | 
| int CTF_int::LinModel< nparam >::hist_size | 
| char* CTF_int::LinModel< nparam >::name | 
| double* CTF_int::LinModel< nparam >::time_param_mat |