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

SCM Repository

[diderot] Diff of /branches/vis15/src/lib/parallel-target/scheduler.cxx
ViewVC logotype

Diff of /branches/vis15/src/lib/parallel-target/scheduler.cxx

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

revision 4867, Sat Dec 31 16:16:34 2016 UTC revision 4868, Sat Dec 31 21:08:28 2016 UTC
# Line 22  Line 22 
22  #  endif  #  endif
23  #endif  #endif
24  #include <errno.h>  #include <errno.h>
25    #ifdef HAVE_LINUX_GETCPU_H
26    #include <linux/getcpu.h>
27    #endif
28    
29  #ifdef DIDEROT_ENABLE_LOGGING  #ifdef DIDEROT_ENABLE_LOGGING
30  #define IF_LOGGING(...)         __VA_ARGS__  #define IF_LOGGING(...)         __VA_ARGS__
# Line 156  Line 159 
159          }          }
160  #endif  #endif
161    
162    #if defined(HAVE_GETCPU)
163            if (myInfo->_wrld->_verbose) {
164                unsigned cpu, node;
165                int sts = getcpu(&cpu, &node, nullptr);
166                if (sts == 0) {
167                    std::cout << "** Worker" << myInfo->_id << " @ " << node << "." << cpu << "\n";
168                }
169            }
170    #elif defined(HAVE_SCHED_GETCPU)
171            if (myInfo->_wrld->_verbose) {
172                int cpu = sched_getcpu();
173                if (cpu >= 0) {
174                    std::cout << "** Worker" << myInfo->_id << " @ " << cpu << "\n";
175                }
176            }
177    #endif
178    
179          IF_LOGGING( LogWorkerStart(myInfo->_wrld, myInfo->_id+1); )          IF_LOGGING( LogWorkerStart(myInfo->_wrld, myInfo->_id+1); )
180    
181          while (true) {          while (true) {

Legend:
Removed from v.4867  
changed lines
  Added in v.4868

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