LALInference 4.1.9.1-eeff03c
LALInferenceMCMCSampler.c File Reference

Prototypes

static void thinDifferentialEvolutionPoints (LALInferenceThreadState *thread)
 
static void accumulateDifferentialEvolutionSample (LALInferenceThreadState *thread, size_t buffer_limit)
 
static void resetDifferentialEvolutionBuffer (LALInferenceThreadState *thread)
 
static void catch_alarm (UNUSED int sig, UNUSED siginfo_t *siginfo, UNUSED void *context)
 
static void catch_interrupt (UNUSED int sig, UNUSED siginfo_t *siginfo, UNUSED void *context)
 
static void install_resume_handler (int checkpoint_exit)
 Install the signal handlers for checkpointing. More...
 
void PTMCMCAlgorithm (struct tagLALInferenceRunState *runState)
 Implements the parallel tempered MCMC algorithm. More...
 
void record_likelihoods (LALInferenceThreadState *thread)
 
void mcmc_step (LALInferenceRunState *runState, LALInferenceThreadState *thread)
 Implements one MCMC step forward, updating the sigma values for the jump proposals if required. More...
 
void LALInferenceAdaptLadder (LALInferenceRunState *runState)
 
void LALInferencePTswap (LALInferenceRunState *runState, FILE *swapfile)
 
void LALInferenceAdaptation (LALInferenceThreadState *thread)
 
void LALInferenceAdaptationRestart (LALInferenceThreadState *thread)
 
REAL8 LALInferenceAdaptationEnvelope (INT4 step, INT4 tau, INT4 length, INT4 fix_adapt_len)
 
void LALInferenceNameOutputs (LALInferenceRunState *runState)
 
void LALInferenceResumeMCMC (LALInferenceRunState *runState)
 
void LALInferenceCheckpointMCMC (LALInferenceRunState *runState)
 
void LALInferenceReadMCMCCheckpoint (LALInferenceRunState *runState)
 
void LALInferenceWriteMCMCSamples (LALInferenceRunState *runState)
 
void LALInferencePrintPTMCMCHeaderFile (LALInferenceRunState *runState, LALInferenceThreadState *thread, FILE *threadoutput)
 
void LALInferencePrintAdaptationHeader (FILE *outfile, LALInferenceThreadState *thread)
 
void LALInferencePrintPTMCMCInjectionSample (LALInferenceRunState *runState)
 
void LALInferenceSaveSample (LALInferenceThreadState *thread, FILE *output)
 
void LALInferencePrintMCMCSample (LALInferenceThreadState *thread, LALInferenceIFOData *data, INT4 iteration, REAL8 timestamp, FILE *threadoutput)
 
void LALInferencePrintAdaptationSettings (FILE *outfile, LALInferenceThreadState *thread)
 
void LALInferenceDataDump (LALInferenceIFOData *data, LALInferenceModel *model)
 
void LALInferenceMCMCResumeRead (LALInferenceThreadState *thread, FILE *resumeFile)
 Reads final parameter values from the given output file, and stores them in the current params to try to continue the run. More...
 
void LALInferenceAddPTMCMCMetaInfo (LALInferenceRunState *runState)
 

Go to the source code of this file.

Macros

#define PROGRAM_NAME   "LALInferenceMCMCSampler.c"
 
#define CVS_ID_STRING   "$Id$"
 
#define CVS_REVISION   "$Revision$"
 
#define CVS_SOURCE   "$Source$"
 
#define CVS_DATE   "$Date$"
 
#define CVS_NAME_STRING   "$Name$"
 

Variables

static volatile sig_atomic_t __master_saveStateFlag = 0
 
static volatile sig_atomic_t __master_exitFlag = 0
 
static struct itimerval checkpoint_timer
 

Macro Definition Documentation

◆ PROGRAM_NAME

#define PROGRAM_NAME   "LALInferenceMCMCSampler.c"

Definition at line 56 of file LALInferenceMCMCSampler.c.

◆ CVS_ID_STRING

#define CVS_ID_STRING   "$Id$"

Definition at line 57 of file LALInferenceMCMCSampler.c.

◆ CVS_REVISION

#define CVS_REVISION   "$Revision$"

Definition at line 58 of file LALInferenceMCMCSampler.c.

◆ CVS_SOURCE

#define CVS_SOURCE   "$Source$"

Definition at line 59 of file LALInferenceMCMCSampler.c.

◆ CVS_DATE

#define CVS_DATE   "$Date$"

Definition at line 60 of file LALInferenceMCMCSampler.c.

◆ CVS_NAME_STRING

#define CVS_NAME_STRING   "$Name$"

Definition at line 61 of file LALInferenceMCMCSampler.c.

Function Documentation

◆ thinDifferentialEvolutionPoints()

static void thinDifferentialEvolutionPoints ( LALInferenceThreadState thread)
static

Definition at line 70 of file LALInferenceMCMCSampler.c.

◆ accumulateDifferentialEvolutionSample()

static void accumulateDifferentialEvolutionSample ( LALInferenceThreadState thread,
size_t  buffer_limit 
)
static

Definition at line 97 of file LALInferenceMCMCSampler.c.

◆ resetDifferentialEvolutionBuffer()

static void resetDifferentialEvolutionBuffer ( LALInferenceThreadState thread)
static

Definition at line 118 of file LALInferenceMCMCSampler.c.

◆ catch_alarm()

static void catch_alarm ( UNUSED int  sig,
UNUSED siginfo_t *  siginfo,
UNUSED void *  context 
)
static

Definition at line 140 of file LALInferenceMCMCSampler.c.

◆ catch_interrupt()

static void catch_interrupt ( UNUSED int  sig,
UNUSED siginfo_t *  siginfo,
UNUSED void *  context 
)
static

Definition at line 148 of file LALInferenceMCMCSampler.c.

◆ install_resume_handler()

static void install_resume_handler ( int  checkpoint_exit)
static

Install the signal handlers for checkpointing.

If checkpoint_exit!=0, then install the catch_alarm_condor_exit_code handler to exit after checkpointing

Definition at line 163 of file LALInferenceMCMCSampler.c.

◆ PTMCMCAlgorithm()

void PTMCMCAlgorithm ( struct tagLALInferenceRunState *  runState)

Implements the parallel tempered MCMC algorithm.

Designes to use PTMCMCOneStep() as the runstate->evolve function

Definition at line 199 of file LALInferenceMCMCSampler.c.

◆ record_likelihoods()

void record_likelihoods ( LALInferenceThreadState thread)

Definition at line 569 of file LALInferenceMCMCSampler.c.

◆ mcmc_step()

void mcmc_step ( LALInferenceRunState runState,
LALInferenceThreadState thread 
)

Implements one MCMC step forward, updating the sigma values for the jump proposals if required.

Definition at line 594 of file LALInferenceMCMCSampler.c.

◆ LALInferenceAdaptLadder()

void LALInferenceAdaptLadder ( LALInferenceRunState runState)

Definition at line 676 of file LALInferenceMCMCSampler.c.

◆ LALInferencePTswap()

void LALInferencePTswap ( LALInferenceRunState runState,
FILE *  swapfile 
)

Definition at line 767 of file LALInferenceMCMCSampler.c.

◆ LALInferenceAdaptation()

void LALInferenceAdaptation ( LALInferenceThreadState thread)

Definition at line 1138 of file LALInferenceMCMCSampler.c.

◆ LALInferenceAdaptationRestart()

void LALInferenceAdaptationRestart ( LALInferenceThreadState thread)

Definition at line 1174 of file LALInferenceMCMCSampler.c.

◆ LALInferenceAdaptationEnvelope()

REAL8 LALInferenceAdaptationEnvelope ( INT4  step,
INT4  tau,
INT4  length,
INT4  fix_adapt_len 
)

Definition at line 1212 of file LALInferenceMCMCSampler.c.

◆ LALInferenceNameOutputs()

void LALInferenceNameOutputs ( LALInferenceRunState runState)

Definition at line 1232 of file LALInferenceMCMCSampler.c.

◆ LALInferenceResumeMCMC()

void LALInferenceResumeMCMC ( LALInferenceRunState runState)

Definition at line 1289 of file LALInferenceMCMCSampler.c.

◆ LALInferenceCheckpointMCMC()

void LALInferenceCheckpointMCMC ( LALInferenceRunState runState)

Definition at line 1305 of file LALInferenceMCMCSampler.c.

◆ LALInferenceReadMCMCCheckpoint()

void LALInferenceReadMCMCCheckpoint ( LALInferenceRunState runState)

Definition at line 1368 of file LALInferenceMCMCSampler.c.

◆ LALInferenceWriteMCMCSamples()

void LALInferenceWriteMCMCSamples ( LALInferenceRunState runState)

Definition at line 1522 of file LALInferenceMCMCSampler.c.

◆ LALInferencePrintPTMCMCHeaderFile()

void LALInferencePrintPTMCMCHeaderFile ( LALInferenceRunState runState,
LALInferenceThreadState thread,
FILE *  threadoutput 
)

Definition at line 1573 of file LALInferenceMCMCSampler.c.

◆ LALInferencePrintAdaptationHeader()

void LALInferencePrintAdaptationHeader ( FILE *  outfile,
LALInferenceThreadState thread 
)

Definition at line 1681 of file LALInferenceMCMCSampler.c.

◆ LALInferencePrintPTMCMCInjectionSample()

void LALInferencePrintPTMCMCInjectionSample ( LALInferenceRunState runState)

Definition at line 1705 of file LALInferenceMCMCSampler.c.

◆ LALInferenceSaveSample()

void LALInferenceSaveSample ( LALInferenceThreadState thread,
FILE *  output 
)

Definition at line 1883 of file LALInferenceMCMCSampler.c.

◆ LALInferencePrintMCMCSample()

void LALInferencePrintMCMCSample ( LALInferenceThreadState thread,
LALInferenceIFOData data,
INT4  iteration,
REAL8  timestamp,
FILE *  threadoutput 
)

Definition at line 1890 of file LALInferenceMCMCSampler.c.

◆ LALInferencePrintAdaptationSettings()

void LALInferencePrintAdaptationSettings ( FILE *  outfile,
LALInferenceThreadState thread 
)

Definition at line 1932 of file LALInferenceMCMCSampler.c.

◆ LALInferenceDataDump()

void LALInferenceDataDump ( LALInferenceIFOData data,
LALInferenceModel model 
)

Definition at line 1970 of file LALInferenceMCMCSampler.c.

◆ LALInferenceMCMCResumeRead()

void LALInferenceMCMCResumeRead ( LALInferenceThreadState thread,
FILE *  resumeFile 
)

Reads final parameter values from the given output file, and stores them in the current params to try to continue the run.

Definition at line 2046 of file LALInferenceMCMCSampler.c.

◆ LALInferenceAddPTMCMCMetaInfo()

void LALInferenceAddPTMCMCMetaInfo ( LALInferenceRunState runState)

Definition at line 2053 of file LALInferenceMCMCSampler.c.

Variable Documentation

◆ __master_saveStateFlag

volatile sig_atomic_t __master_saveStateFlag = 0
static

Definition at line 134 of file LALInferenceMCMCSampler.c.

◆ __master_exitFlag

volatile sig_atomic_t __master_exitFlag = 0
static

Definition at line 136 of file LALInferenceMCMCSampler.c.

◆ checkpoint_timer

struct itimerval checkpoint_timer
static

Definition at line 155 of file LALInferenceMCMCSampler.c.