IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 20, 2013, 1:06:55 PM (13 years ago)
Author:
watersc1
Message:

Changes to ppMerge to allow it to gracefully skip a cell if there are no valid inputs for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeReadChunk.c

    r24798 r35687  
    2424                                              "INPUTS.VARIANCES");// Do we have variances?
    2525    int rows = psMetadataLookupS32(NULL, config->arguments, "ROWS"); // Number of rows to read per chunk
    26 
     26    int rejectedInputs = 0;
    2727    // select an available fileGroup
    2828    while (1) {
     
    7373                        psWarning ("skipping video cell (1: %ld)", (long) pthread_self());
    7474                        inRO->process = false;
     75                        rejectedInputs++;
    7576                        continue;
    7677                    }
     
    8687                        psWarning ("skipping video cell (2: %ld)", (long) pthread_self());
    8788                        inRO->process = false;
     89                        rejectedInputs++;
    8890                        continue;
    8991                    }
     
    9496                    psWarning ("skipping video cell (3: %ld)", (long) pthread_self());
    9597                    inRO->process = false;
     98                    rejectedInputs++;
    9699                    continue;
    97100                }
     
    119122                    }
    120123                }
    121 
     124               
    122125                // fprintf (stderr, "%lx, %lx, %lx\n", (long int) inRO->image, (long int) inRO->mask, (long int) inRO->variance);
    123 
    124                 if (!keepReading) {
    125                     return NULL;
    126                 }
     126                if (!keepReading) {
     127                  return NULL;
     128                }
     129               
     130               
    127131            }
    128 
     132            psLogMsg("ppMerge",PS_LOG_INFO,"%d %ld %d %d %d",
     133                     j,readouts->n,rejectedInputs,fileGroup->read,fileGroup->busy);
     134            if (rejectedInputs >= readouts->n) {
     135              fileGroup->read = false;
     136              fileGroup->busy = false;
     137              return NULL;
     138            }
     139           
    129140            fileGroup->read = fileGroup->busy = true;
    130141            return fileGroup;
Note: See TracChangeset for help on using the changeset viewer.