cloudy trunk
|
#include <optimize.h>
Public Member Functions | |
phymir_state () | |
void | clear () |
void | init_minmax (const X[], const X[], int) |
void | init_state_file_name (const char *) |
void | init_strings (const char *, const char *, const char *) |
void | initial_run (Y(*)(const X[], int), int, const X[], const X[], X, int, phymir_mode, int) |
void | continue_from_state (Y(*)(const X[], int), int, const char *, X, int, phymir_mode, int) |
void | optimize () |
void | optimize_with_restart () |
bool | lgMaxIterExceeded () const |
bool | lgInitialized () const |
bool | lgConverged () const |
bool | lgConvergedRestart () const |
X | xval (int i) const |
X | xmin (int i) const |
X | xmax (int i) const |
Y | yval () const |
int32 | noptim () const |
Private Member Functions | |
void | p_clear1 () |
void | p_wr_state (const char *) const |
void | p_rd_state (const char *) |
Y | p_execute_job (const X[], int, int) |
void | p_execute_job_parallel (const X[], int, int) const |
void | p_barrier (int, int) |
void | p_process_output (int, int) |
void | p_evaluate_hyperblock () |
void | p_setup_next_hyperblock () |
void | p_reset_hyperblock () |
void | p_phygrm (X[][NP], int) |
bool | p_lgLimitExceeded (const X[]) const |
X | p_delta (int i, int j) const |
void | p_reset_transformation_matrix () |
Private Attributes | |
X | p_xmax |
Y | p_ymax |
X | p_xp [2 *NP+1][NP] |
Y | p_yp [2 *NP+1] |
X | p_absmin [NP] |
X | p_absmax [NP] |
X | p_varmin [NP] |
X | p_varmax [NP] |
X | p_a2 [NP][NP] |
X | p_c1 [NP] |
X | p_c2 [NP] |
X | p_xc [NP] |
X | p_xcold [NP] |
X | p_vers |
X | p_toler |
X | p_dmax |
X | p_dold |
Y | p_ymin |
int32 | p_dim |
int32 | p_sdim |
int32 | p_nvar |
int32 | p_noptim |
int32 | p_maxiter |
int32 | p_jmin |
int32 | p_maxcpu |
int32 | p_curcpu |
phymir_mode | p_mode |
char | p_chState [NSTR] |
char | p_chStr1 [NSTR] |
char | p_chStr2 [NSTR] |
char | p_chStr3 [NSTR] |
uint32 | p_size |
Y(* | p_func )(const X[], int) |
Definition at line 71 of file optimize.h.
|
inline |
Definition at line 128 of file optimize.h.
References p_clear1().
|
inline |
Definition at line 129 of file optimize.h.
References p_clear1().
void phymir_state< X, Y, NP, NSTR >::continue_from_state | ( | Y(* | func )(const X[], int), |
int | nvar, | ||
const char * | fnam, | ||
X | toler, | ||
int | maxiter, | ||
phymir_mode | mode, | ||
int | maxcpu ) |
Definition at line 578 of file optimize_phymir.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fp_equal(), p_dim, p_func, p_maxcpu, p_maxiter, p_mode, p_nvar, p_rd_state(), p_sdim, p_toler, p_vers, and VRSNEW.
Referenced by optimize_phymir().
void phymir_state< X, Y, NP, NSTR >::init_minmax | ( | const X | pmin[], |
const X | pmax[], | ||
int | nvar ) |
Definition at line 485 of file optimize_phymir.cpp.
References ASSERT, DEBUG_ENTRY, lgInitialized(), p_absmax, and p_absmin.
void phymir_state< X, Y, NP, NSTR >::init_state_file_name | ( | const char * | fnam | ) |
Definition at line 517 of file optimize_phymir.cpp.
References DEBUG_ENTRY, and p_chState.
Referenced by optimize_phymir().
void phymir_state< X, Y, NP, NSTR >::init_strings | ( | const char * | date, |
const char * | version, | ||
const char * | host_name ) |
Definition at line 501 of file optimize_phymir.cpp.
References DEBUG_ENTRY, p_chStr1, p_chStr2, and p_chStr3.
Referenced by optimize_phymir().
void phymir_state< X, Y, NP, NSTR >::initial_run | ( | Y(* | func )(const X[], int), |
int | nvar, | ||
const X | start[], | ||
const X | del[], | ||
X | toler, | ||
int | maxiter, | ||
phymir_mode | mode, | ||
int | maxcpu ) |
Definition at line 526 of file optimize_phymir.cpp.
References ASSERT, DEBUG_ENTRY, max(), min(), p_barrier(), p_c1, p_c2, p_chState, p_dmax, p_dold, p_execute_job(), p_func, p_jmin, p_maxcpu, p_maxiter, p_mode, p_noptim, p_nvar, p_reset_transformation_matrix(), p_toler, p_varmax, p_varmin, p_wr_state(), p_xc, p_xcold, p_xp, p_ymin, p_yp, and start().
Referenced by optimize_phymir().
|
inline |
Definition at line 139 of file optimize.h.
References p_dmax, and p_toler.
Referenced by lgConvergedRestart(), and optimize().
bool phymir_state< X, Y, NP, NSTR >::lgConvergedRestart | ( | ) | const |
Definition at line 656 of file optimize_phymir.cpp.
References DEBUG_ENTRY, dist(), lgConverged(), p_nvar, p_toler, p_xc, p_xcold, and pow2().
Referenced by optimize_with_restart(), and p_reset_hyperblock().
|
inline |
Definition at line 138 of file optimize.h.
References p_nvar.
Referenced by init_minmax(), optimize(), and optimize_with_restart().
|
inline |
Definition at line 137 of file optimize.h.
References p_maxiter, and p_noptim.
Referenced by optimize(), optimize_phymir(), optimize_with_restart(), and p_evaluate_hyperblock().
|
inline |
void phymir_state< X, Y, NP, NSTR >::optimize | ( | ) |
Definition at line 623 of file optimize_phymir.cpp.
References ASSERT, DEBUG_ENTRY, lgConverged(), lgInitialized(), lgMaxIterExceeded(), p_chState, p_evaluate_hyperblock(), p_setup_next_hyperblock(), and p_wr_state().
void phymir_state< X, Y, NP, NSTR >::optimize_with_restart | ( | ) |
Definition at line 640 of file optimize_phymir.cpp.
References ASSERT, DEBUG_ENTRY, lgConvergedRestart(), lgInitialized(), lgMaxIterExceeded(), optimize, and p_reset_hyperblock().
Referenced by optimize_phymir().
|
private |
Definition at line 212 of file optimize_phymir.cpp.
References MPI::COMM_WORLD, DEBUG_ENTRY, p_curcpu, p_mode, p_process_output(), p_yp, PHYMIR_FORK, PHYMIR_MPI, PHYMIR_SEQ, TotalInsanity(), and wait.
Referenced by initial_run(), and p_evaluate_hyperblock().
|
private |
Definition at line 34 of file optimize_phymir.cpp.
References DEBUG_ENTRY, p_a2, p_absmax, p_absmin, p_c1, p_c2, p_curcpu, p_dim, p_dmax, p_dold, p_func, p_jmin, p_maxcpu, p_maxiter, p_mode, p_noptim, p_nvar, p_sdim, p_size, p_toler, p_varmax, p_varmin, p_vers, p_xc, p_xcold, p_xmax, p_xp, p_ymax, p_ymin, p_yp, PHYMIR_ILL, and VRSNEW.
Referenced by clear(), and phymir_state().
|
inlineprivate |
Definition at line 123 of file optimize.h.
Referenced by p_reset_transformation_matrix(), and p_setup_next_hyperblock().
|
private |
Definition at line 265 of file optimize_phymir.cpp.
References DEBUG_ENTRY, lgMaxIterExceeded(), max(), min(), p_a2, p_barrier(), p_c2, p_dmax, p_execute_job(), p_noptim, p_nvar, p_varmax, p_varmin, p_xc, p_xp, and p_yp.
Referenced by optimize().
|
private |
Definition at line 128 of file optimize_phymir.cpp.
References cdEXIT, cpu, DEBUG_ENTRY, EXIT_FAILURE, EXIT_SUCCESS, fork, ioQQQ, p_curcpu, p_execute_job_parallel(), p_func, p_lgLimitExceeded(), p_maxcpu, p_mode, p_ymax, PHYMIR_FORK, PHYMIR_MPI, PHYMIR_SEQ, pid_t, TotalInsanity(), and wait.
Referenced by initial_run(), and p_evaluate_hyperblock().
|
private |
Definition at line 178 of file optimize_phymir.cpp.
References AS_LOCAL_ONLY, DEBUG_ENTRY, ioQQQ, open_data(), p_func, p_lgLimitExceeded(), p_ymax, wr_block(), and yval().
Referenced by p_execute_job().
|
private |
Definition at line 459 of file optimize_phymir.cpp.
References DEBUG_ENTRY, p_absmax, p_absmin, and p_nvar.
Referenced by p_execute_job(), and p_execute_job_parallel().
|
private |
Definition at line 432 of file optimize_phymir.cpp.
References DEBUG_ENTRY, and pow2().
Referenced by p_setup_next_hyperblock().
|
private |
Definition at line 244 of file optimize_phymir.cpp.
References append_file(), cpu, DEBUG_ENTRY, ioQQQ, p_yp, and rd_block().
Referenced by p_barrier().
|
private |
Definition at line 109 of file optimize_phymir.cpp.
References AS_LOCAL_ONLY, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, open_data(), and p_size.
Referenced by continue_from_state().
|
private |
Definition at line 414 of file optimize_phymir.cpp.
References DEBUG_ENTRY, lgConvergedRestart(), p_c1, p_c2, p_dmax, p_dold, p_nvar, p_reset_transformation_matrix(), p_xc, and p_xcold.
Referenced by optimize_with_restart().
|
private |
Definition at line 474 of file optimize_phymir.cpp.
References DEBUG_ENTRY, p_a2, p_delta(), and p_nvar.
Referenced by initial_run(), and p_reset_hyperblock().
|
private |
|
private |
Definition at line 88 of file optimize_phymir.cpp.
References AS_LOCAL_ONLY_TRY, cpu, DEBUG_ENTRY, open_data(), and p_size.
Referenced by initial_run(), and optimize().
|
inline |
Definition at line 143 of file optimize.h.
References min(), p_absmax, and p_varmax.
Referenced by optimize_phymir().
|
inline |
Definition at line 142 of file optimize.h.
References max(), p_absmin, and p_varmin.
Referenced by optimize_phymir().
|
inline |
|
inline |
Definition at line 144 of file optimize.h.
References p_ymin.
Referenced by optimize_phymir(), and p_execute_job_parallel().
|
private |
Definition at line 81 of file optimize.h.
Referenced by p_clear1(), p_evaluate_hyperblock(), p_reset_transformation_matrix(), and p_setup_next_hyperblock().
|
private |
Definition at line 78 of file optimize.h.
Referenced by init_minmax(), p_clear1(), p_lgLimitExceeded(), and xmax().
|
private |
Definition at line 77 of file optimize.h.
Referenced by init_minmax(), p_clear1(), p_lgLimitExceeded(), and xmin().
|
private |
Definition at line 82 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_reset_hyperblock(), and p_setup_next_hyperblock().
|
private |
Definition at line 83 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_evaluate_hyperblock(), p_reset_hyperblock(), and p_setup_next_hyperblock().
|
private |
Definition at line 100 of file optimize.h.
Referenced by init_state_file_name(), initial_run(), and optimize().
|
private |
Definition at line 101 of file optimize.h.
Referenced by init_strings().
|
private |
Definition at line 102 of file optimize.h.
Referenced by init_strings().
|
private |
Definition at line 103 of file optimize.h.
Referenced by init_strings().
|
private |
Definition at line 98 of file optimize.h.
Referenced by p_barrier(), p_clear1(), and p_execute_job().
|
private |
Definition at line 91 of file optimize.h.
Referenced by continue_from_state(), and p_clear1().
|
private |
Definition at line 88 of file optimize.h.
Referenced by initial_run(), lgConverged(), p_clear1(), p_evaluate_hyperblock(), p_reset_hyperblock(), and p_setup_next_hyperblock().
|
private |
Definition at line 89 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_reset_hyperblock(), and p_setup_next_hyperblock().
|
private |
Definition at line 107 of file optimize.h.
Referenced by continue_from_state(), initial_run(), p_clear1(), p_execute_job(), and p_execute_job_parallel().
|
private |
Definition at line 96 of file optimize.h.
Referenced by initial_run(), p_clear1(), and p_setup_next_hyperblock().
|
private |
Definition at line 97 of file optimize.h.
Referenced by continue_from_state(), initial_run(), p_clear1(), and p_execute_job().
|
private |
Definition at line 95 of file optimize.h.
Referenced by continue_from_state(), initial_run(), lgMaxIterExceeded(), and p_clear1().
|
private |
Definition at line 99 of file optimize.h.
Referenced by continue_from_state(), initial_run(), p_barrier(), p_clear1(), and p_execute_job().
|
private |
Definition at line 94 of file optimize.h.
Referenced by initial_run(), lgMaxIterExceeded(), noptim(), p_clear1(), and p_evaluate_hyperblock().
|
private |
Definition at line 93 of file optimize.h.
Referenced by continue_from_state(), initial_run(), lgConvergedRestart(), lgInitialized(), p_clear1(), p_evaluate_hyperblock(), p_lgLimitExceeded(), p_reset_hyperblock(), p_reset_transformation_matrix(), and p_setup_next_hyperblock().
|
private |
Definition at line 92 of file optimize.h.
Referenced by continue_from_state(), and p_clear1().
|
private |
Definition at line 106 of file optimize.h.
Referenced by p_clear1(), p_rd_state(), and p_wr_state().
|
private |
Definition at line 87 of file optimize.h.
Referenced by continue_from_state(), initial_run(), lgConverged(), lgConvergedRestart(), and p_clear1().
|
private |
Definition at line 80 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_evaluate_hyperblock(), and xmax().
|
private |
Definition at line 79 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_evaluate_hyperblock(), and xmin().
|
private |
Definition at line 86 of file optimize.h.
Referenced by continue_from_state(), and p_clear1().
|
private |
Definition at line 84 of file optimize.h.
Referenced by initial_run(), lgConvergedRestart(), p_clear1(), p_evaluate_hyperblock(), p_reset_hyperblock(), p_setup_next_hyperblock(), and xval().
|
private |
Definition at line 85 of file optimize.h.
Referenced by initial_run(), lgConvergedRestart(), p_clear1(), and p_reset_hyperblock().
|
private |
Definition at line 73 of file optimize.h.
Referenced by p_clear1().
|
private |
Definition at line 75 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_evaluate_hyperblock(), and p_setup_next_hyperblock().
|
private |
Definition at line 74 of file optimize.h.
Referenced by p_clear1(), p_execute_job(), and p_execute_job_parallel().
|
private |
Definition at line 90 of file optimize.h.
Referenced by initial_run(), p_clear1(), p_setup_next_hyperblock(), and yval().
|
private |
Definition at line 76 of file optimize.h.
Referenced by initial_run(), p_barrier(), p_clear1(), p_evaluate_hyperblock(), p_process_output(), and p_setup_next_hyperblock().