Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/target-cpu/fragments/par-main.in
ViewVC logotype

Diff of /branches/vis15/src/compiler/target-cpu/fragments/par-main.in

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

revision 3924, Fri Jun 3 17:30:27 2016 UTC revision 4418, Wed Aug 17 12:49:10 2016 UTC
# Line 16  Line 16 
16    
17  #ifndef DIDEROT_NO_INPUTS  #ifndef DIDEROT_NO_INPUTS
18    // initialize the default values for the inputs    // initialize the default values for the inputs
19      inputs inputs;      cmd_line_inputs inputs;
20      init_defaults (&inputs);      init_defaults (&inputs);
21  #endif  #endif
22    
23    // handle command-line options    // handle command-line options
24      {      {
25          diderot::options<@REALTY@,@INTTY@> *opts = new diderot::options<@REALTY@,@INTTY@> ();          diderot::options<@REALTY@,@INTTY@> *opts = new diderot::options<@REALTY@,@INTTY@> ();
26          uint32_t np = wrld->_sched->numWorkers;          uint32_t np = wrld->_sched->_numWorkers;
27          opts->addFlag ("v,verbose", "enable runtime-system messages", &(wrld->_verbose));          opts->addFlag ("v,verbose", "enable runtime-system messages", &(wrld->_verbose));
28          opts->addFlag ("t,timing", "enable execution timing", &timingFlg);          opts->addFlag ("t,timing", "enable execution timing", &timingFlg);
29          opts->add ("n,nworkers", "specify number of worker threads", &np, true);          opts->add ("n,nworkers", "specify number of worker threads", &np, true);
# Line 36  Line 36 
36          register_outputs (opts);          register_outputs (opts);
37          opts->process (argc, argv);          opts->process (argc, argv);
38          delete opts;          delete opts;
39          wrld->_sched->numWorkers = np;          wrld->_sched->_numWorkers = np;
40      }      }
41    
42    // initialize scheduler stuff    // initialize scheduler stuff
# Line 58  Line 58 
58    
59    // run the generated global initialization code    // run the generated global initialization code
60      if (wrld->_verbose) {      if (wrld->_verbose) {
61          std::cerr << "initializing globals ...\n";          std::cerr << "initializing globals and creating strands ...\n";
62      }      }
63      if (wrld->initially()) {      if (wrld->create_strands()) {
64          std::cerr << "Error in global initialization:\n%s\n"          std::cerr << "Error in global initialization:\n"
65              << biffMsgStrGet(wrld->_errors) << std::endl;              << biffMsgStrGet(wrld->_errors) << std::endl;
66          exit(1);          exit(1);
67      }      }
68    
     if (wrld->_verbose) {  
         std::cerr << "run with " << wrld->_nstrands << " strands ..." << std::endl;  
     }  
   
69      uint32_t nSteps = wrld->run (stepLimit);      uint32_t nSteps = wrld->run (stepLimit);
70    
71      if (wrld->_errors->errNum > 0) {      if (wrld->_errors->errNum > 0) {
72          std::cerr << "Error during execution:\n%s\n" << biffMsgStrGet(wrld->_errors);          std::cerr << "Error during execution:\n" << biffMsgStrGet(wrld->_errors) << std::endl;
73          exit(1);          exit(1);
74      }      }
75    
# Line 86  Line 82 
82      }      }
83    
84    // output the final strand states    // output the final strand states
85      write_outputs (wrld);      write_output (wrld);
86    
87      delete wrld;      delete wrld;
88    

Legend:
Removed from v.3924  
changed lines
  Added in v.4418

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0