Changeset 33375
- Timestamp:
- Feb 26, 2012, 4:21:09 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src
- Files:
-
- 5 edited
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/HostTable.c (modified) (1 diff)
-
opihi/dvo/mextract.c (modified) (1 diff)
-
photdbc/src/CopyToHostLocation.c (modified) (2 diffs)
-
photdbc/src/PclientCommands.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/libdvo/include/dvo.h
r33374 r33375 246 246 int stdio[3]; // fd's for communication with the remote host 247 247 int pid; // remote process ID 248 int status; // job exit status 248 249 } HostInfo; 249 250 -
branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c
r33359 r33375 170 170 if (WIFEXITED(status)) { 171 171 fprintf (stderr, "normal completion, exit status is %d\n", WEXITSTATUS(status)); 172 if (WEXITSTATUS(status)) { 172 table->hosts[j].status = WEXITSTATUS(status); 173 if (table->hosts[j].status) { 173 174 fprintf (stderr, "job failed on %s\n", table->hosts[j].hostname); 174 exit (1);175 continue; 175 176 } 176 177 } else { 178 table->hosts[j].status = -1; 177 179 fprintf (stderr, "job exited abnormally on %s\n", table->hosts[j].hostname); 178 exit (1);180 continue; 179 181 } 180 182 } 181 183 if (!found) { 182 fprintf (stderr, " failed to matched finished job to known host!\n");184 fprintf (stderr, "Programming error: failed to matched finished job to known host!\n"); 183 185 exit (2); 184 186 } -
branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c
r33360 r33375 528 528 Vector **vec = NULL; 529 529 for (i = 0; i < table->Nhosts; i++) { 530 if (table->hosts[i].status) continue; 531 530 532 char resultFile[MAX_PATH_LENGTH]; 531 533 snprintf (resultFile, MAX_PATH_LENGTH, "%s/dvo.results.fits", table->hosts[i].pathname); -
branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyToHostLocation.c
r33369 r33375 101 101 // need to re-open and re-read tgtname to check md5sum 102 102 // XXX files that fail here need to be checked 103 char *absname = abspath (tgtname, 1024); 104 if (!get_md5_from_pclient (host, absname, tgtDigest)) { 103 // char *absname = abspath (tgtname, 1024); 104 // if (!get_md5_from_pclient (host, absname, tgtDigest)) { 105 if (!get_md5_with_copy (tgtname, NULL, tgtDigest)) { 105 106 fprintf (stderr, "error reading %s or getting md5\n", tgtname); 106 107 success = FALSE; … … 264 265 char result[1024], fileout[1024]; 265 266 int Nscan = sscanf (stdout_buf.buffer, "%s %s", result, fileout); 266 assert (Nscan == 2); 267 assert (strlen(result) == 2*NDIGEST); 267 if (Nscan != 2) { 268 fprintf (stderr, "error reading md5sum: %s\n", stdout_buf.buffer); 269 goto escape; 270 } 271 if (strlen(result) != 2*NDIGEST) { 272 fprintf (stderr, "error reading md5sum: %s\n", stdout_buf.buffer); 273 goto escape; 274 } 268 275 269 276 // result is the set of 0-f nibbles, convert to the digest -
branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/PclientCommands.c
r33370 r33375 59 59 return FALSE; 60 60 } 61 if (status -= -1) {61 if (status == -1) { 62 62 fprintf (stderr, "client hung\n"); 63 63 return FALSE; … … 144 144 145 145 sscanf (p, "%*s %s", string); 146 assert (strcmp(string, "NONE")); // "no current job\n"); 146 if (!strcmp(string, "NONE")) { 147 if (DEBUG) fprintf (stderr, "not started?\n"); 148 FreeIOBuffer (&buffer); 149 return FALSE; 150 } 147 151 148 152 /** no status change, return to BUSY stack **/ … … 160 164 } 161 165 162 assert (!strcmp(string, "EXIT")); 166 if (strcmp(string, "EXIT")) { 167 fprintf (stderr, "error in status string?\n"); 168 FreeIOBuffer (&buffer); 169 return FALSE; 170 } 163 171 164 172 int exit_status, stdout_buf_size, stderr_buf_size;
Note:
See TracChangeset
for help on using the changeset viewer.
