8 boost::filesystem::path startingfolder = boost::filesystem::current_path();
10 boost::filesystem::path runfolder;
11 runfolder = paramotopy_info.
location;
14 chdir(runfolder.c_str());
17 std::stringstream command;
18 if (paramotopy_settings.
settings[
"parallelism"][
"parallel"].intvalue==1) {
19 command << paramotopy_settings.
settings[
"parallelism"][
"architecture"].value() <<
" ";
20 if (paramotopy_settings.
settings[
"parallelism"][
"usemachine"].intvalue==1){
21 std::string homedir = getenv(
"HOME");
25 command <<
" -machinefile "
27 << paramotopy_settings.
settings[
"parallelism"][
"machinefile"].value()
30 command <<
" -n " << paramotopy_settings.
settings[
"parallelism"][
"numprocs"].value();
32 command <<
" " << paramotopy_settings.
settings[
"system"][
"bertinilocation"].value() <<
"/bertini";
36 command <<
" " << paramotopy_settings.
settings[
"system"][
"bertinilocation"].value() <<
"/bertini";
39 std::cout << command.str().c_str() << std::endl;
40 system(command.str().c_str());
42 chdir(startingfolder.c_str());
63 boost::filesystem::path fname2 = paramotopy_info.
location;
64 fname2 /=
"step1/input";
67 std::ofstream fout(fname2.c_str());
68 if (!fout.is_open()) {
69 std::cout << fname2 <<
" failed to open for writing step1 input file.\n";
72 fout << config << input <<
"\n";
76 std::cout <<
"your input file:\n\n"
77 << config << input <<
"\n\n";
90 void MakeConfig(std::ifstream & fin, std::ofstream & fout){
92 while (getline(fin,token)){
97 void MakeConfig(std::ifstream & fin, std::stringstream & fout){
99 while (getline(fin,token)){
107 std::vector<std::vector<std::pair<double, double> > > Values,
108 std::string dirfilename,
109 std::string runningline){
111 if (level==
int(Values.size())-1){
113 for (
int i = 0; i < int(Values[level].size());++i){
114 std::stringstream ss;
117 ss << Values[level][i].first;
119 ss << Values[level][i].second;
121 std::ofstream fout(dirfilename.c_str(),std::ios::app);
127 for (
int i= 0; i < int(Values[level].size());++i){
128 std::stringstream ss;
131 ss << Values[level][i].first;
133 ss << Values[level][i].second;
void MakeConfig(std::ifstream &fin, std::ofstream &fout)
void CallBertiniStep1(ProgSettings paramotopy_settings, runinfo paramotopy_info)
std::string WriteInputStepOne(ProgSettings paramotopy_settings)
std::string WriteConfigStepOne()
boost::filesystem::path location
A class that stores the general program settings of Paramotopy.
void WriteStep1(ProgSettings paramotopy_settings, runinfo paramotopy_info)
void WriteMeshToMonteCarlo(int level, std::vector< std::vector< std::pair< double, double > > > Values, std::string dirfilename, std::string runningline)
A class for the input file parser.