| 1 | #cxx . . $ `<file>/src/ParaFly.cpp`/include <iostream> |
| 2 | #include <string> |
| 3 | #include <fstream> |
| 4 | #include <cstdlib> |
| 5 | #include <sstream> |
| 6 | #include <omp.h> |
| 7 | #include <vector> |
| 8 | #include <map> |
| 9 | #include <algorithm> |
| 10 | #include <signal.h> |
| 11 | #include <sys/wait.h> |
| 12 | |
| 13 | #include "argProcessor.hpp"cxx . . $ `<file>/src/argProcessor.hpp`/ |
| 14 | |
| 15 | |
| 16 | stringcxx . . $ std/string# usagecxx . . $ usage(efd28698952f529a).(); |
| 17 | |
| 18 | |
| 19 | using namespace std; |
| 20 | |
| 21 | |
| 22 | static int VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. = 0; |
| 23 | |
| 24 | int maincxx . . $ main(afcd3168fc1188a4).(int argc, char* argv[]) { |
| 25 | |
| 26 | /* This program executes commands in Parallel using C++, the program is a wrapper designed for the orignal Trinity Program |
| 27 | for seemless parallel OPENMP execution, Authors of this wrapper are MB Couger (mbcouger(AT Symbol)gmail.com, Matt Stowe mstowe(AT Symbol)okstate.edu*/ |
| 28 | // code modified by bhaas for general cmd-line processing |
| 29 | |
| 30 | |
| 31 | ArgProcessorcxx . . $ ArgProcessor# argscxx . . $ ArgProcessor#ArgProcessor(c759356ac01a31e7).(argc, argv); |
| 32 | |
| 33 | bool shuffle_flag = false; |
| 34 | |
| 35 | int max_retries = 10; |
| 36 | |
| 37 | if (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-help"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).) |
| 38 | || ! (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-c"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).) ) |
| 39 | || ! (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-CPU"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).) ) |
| 40 | ) { |
| 41 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(88df5bef833f7f83). usagecxx . . $ usage(efd28698952f529a).() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 42 | return(1); |
| 43 | } |
| 44 | |
| 45 | if (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-v"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)) { |
| 46 | VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. = 1; |
| 47 | } |
| 48 | else if (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-vv"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)) { |
| 49 | VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. = 2; |
| 50 | } |
| 51 | |
| 52 | if (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-shuffle"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)) { |
| 53 | shuffle_flag = true; |
| 54 | } |
| 55 | if (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-max_retry"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)) { |
| 56 | max_retries = args.getIntValcxx . . $ ArgProcessor#getIntVal(89800cbf2a9b278f).("-max_retry"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).); |
| 57 | } |
| 58 | |
| 59 | stringcxx . . $ std/string# commands_file = args.getStringValcxx . . $ ArgProcessor#getStringVal(265576c0e07c2ac8).("-c"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).); |
| 60 | |
| 61 | int num_cpus = args.getIntValcxx . . $ ArgProcessor#getIntVal(89800cbf2a9b278f).("-CPU"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).); |
| 62 | |
| 63 | |
| 64 | stringcxx . . $ std/string# failed_commands_filename = "FailedCommands"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).; |
| 65 | if (args.isArgSetcxx . . $ ArgProcessor#isArgSet(c9120223c4466434).("-failed_cmds"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)) { |
| 66 | failed_commands_filename =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). args.getStringValcxx . . $ ArgProcessor#getStringVal(265576c0e07c2ac8).("-failed_cmds"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).); |
| 67 | } |
| 68 | |
| 69 | //declare variables start input stream |
| 70 | ifstreamcxx . . $ std/ifstream# incxx . . $ std/basic_ifstream#basic_ifstream(49f6e7a06ebc5aa8).; // Create an input file stream. |
| 71 | in.opencxx . . $ std/basic_ifstream#open(b8cd37071ce335df).(commands_file.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); // Use it to read from a file named data.txt. |
| 72 | if ( !cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850). in ) { |
| 73 | stringstreamcxx . . $ std/stringstream# errstrcxx . . $ std/__cxx11/basic_stringstream#basic_stringstream(49f6e7a06ebc5aa8).; |
| 74 | errstr <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Error, cannot open file : " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). commands_file <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 75 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(88df5bef833f7f83). errstr.strcxx . . $ std/__cxx11/basic_stringstream#str(d33e1a6fd36255f7).(); |
| 76 | exit(1); |
| 77 | } |
| 78 | |
| 79 | |
| 80 | // check to see if any commands had completed |
| 81 | mapcxx . . $ std/map#<stringcxx . . $ std/string#,bool> previously_completed_commandscxx . . $ std/map#map(49f6e7a06ebc5aa8).; |
| 82 | bool have_previously_completed_commands = false; |
| 83 | |
| 84 | ofstreamcxx . . $ std/ofstream# successfully_completed_fhcxx . . $ std/basic_ofstream#basic_ofstream(49f6e7a06ebc5aa8).; |
| 85 | |
| 86 | { |
| 87 | ifstreamcxx . . $ std/ifstream# prev_completed_fhcxx . . $ std/basic_ifstream#basic_ifstream(49f6e7a06ebc5aa8).; |
| 88 | stringstreamcxx . . $ std/stringstream# completed_commands_filename_sscxx . . $ std/__cxx11/basic_stringstream#basic_stringstream(49f6e7a06ebc5aa8).; |
| 89 | completed_commands_filename_ss <<cxx . . $ std/`operator<<`(88df5bef833f7f83). commands_file <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ".completed"; |
| 90 | stringcxx . . $ std/string# completed_commands_filename = completed_commands_filename_ss.strcxx . . $ std/__cxx11/basic_stringstream#str(d33e1a6fd36255f7).(); |
| 91 | prev_completed_fh.opencxx . . $ std/basic_ifstream#open(b8cd37071ce335df).(completed_commands_filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 92 | |
| 93 | if (prev_completed_fh) { |
| 94 | have_previously_completed_commands = true; |
| 95 | |
| 96 | stringcxx . . $ std/string# command_linecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).; |
| 97 | getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(prev_completed_fh, command_line); |
| 98 | while(! prev_completed_fh.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) { |
| 99 | previously_completed_commands[cxx . . $ std/map#`operator[]`(bbd415b616967878).command_line] = true; |
| 100 | getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(prev_completed_fh, command_line); |
| 101 | } |
| 102 | prev_completed_fh.closecxx . . $ std/basic_ifstream#close(49f6e7a06ebc5aa8).(); |
| 103 | } |
| 104 | |
| 105 | successfully_completed_fh.opencxx . . $ std/basic_ofstream#open(b8cd37071ce335df).(completed_commands_filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), ios_basecxx . . $ std/ios_base#::appcxx . . $ std/ios_base#app.); // open for append |
| 106 | } |
| 107 | |
| 108 | long int NumberofCommands; |
| 109 | NumberofCommands=0; |
| 110 | |
| 111 | vectorcxx . . $ std/vector#<stringcxx . . $ std/string#> commandsArraycxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 112 | |
| 113 | stringcxx . . $ std/string# linecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).; |
| 114 | getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(in,line); |
| 115 | |
| 116 | int count_skip = 0; |
| 117 | int max_report_skip = 10; |
| 118 | |
| 119 | while (! in.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) { |
| 120 | |
| 121 | if (have_previously_completed_commands |
| 122 | && |
| 123 | previously_completed_commands.findcxx . . $ std/map#find(36f8d56706583706).(line) !=cxx . . $ std/`operator!=`(be6a71a859368080). previously_completed_commands.endcxx . . $ std/map#end(7e4de33083b6e738).()) { |
| 124 | |
| 125 | // this command has been run before successfully, not running it again. |
| 126 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. and count_skip < max_report_skip) { |
| 127 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "warning, command: " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). line <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " has successfully completed from a previous run. Skipping it here." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 128 | count_skip++; |
| 129 | if (count_skip >= max_report_skip) { |
| 130 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "-reached max skip warning, turning off warnings for this." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | } |
| 135 | else { |
| 136 | NumberofCommands++; |
| 137 | commandsArray.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(line); |
| 138 | } |
| 139 | getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(in,line); |
| 140 | } |
| 141 | |
| 142 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL.) { |
| 143 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Number of Commands: " <<cxx . . $ std/basic_ostream#`operator<<`(761e6a6e6922c86). NumberofCommands <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 144 | } |
| 145 | |
| 146 | //Parrell Execution of Individual Commands |
| 147 | vectorcxx . . $ std/vector#<stringcxx . . $ std/string#> failedCommandscxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 148 | int num_failed_commands = 0; |
| 149 | int num_succeeded_commands = 0; |
| 150 | |
| 151 | if (shuffle_flag) { |
| 152 | random_shufflecxx . . $ std/random_shuffle(249673c20e2b8d5).(commandsArray.begincxx . . $ std/vector#begin(55a6de06420d4903).(), commandsArray.endcxx . . $ std/vector#end(55a6de06420d4903).()); |
| 153 | } |
| 154 | |
| 155 | omp_set_dynamic(0); |
| 156 | omp_set_num_threads(num_cpus); |
| 157 | |
| 158 | #pragma omp parallel for schedule (dynamic) |
| 159 | for (long int i=0;i<NumberofCommands;i++) { |
| 160 | stringcxx . . $ std/string# command = commandsArraycxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i]; |
| 161 | |
| 162 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. == 2) { |
| 163 | |
| 164 | int thread_no = omp_get_thread_num(); |
| 165 | |
| 166 | #pragma omp critical (standard_error) |
| 167 | { |
| 168 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "CMD[" <<cxx . . $ std/basic_ostream#`operator<<`(761e6a6e6922c86). i <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "], thread[" <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). thread_no <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "]: " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). command <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | int ret = -1; |
| 173 | int try_count = 0; |
| 174 | while (ret != 0 && try_count < max_retries) { |
| 175 | ret = system(command.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 176 | if (ret != 0 && try_count < max_retries) { |
| 177 | try_count++; |
| 178 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "warning, cmd: " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). command <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " failed with ret: " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). ret <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ", going to retry." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 179 | system("sleep 10"); // give the system a short break to recover |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | // exit if child received SIGINT or SIGQUIT |
| 184 | if (WIFSIGNALEDcxx . . $ `<external>/10696550936717951914/stdlib.h:48:10`!(ret) && |
| 185 | (WTERMSIGcxx . . $ `<external>/10696550936717951914/stdlib.h:45:10`!(ret) == SIGINTcxx . . $ `<external>/11773118241360591791/signum-generic.h:48:9`! || WTERMSIGcxx . . $ `<external>/10696550936717951914/stdlib.h:45:10`!(ret) == SIGQUITcxx . . $ `<external>/11773118241360591791/signum-generic.h:57:9`!)) { |
| 186 | #pragma omp critical (exit_critical) |
| 187 | exit(ret); // behavior undefined if exit() called more than once |
| 188 | } |
| 189 | else if (ret != 0) { |
| 190 | |
| 191 | #pragma omp critical (capture_failed_command) |
| 192 | { |
| 193 | num_failed_commands++; |
| 194 | failedCommands.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(command); |
| 195 | } |
| 196 | |
| 197 | |
| 198 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. == 2) { |
| 199 | #pragma omp critical (standard_error) |
| 200 | { |
| 201 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "FAILURE:[" <<cxx . . $ std/basic_ostream#`operator<<`(761e6a6e6922c86). i <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "] " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). command <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | } |
| 206 | else { |
| 207 | #pragma omp critical (report_success) |
| 208 | { |
| 209 | num_succeeded_commands++; |
| 210 | |
| 211 | successfully_completed_fh <<cxx . . $ std/`operator<<`(88df5bef833f7f83). command <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 212 | } |
| 213 | |
| 214 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. == 2) { |
| 215 | #pragma omp critical (standard_error) |
| 216 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "SUCCESS:[" <<cxx . . $ std/basic_ostream#`operator<<`(761e6a6e6922c86). i <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "] " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). command <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL. == 1) { |
| 221 | |
| 222 | stringstreamcxx . . $ std/stringstream# sscxx . . $ std/__cxx11/basic_stringstream#basic_stringstream(49f6e7a06ebc5aa8).; |
| 223 | ss <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "\rsucceeded(" <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). num_succeeded_commands <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ")"; |
| 224 | if (num_failed_commands > 0) { |
| 225 | ss <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ", failed(" <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). num_failed_commands <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ")"; |
| 226 | } |
| 227 | int total_executed = num_succeeded_commands + num_failed_commands; |
| 228 | float percent_done = (float)total_executed/NumberofCommands * 100; |
| 229 | |
| 230 | ss <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). percent_done <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "% completed. "; |
| 231 | |
| 232 | #pragma omp critical (standard_error) |
| 233 | cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(88df5bef833f7f83). ss.strcxx . . $ std/__cxx11/basic_stringstream#str(d33e1a6fd36255f7).(); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | successfully_completed_fh.closecxx . . $ std/basic_ofstream#close(49f6e7a06ebc5aa8).(); |
| 238 | |
| 239 | |
| 240 | //ErrorCheckingOut |
| 241 | if (num_failed_commands != 0) { |
| 242 | ofstreamcxx . . $ std/ofstream# outdatacxx . . $ std/basic_ofstream#basic_ofstream(b8cd37071ce335df).(failed_commands_filename.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 243 | for (int t=0;t<num_failed_commands; ++t) { |
| 244 | outdata <<cxx . . $ std/`operator<<`(88df5bef833f7f83). failedCommands[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).t] <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 245 | } |
| 246 | outdata.closecxx . . $ std/basic_ofstream#close(49f6e7a06ebc5aa8).(); |
| 247 | coutcxx . . $ std/cout. <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "We are sorry, commands in file: [" <<cxx . . $ std/`operator<<`(88df5bef833f7f83). failed_commands_filename <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "] failed. :-( " <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 248 | |
| 249 | exit(1); |
| 250 | } |
| 251 | else { |
| 252 | if (VERBOSE_LEVELcxx . . $ VERBOSE_LEVEL.) { |
| 253 | coutcxx . . $ std/cout. <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "All commands completed successfully. :-)" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 254 | } |
| 255 | exit(0); // used to be return(0), but sometimes in OMP land this would not exit 0....?!?! |
| 256 | } |
| 257 | |
| 258 | } |
| 259 | |
| 260 | stringcxx . . $ std/string# usagecxx . . $ usage(efd28698952f529a). () { |
| 261 | |
| 262 | stringstreamcxx . . $ std/stringstream# sscxx . . $ std/__cxx11/basic_stringstream#basic_stringstream(49f6e7a06ebc5aa8).; |
| 263 | |
| 264 | ss <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 265 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "##########################################################" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 266 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "#" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 267 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# Usage: ParaFly (opts)" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 268 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "#" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 269 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# Required: " <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 270 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -c <str> :filename containing list of bash-style commands to execute." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 271 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -CPU <int> :number_of_threads" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 272 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "#" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 273 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# Optional:" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 274 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -max_retry <int> :number of times to retry a command if it fails. (default: 10)" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 275 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -shuffle :randomly shuffles the command order. " <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 276 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -failed_cmds <str> :filename to capture failed commands. default(\"FailedCommands\")" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 277 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -v :simple progress monitoring." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 278 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "# -vv :increased verbosity in progress monitoring." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 279 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "#" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 280 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "##########################################################" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 281 | |
| 282 | ss <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Note: This process creates a file named based on your commands filename with a .completed extension." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). |
| 283 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "This enables a resume functionality, where if rerun, only those commands not completed successfully will be reprocessed." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 284 | |
| 285 | return(ss.strcxx . . $ std/__cxx11/basic_stringstream#str(d33e1a6fd36255f7).()); |
| 286 | } |
| 287 |