IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33375


Ignore:
Timestamp:
Feb 26, 2012, 4:21:09 PM (14 years ago)
Author:
eugene
Message:

attempt to make dvodist deal with pclient problems (only partly successful)

Location:
branches/eam_branches/ipp-20111122/Ohana/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/libdvo/include/dvo.h

    r33374 r33375  
    246246  int stdio[3];               // fd's for communication with the remote host
    247247  int pid;                    // remote process ID
     248  int status;                 // job exit status
    248249} HostInfo;
    249250
  • branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c

    r33359 r33375  
    170170      if (WIFEXITED(status)) {
    171171        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) {
    173174          fprintf (stderr, "job failed on %s\n", table->hosts[j].hostname);
    174           exit (1);
     175          continue;
    175176        }
    176177      } else {
     178        table->hosts[j].status = -1;
    177179        fprintf (stderr, "job exited abnormally on %s\n", table->hosts[j].hostname);
    178         exit (1);
     180        continue;
    179181      }
    180182    }
    181183    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");
    183185      exit (2);
    184186    }
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c

    r33360 r33375  
    528528  Vector **vec = NULL;
    529529  for (i = 0; i < table->Nhosts; i++) {
     530    if (table->hosts[i].status) continue;
     531
    530532    char resultFile[MAX_PATH_LENGTH];
    531533    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  
    101101      // need to re-open and re-read tgtname to check md5sum
    102102      // 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)) {
    105106        fprintf (stderr, "error reading %s or getting md5\n", tgtname);
    106107        success = FALSE;
     
    264265  char result[1024], fileout[1024];
    265266  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  }
    268275 
    269276  // 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  
    5959      return FALSE;
    6060  }
    61   if (status -= -1) {
     61  if (status == -1) {
    6262      fprintf (stderr, "client hung\n");
    6363      return FALSE;
     
    144144
    145145  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  }
    147151 
    148152  /** no status change, return to BUSY stack **/
     
    160164  }
    161165
    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  }
    163171
    164172  int exit_status, stdout_buf_size, stderr_buf_size;
Note: See TracChangeset for help on using the changeset viewer.