6 int main(
int argc,
char* argv[]){
18 char processor_name[MPI_MAX_PROCESSOR_NAME];
23 std::string sharedmemorylocation;
26 std::string proc_name_str;
27 MPI_Init(&argc,&argv);
28 MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
29 MPI_Comm_rank(MPI_COMM_WORLD,&myid);
30 MPI_Get_processor_name(processor_name,&namelen);
31 proc_name_str = processor_name;
35 boost::filesystem::path called_dir = boost::filesystem::current_path();
36 boost::filesystem::path homedir = getenv(
"HOME");
39 boost::filesystem::path filename, location;
43 std::vector<std::vector<std::pair<double,double> > > AllParams;
44 std::vector<std::string> ParamNames;
45 std::stringstream commandss;
59 if ( (argc!=1) && (numprocs>1)){
65 commandss >> steptwomode;
66 commandss.clear(); commandss.str(
"");
70 std::cerr <<
"Nothing passed as an argument ... \n"
71 <<
"this should never pop up as this program is only "
72 <<
" called from paramotopy...\n";
102 boost::filesystem::path settingsfilename = location;
103 settingsfilename /=
"prefs.xml";
104 if (!boost::filesystem::exists(settingsfilename)) {
105 std::cerr <<
"for some reason the prefs file " << settingsfilename <<
" does not exist! id:" << myid << std::endl;
112 paramotopy_settings.
load();
140 boost::filesystem::path base_dir =
make_base_dir_name(boost::filesystem::path(filename));
146 boost::filesystem::path timingfolder = location;
147 timingfolder /=
"timing";
150 if (boost::filesystem::exists(timingfolder)){
151 boost::filesystem::remove_all(timingfolder);
153 boost::filesystem::create_directories(timingfolder);
168 master.
master_main(paramotopy_settings, paramotopy_info, process_timer);
172 slave.
slave_main(paramotopy_settings, paramotopy_info, process_timer);
int main(int argc, char *argv[])
void slave_main(ProgSettings input_settings, runinfo input_p_info, timer &process_timer)
void load(boost::filesystem::path pFilename)
boost::filesystem::path make_base_dir_name(boost::filesystem::path filename)
void master_main(ProgSettings input_settings, runinfo input_p_info, timer &process_timer)
boost::filesystem::path location
void add_time(const std::string timer_name)
A class that stores the general program settings of Paramotopy.
A class for the input file parser.
bool write_timing_data(const boost::filesystem::path folder_to_write_to, const int myid)
master process for basic searches and brute-force runs.
slave process for basic searches and brute-force runs.
void press_start(const std::string timer_name)
Capable of timing arbitrary categories of processes, using a map of timer_data's. ...