Paramotopy
parallel parameter homotopy through bertini
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
step2_funcs.hpp File Reference
#include <string>
#include <fstream>
#include <vector>
#include <map>
#include <sstream>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdexcept>
#include <stdlib.h>
#include <errno.h>
#include <sys/wait.h>
#include <cmath>
#include "step1_funcs.hpp"
#include <gmp.h>
#include "bertini.h"

Go to the source code of this file.

Functions

void parse_input_file_bertini (unsigned int &currentSeed, int &MPType)
 
void run_zero_dim_main (int MPType, unsigned int currentSeed)
 
void SetUpFolders (std::string base_dir, int numprocs, int numfilesatatime, std::string templocation)
 
std::string WriteStep2 (std::vector< std::pair< double, double > > CValues, ProgSettings paramotopy_settings, runinfo paramotopy_info)
 
std::string WriteFailStep2 (std::vector< std::pair< double, double > > CValues, ProgSettings paramotopy_settings, runinfo paramotopy_info)
 
std::string MakeTargetFilename (std::string base_dir, ToSave *TheFiles, int index)
 
void SetFileCount (ProgSettings &paramotopy_settings, std::string DataCollectedBaseDir)
 

Function Documentation

std::string MakeTargetFilename ( std::string  base_dir,
ToSave TheFiles,
int  index 
)

makes the appropriate output file name

Parameters
base_dirthe string of style bfiles_filename/run0/
TheFilesstruct containing the names of the data files to be saved.
indexthe number of the filename to make
Returns
concatenated file name.
void parse_input_file_bertini ( unsigned int &  currentSeed,
int &  MPType 
)

a wrapper around the parse_input() function from the bertini library.

Returns
MPType an integer indicating the mptype.
currentSeed the current random seed.

Definition at line 5 of file step2_funcs.cpp.

Referenced by slave_process::LoopBasic(), and slave_process::LoopSearch().

Here is the caller graph for this function:

void run_zero_dim_main ( int  MPType,
unsigned int  currentSeed 
)

a wrapper around the zero_dim_main() function from the bertini library.

Parameters
MPTypean integer indicating the mptype.
currentSeedthe current random seed.

Definition at line 12 of file step2_funcs.cpp.

Referenced by slave_process::LoopBasic(), and slave_process::LoopSearch().

Here is the caller graph for this function:

void SetFileCount ( ProgSettings paramotopy_settings,
std::string  DataCollectedBaseDir 
)

makes the appropriate output file name

Parameters
paramotopy_settingsthe bertini and paramotopy settings
DataCollectedBaseDirthe name of the bfiles_filename/run0/step2/DataCollected location
void SetUpFolders ( std::string  base_dir,
int  numprocs,
int  numfilesatatime,
std::string  templocation 
)

sets up the various data folders for the run. also sets up the text file which has the list of folders containing data

Parameters
base_dirthe directory in which to do the setup
numprocsthe number of processors being used
numfilesatatimethe number of parameter points to hand out at each distribution
templocationthe location of the temporary files, in which each worker will produce the data by running bertini
std::string WriteFailStep2 ( std::vector< std::pair< double, double > >  CValues,
ProgSettings  paramotopy_settings,
runinfo  paramotopy_info 
)

creates the bertini input file for step2 IN FAILURE ANALYSIS MODE, and writes it to a string.

Parameters
CValuescurrent parameter values.
paramotopy_settingsthe bertini and paramotopy settings
paramotopy_infothe parsed input file.

Definition at line 40 of file step2_funcs.cpp.

References ProgSettings::settings, ProgSettings::WriteConfigFail(), and runinfo::WriteInputStepTwo().

Referenced by failinfo::new_step_one(), and master_process::SendInput().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string WriteStep2 ( std::vector< std::pair< double, double > >  CValues,
ProgSettings  paramotopy_settings,
runinfo  paramotopy_info 
)

creates the bertini input file for step2, and writes it to a string.

Parameters
CValuescurrent parameter values.
paramotopy_settingsthe bertini and paramotopy settings
paramotopy_infothe parsed input file.

Definition at line 23 of file step2_funcs.cpp.

References ProgSettings::settings, ProgSettings::WriteConfigStepTwo(), and runinfo::WriteInputStepTwo().

Referenced by master_process::SendInput().

Here is the call graph for this function:

Here is the caller graph for this function: