Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Diff of /trunk/gadget/maininfo.cc
[mareframe] / trunk / gadget / maininfo.cc Repository:
ViewVC logotype

Diff of /trunk/gadget/maininfo.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 19, Wed May 25 16:36:33 2016 UTC revision 20, Fri Apr 7 09:20:55 2017 UTC
# Line 20  Line 20 
20      << " -n                           perform a network run (using paramin)\n"      << " -n                           perform a network run (using paramin)\n"
21      << " -v --version                 display version information and exit\n"      << " -v --version                 display version information and exit\n"
22      << " -h --help                    display this help screen and exit\n"      << " -h --help                    display this help screen and exit\n"
23    #ifdef _OPENMP
24        << " -parallel  <option>          run in parallel <option> == [spe, rep]. spe=speculative, rep=reproducible. Defaull spe\n"
25    #endif
26      << "\nOptions for specifying the input to Gadget models:\n"      << "\nOptions for specifying the input to Gadget models:\n"
27      << " -i <filename>                read model parameters from <filename>\n"      << " -i <filename>                read model parameters from <filename>\n"
28      << " -opt <filename>              read optimising parameters from <filename>\n"      << " -opt <filename>              read optimising parameters from <filename>\n"
# Line 41  Line 44 
44  }  }
45    
46  MainInfo::MainInfo()  MainInfo::MainInfo()
47    #ifdef _OPENMP
48      : givenOptInfo(0), givenInitialParam(0), runoptimise(0), runparallel(0),
49    #else
50    : givenOptInfo(0), givenInitialParam(0), runoptimise(0),    : givenOptInfo(0), givenInitialParam(0), runoptimise(0),
51    #endif
52      runstochastic(0), runnetwork(0), runprint(1), forceprint(0),      runstochastic(0), runnetwork(0), runprint(1), forceprint(0),
53      printInitialInfo(0), printFinalInfo(0), printLogLevel(0), maxratio(0.95) {      printInitialInfo(0), printFinalInfo(0), printLogLevel(0), maxratio(0.95) {
54    
# Line 146  Line 153 
153    
154      } else if (strcasecmp(aVector[k], "-co") == 0) {      } else if (strcasecmp(aVector[k], "-co") == 0) {
155        handle.logMessage(LOGFAIL, "The -co switch is no longer supported");        handle.logMessage(LOGFAIL, "The -co switch is no longer supported");
156    #ifdef _OPENMP
157      } else if (strcasecmp(aVector[k], "-printinitial") == 0) {      } else if (strcasecmp(aVector[k], "-parallel") == 0) {
158          handle.logMessage(LOGINFO, "--------parallel option ", aVector[k]);
159        if (k == aNumber - 1)        if (k == aNumber - 1)
160          this->showCorrectUsage(aVector[k]);          this->showCorrectUsage(aVector[k]);
161        k++;        k++;
162        this->setPrintInitialFile(aVector[k]);        this->setParallel(aVector[k]);
163    #endif
164    
165      } else if (strcasecmp(aVector[k], "-printfinal") == 0) {      } else if (strcasecmp(aVector[k], "-printfinal") == 0) {
166        if (k == aNumber - 1)        if (k == aNumber - 1)
# Line 423  Line 432 
432      } else if (strcasecmp(text, "-printfinal") == 0) {      } else if (strcasecmp(text, "-printfinal") == 0) {
433        infile >> text >> ws;        infile >> text >> ws;
434        this->setPrintFinalFile(text);        this->setPrintFinalFile(text);
435    #ifdef _OPENMP
436        } else if (strcasecmp(text, "-parallel") == 0) {
437          infile >> text >> ws;
438    handle.logMessage(LOGINFO, "--------parallel option 222 ", text);
439          this->setParallel(text);
440    #endif
441      } else if (strcasecmp(text, "-opt") == 0) {      } else if (strcasecmp(text, "-opt") == 0) {
442        infile >> text >> ws;        infile >> text >> ws;
443        this->setOptInfoFile(text);        this->setOptInfoFile(text);
# Line 479  Line 494 
494    strcpy(strPrintFinalFile, filename);    strcpy(strPrintFinalFile, filename);
495    printFinalInfo = 1;    printFinalInfo = 1;
496  }  }
497    #ifdef _OPENMP
498    void MainInfo::setParallel(char* filename) {
499      if (!strcasecmp(filename,"spe")){
500           runparallel=1;
501    handle.logMessage(LOGINFO, "--------parallel speculative ", filename);
502           return;
503      }
504      if (!strcasecmp(filename,"rep")){
505    handle.logMessage(LOGINFO, "--------parallel reproducible ", filename);
506           runparallel=2;
507           return;
508      }
509      this->showCorrectUsage("opt");
510    
511    }
512    #endif
513    
514  void MainInfo::setMainGadgetFile(char* filename) {  void MainInfo::setMainGadgetFile(char* filename) {
515    if (strMainGadgetFile != NULL) {    if (strMainGadgetFile != NULL) {

Legend:
Removed from v.19  
changed lines
  Added in v.20

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge