- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/Ohana/src/opihi/include/pcontrol.h
r21379 r27840 60 60 PCONTROL_RESP_KILL_JOB, 61 61 PCONTROL_RESP_STOP_HOST, 62 PCONTROL_RESP_DOWN_HOST, 62 63 } HostResp; 63 64 … … 97 98 int requested; 98 99 } JobOutput; 100 101 /* A machine has a unique name and may have multiple Hosts (each of which can run a single job) 102 We use this to track aspects of the analysis per machine, to eg, limit the number of jobs 103 desired on a single machine */ 104 typedef struct { 105 char *name; 106 int Nhosts; // how many hosts are selected for this machine (whatever state) 107 int NjobsRealhost; 108 int NjobsWanthost; 109 } Machine; 99 110 100 111 /* data to define a job */ … … 129 140 int pid; 130 141 HostStat stack; 131 Ptime lasttry;132 Ptime nexttry;133 142 IDtype HostID; 134 143 IOBuffer comms_buffer; 135 144 char *response; 136 145 HostResp response_state; 146 Ptime last_start_try; // last (UNIX) time we attempted to connect to this host (0 on success) 147 Ptime next_start_try; // next (UNIX) time we should attempt to connect to this host (0 on success) 148 Ptime connect_time; // (UNIX) time we connected to this host 137 149 struct Job *job; 138 150 } Host; 139 151 152 /* the Jobs and Hosts are managed in a set of Stacks which define their state */ 140 153 typedef struct { 141 154 void **object; … … 210 223 211 224 int StartHost (Host *host); 225 int CheckResetHost (Host *host); 212 226 int CheckIdleHost (Host *host, int Stage); 213 227 int CheckDoneJob (Job *job, Host *host); … … 253 267 /*** StopHosts.c ***/ 254 268 void DownHost (Host *host); 269 int DownHosts (void); 270 int DownHostResponse (Host *host); 255 271 void OffHost (Host *host); 256 int DownHosts (void); 257 int StopHost (Host *host); 272 int StopHost (Host *host, int mode); 258 273 int StopHostResponse (Host *host); 259 274 int HarvestHost (int pid); … … 276 291 void LinkJobAndHost (Job *job, Host *host); 277 292 293 /*** MachineOps.c ***/ 294 void InitMachines (); 295 void FreeMachines (); 296 Machine *FindMachineByName (char *name); 297 Machine *AddMachine (char *name); 298 int DelMachine (char *name); 299 int AddMachineHost (Host *host); 300 int DelMachineHost (Host *host); 301 int AddMachineJob (Host *host, Job *job); 302 int DelMachineJob (Host *host, Job *job); 303 int PrintMachines (); 304 int CheckMachineJobs (Host *host, Job *job); 305 int GetMaxUnwantedHostJobs (void); 306 void SetMaxUnwantedHostJobs (int value); 307 308 float GetMaxConnectTime (void); 309 void SetMaxConnectTime (float value); 310 float GetMaxWantHostWait (void); 311 void SetMaxWantHostWait (float value); 312 278 313 void pcontrol_exit (int n); 279 314
Note:
See TracChangeset
for help on using the changeset viewer.
