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/interruptinterface.cc
[mareframe] / trunk / gadget / interruptinterface.cc Repository:
ViewVC logotype

Diff of /trunk/gadget/interruptinterface.cc

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

revision 16, Tue Oct 13 11:29:01 2015 UTC revision 27, Mon May 8 11:58:23 2017 UTC
# Line 4  Line 4 
4  #include "gadget.h"  #include "gadget.h"
5    
6  extern Ecosystem* EcoSystem;  extern Ecosystem* EcoSystem;
7    extern volatile int interrupted;
8  #ifdef _OPENMP  #ifdef _OPENMP
9  extern Ecosystem** EcoSystems;  extern Ecosystem** EcoSystems;
10    extern MainInfo _main;
11  #endif  #endif
12    
13  void InterruptInterface::printMenu() {  void InterruptInterface::printMenu() {
# Line 14  Line 15 
15    {    {
16            int iters = EcoSystem->getFuncEval();            int iters = EcoSystem->getFuncEval();
17            #ifdef _OPENMP            #ifdef _OPENMP
18              if (_main.runParallel()){
19              int numThr = omp_get_max_threads ( );              int numThr = omp_get_max_threads ( );
20                for (int i = 0; i < numThr; i++)                for (int i = 0; i < numThr; i++)
21                    iters += EcoSystems[i]->getFuncEval();                    iters += EcoSystems[i]->getFuncEval();
22              }
23            #endif            #endif
24      cout << "\nInterrupted after a total of " << iters << " iterations ...";      cout << "\nInterrupted after a total of " << iters << " iterations ...";
25    }    }
# Line 31  Line 34 
34  }  }
35    
36  int InterruptInterface::menu() {  int InterruptInterface::menu() {
37      interrupted = 0;
38    char userinput[MaxStrLength];    char userinput[MaxStrLength];
39    char interruptfile[MaxStrLength];    char interruptfile[MaxStrLength];
40    strncpy(userinput, "", MaxStrLength);    strncpy(userinput, "", MaxStrLength);

Legend:
Removed from v.16  
changed lines
  Added in v.27

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

Powered By FusionForge