APEMoST
|
Go to the source code of this file.
Defines | |
#define | DEBUG |
#define | IFDEBUG if(1) |
#define | SEGV |
#define | IFSEGV if(1) |
#define | IFWAIT if(0) |
#define | VERBOSE |
#define | IFVERBOSE if(1) |
#define | STRINGIFY(x) #x |
#define | TOSTRING(x) STRINGIFY(x) |
#define | AT __FILE__ ":" TOSTRING(__LINE__) |
#define | debug(str) IFDEBUG { printf("\tDEBUG[%s]: %s\n", AT, str); fflush(NULL); } |
#define | dump_i(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %i\n", AT, str, var); fflush(NULL); } |
#define | dump_ui(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %u\n", AT, str, var); fflush(NULL); } |
#define | dump_d(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %f\n", AT, str, var); fflush(NULL); } |
#define | dump_l(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %l\n", AT, str, var); fflush(NULL); } |
#define | dump_ul(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %lu\n", AT, str, var); fflush(NULL); } |
#define | dump_size(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %lu\n", AT, str, (unsigned long)var); fflush(NULL); } |
#define | dump_i_s(str, index, var) IFDEBUG { printf("\tDEBUG[%s]: %s[%i]: %s\n", AT, str, index, var); fflush(NULL); } |
#define | dump_s(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %s\n", AT, str, var); fflush(NULL); } |
#define | dump_p(str, var) IFDEBUG { printf("\tDEBUG[%s]: %s: %p\n", AT, str, var); fflush(NULL); } |
#define | dump_v(str, v) IFDEBUG { printf("\tDEBUG[%s]: %s: ", AT, str); dump_vectorln(v); fflush(NULL); } |
#define | dump_m(str, m) IFDEBUG { printf("\tDEBUG[%s]: %s\n", AT, str); dump(m); fflush(NULL); } |
#define | require(x) (x) |
Functions | |
void | dump_mcmc (const mcmc *m) |
void | dump_vector (const gsl_vector *v) |
void | dump_vectorln (const gsl_vector *v) |
#define AT __FILE__ ":" TOSTRING(__LINE__) |
#define DEBUG |
Turns on debug output.
One could think that turning this off would improve performance, test have shown the additional call time is not significant.
#define debug | ( | str | ) | IFDEBUG { printf("\tDEBUG[%s]: %s\n", AT, str); fflush(NULL); } |
Referenced by burn_in(), calc_hist(), calc_marginal_distribution(), dump(), dump_mcmc(), markov_chain_calibrate_linear_regression(), markov_chain_calibrate_orig(), mcmc_free(), mcmc_init(), mcmc_reuse_data(), parallel_tempering_decide_swap_random(), test_create(), test_write(), and test_write_prob().
#define dump_d | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %f\n", AT, str, var); fflush(NULL); } |
Referenced by calc_hist(), main(), markov_chain_calibrate(), and markov_chain_calibrate_orig().
#define dump_i | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %i\n", AT, str, var); fflush(NULL); } |
Referenced by adapt(), append_to_hists(), find_min_max(), markov_chain_calibrate_orig(), and mcmc_load_params().
#define dump_i_s | ( | str, | |
index, | |||
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s[%i]: %s\n", AT, str, index, var); fflush(NULL); } |
Referenced by dump_mcmc().
#define dump_l | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %l\n", AT, str, var); fflush(NULL); } |
#define dump_m | ( | str, | |
m | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s\n", AT, str); dump(m); fflush(NULL); } |
#define dump_p | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %p\n", AT, str, var); fflush(NULL); } |
Referenced by dump_mcmc().
#define dump_s | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %s\n", AT, str, var); fflush(NULL); } |
Referenced by analyse_data_probability(), calc_marginal_distribution(), mcmc_load_data(), and mcmc_open_dump_files().
#define dump_size | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %lu\n", AT, str, (unsigned long)var); fflush(NULL); } |
#define dump_ui | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %u\n", AT, str, var); fflush(NULL); } |
#define dump_ul | ( | str, | |
var | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: %lu\n", AT, str, var); fflush(NULL); } |
Referenced by burn_in(), dump(), dump_mcmc(), and markov_chain_calibrate_orig().
#define dump_v | ( | str, | |
v | |||
) | IFDEBUG { printf("\tDEBUG[%s]: %s: ", AT, str); dump_vectorln(v); fflush(NULL); } |
#define IFDEBUG if(1) |
#define IFSEGV if(1) |
Referenced by dump_mcmc(), mcmc_free(), and mcmc_init().
#define IFVERBOSE if(1) |
Referenced by assess_acceptance_rate(), burn_in(), do_step_for(), mcmc_open_dump_files(), and parallel_tempering_decide_swap_random().
#define IFWAIT if(0) |
#define require | ( | x | ) | (x) |
Referenced by calc_hist(), calc_normalized(), dup_vector(), and test_write_prob().
#define SEGV |
Turns on debug output for allocation and free() to track segfaults.
You can also use libduma or valgrind:
LD_PRELOAD=libduma.so.0.0.0 yourprogram
valgrind --tool=memcheck --leak-check=full yourprogram
#define STRINGIFY | ( | x | ) | #x |
#define TOSTRING | ( | x | ) | STRINGIFY(x) |
Referenced by check().
#define VERBOSE |
additionally to DEBUG, print more.
void dump_mcmc | ( | const mcmc * | m | ) |
Dump the mcmc structure
References debug, dump_i_s, dump_p, dump_ul, dump_v, get_n_par(), IFDEBUG, and IFSEGV.
Referenced by dump(), and test_create().
void dump_vector | ( | const gsl_vector * | v | ) |
Referenced by dump(), and dump_vectorln().
void dump_vectorln | ( | const gsl_vector * | v | ) |
References dump_vector().
Referenced by calibrate_rest(), and print_current_positions().