src/ffs/ffs_inst.c
static int ffs_inst_read_init(ffs_inst_t * obj, u_config_t * config) {

  int init_independent = 0;    /* Use independent (parallel) states at A */
  int init_nskip = 0;          /* Skip every n crossings at A */
  int init_nstepmax = 0;       /* Maximum length of initial run */
  int init_nsteplambda = 1;    /* Steps between lambda evalutations */ 
  int init_ntrials = 0;        /* Number of trials to first interface */
  double prob_accept = 0.0;    /* Probability of accepting crossing at A */
  double teq = 0.0;            /* Equilibration time in A */

  dbg_return_if(obj == NULL, -1);
  dbg_return_if(config == NULL, -1);

  dbg_err_if(u_config_get_subkey_value_b(config,
					 FFS_CONFIG_INIT_INDEPENDENT,
					 FFS_DEFAULT_INIT_INDEPENDENT,
					 &init_independent));

  dbg_err_if(u_config_get_subkey_value_i(config,
					 FFS_CONFIG_INIT_NSTEPMAX,
					 FFS_DEFAULT_INIT_NSTEPMAX,
					 &init_nstepmax));

  dbg_err_if(u_config_get_subkey_value_i(config,
					 FFS_CONFIG_INIT_NSKIP,
					 FFS_DEFAULT_INIT_NSKIP,
					 &init_nskip));

  dbg_err_if(u_config_get_subkey_value_i(config,
					 FFS_CONFIG_INIT_NTRIALS,
					 FFS_DEFAULT_INIT_NTRIALS,
					 &init_ntrials));

  dbg_err_if(util_config_get_subkey_value_d(config,
					    FFS_CONFIG_INIT_PROB_ACCEPT,
					    FFS_DEFAULT_INIT_PROB_ACCEPT,
					    &prob_accept));

  dbg_err_if(util_config_get_subkey_value_d(config,
					    FFS_CONFIG_INIT_TEQ,
					    FFS_DEFAULT_INIT_TEQ,
					    &teq));

  ffs_init_independent_set(obj->init, init_independent);
  ffs_init_nstepmax_set(obj->init, init_nstepmax);
  ffs_init_nskip_set(obj->init, init_nskip);
  ffs_init_prob_accept_set(obj->init, prob_accept);
  ffs_init_teq_set(obj->init, teq);
  ffs_init_nsteplambda_set(obj->init, init_nsteplambda);
  ffs_init_ntrials_set(obj->init, init_ntrials);

  return 0;

 err:

  mpilog(obj->log, "Problem parsing initial parameters\n");

  return -1;
}
/*****************************************************************************
 *
 *  ffs_inst_read_init
 *
 *  Parse the initialisation parameters.
 *
 *  The config object should have stripped off the ffs_init { }
 *  at this stage.
 *
 *  We assume every rank receives exactly the same config, so
 *  errors are collective.
 *
 *****************************************************************************/
ffs_inst_read_init
Parse the initialisation parameters.

The config object should have stripped off the ffs_init { }
at this stage.

We assume every rank receives exactly the same config, so
errors are collective.
ffs_inst_read_init Parse the initialisation parameters . The config object should have stripped off the ffs_init { } at this stage . We assume every rank receives exactly the same config so errors are collective .
static int ffs_inst_read_init(ffs_inst_t * obj, u_config_t * config) {
  int init_independent = 0;    
  int init_nskip = 0;          
  int init_nstepmax = 0;       
  int init_nsteplambda = 1;     
  int init_ntrials = 0;        
  double prob_accept = 0.0;    
  double teq = 0.0;            
  dbg_return_if(obj == NULL, -1);
  dbg_return_if(config == NULL, -1);
  dbg_err_if(u_config_get_subkey_value_b(config,
					 FFS_CONFIG_INIT_INDEPENDENT,
					 FFS_DEFAULT_INIT_INDEPENDENT,
					 &init_independent));
  dbg_err_if(u_config_get_subkey_value_i(config,
					 FFS_CONFIG_INIT_NSTEPMAX,
					 FFS_DEFAULT_INIT_NSTEPMAX,
					 &init_nstepmax));
  dbg_err_if(u_config_get_subkey_value_i(config,
					 FFS_CONFIG_INIT_NSKIP,
					 FFS_DEFAULT_INIT_NSKIP,
					 &init_nskip));
  dbg_err_if(u_config_get_subkey_value_i(config,
					 FFS_CONFIG_INIT_NTRIALS,
					 FFS_DEFAULT_INIT_NTRIALS,
					 &init_ntrials));
  dbg_err_if(util_config_get_subkey_value_d(config,
					    FFS_CONFIG_INIT_PROB_ACCEPT,
					    FFS_DEFAULT_INIT_PROB_ACCEPT,
					    &prob_accept));
  dbg_err_if(util_config_get_subkey_value_d(config,
					    FFS_CONFIG_INIT_TEQ,
					    FFS_DEFAULT_INIT_TEQ,
					    &teq));
  ffs_init_independent_set(obj->init, init_independent);
  ffs_init_nstepmax_set(obj->init, init_nstepmax);
  ffs_init_nskip_set(obj->init, init_nskip);
  ffs_init_prob_accept_set(obj->init, prob_accept);
  ffs_init_teq_set(obj->init, teq);
  ffs_init_nsteplambda_set(obj->init, init_nsteplambda);
  ffs_init_ntrials_set(obj->init, init_ntrials);
  return 0;
 err:
  mpilog(obj->log, "Problem parsing initial parameters\n");
  return -1;
}
static int ffs_inst_read_init ( ffs_inst_t * obj , u_config_t * config ) { int init_independent = 0 ; int init_nskip = 0 ; int init_nstepmax = 0 ; int init_nsteplambda = 1 ; int init_ntrials = 0 ; double prob_accept = 0.0 ; double teq = 0.0 ; dbg_return_if ( obj == NULL , -1 ) ; dbg_return_if ( config == NULL , -1 ) ; dbg_err_if ( u_config_get_subkey_value_b ( config , FFS_CONFIG_INIT_INDEPENDENT , FFS_DEFAULT_INIT_INDEPENDENT , & init_independent ) ) ; dbg_err_if ( u_config_get_subkey_value_i ( config , FFS_CONFIG_INIT_NSTEPMAX , FFS_DEFAULT_INIT_NSTEPMAX , & init_nstepmax ) ) ; dbg_err_if ( u_config_get_subkey_value_i ( config , FFS_CONFIG_INIT_NSKIP , FFS_DEFAULT_INIT_NSKIP , & init_nskip ) ) ; dbg_err_if ( u_config_get_subkey_value_i ( config , FFS_CONFIG_INIT_NTRIALS , FFS_DEFAULT_INIT_NTRIALS , & init_ntrials ) ) ; dbg_err_if ( util_config_get_subkey_value_d ( config , FFS_CONFIG_INIT_PROB_ACCEPT , FFS_DEFAULT_INIT_PROB_ACCEPT , & prob_accept ) ) ; dbg_err_if ( util_config_get_subkey_value_d ( config , FFS_CONFIG_INIT_TEQ , FFS_DEFAULT_INIT_TEQ , & teq ) ) ; ffs_init_independent_set ( obj -> init , init_independent ) ; ffs_init_nstepmax_set ( obj -> init , init_nstepmax ) ; ffs_init_nskip_set ( obj -> init , init_nskip ) ; ffs_init_prob_accept_set ( obj -> init , prob_accept ) ; ffs_init_teq_set ( obj -> init , teq ) ; ffs_init_nsteplambda_set ( obj -> init , init_nsteplambda ) ; ffs_init_ntrials_set ( obj -> init , init_ntrials ) ; return 0 ; err : mpilog ( obj -> log , " \n " ) ; return -1 ; }
ffs_inst_read_init
  Parse the initialisation parameters.
ffs_inst_read_init Parse the initialisation parameters .
/* Use independent (parallel) states at A */ /* Skip every n crossings at A */ /* Maximum length of initial run */ /* Steps between lambda evalutations */ /* Number of trials to first interface */ /* Probability of accepting crossing at A */ /* Equilibration time in A */