IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33089 for trunk/psModules


Ignore:
Timestamp:
Jan 11, 2012, 10:16:48 AM (14 years ago)
Author:
bills
Message:

Fix problems with IPP threading. In psThreadPoolWait wait until all threads have
finished before returning even if one of the threads has a fault.
Return false if any thread faults. Also add a new argument bool harvestOnFailure
which tells psThreadPoolWait to harvest the done jobs if there is a failure.
Many functions previously used psThreadPoolWait(harvest = false) because they
wanted to examine the jobs structs afterwards. However they weren't cleaning up the
jobs in the failure case.
These now call psThreadPoolWait(harvest = false, harvestOnFailure = true)
which causes the jobs to be cleaned up on fault. These lingering jobs were the
cause of the "Unknown task" failure in psImageConvolve*
Also changed psphotReadout to check for failure of psphotGuessModels and return
to the caller. This yields quality = 3007

Location:
trunk/psModules/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmReadoutFake.c

    r32347 r33089  
    314314                }
    315315            }
    316             if (!psThreadPoolWait(true)) {
     316            if (!psThreadPoolWait(true, true)) {
    317317                psError(PS_ERR_UNKNOWN, false, "Error waiting for threads.");
    318318                psFree(groups);
  • trunk/psModules/src/detrend/pmBias.c

    r29833 r33089  
    154154    if (threaded) {
    155155        // wait here for the threaded jobs to finish
    156         if (!psThreadPoolWait(true)) {
     156        if (!psThreadPoolWait(true, true)) {
    157157            psError(PS_ERR_UNKNOWN, false, "Unable to apply bias correction.");
    158158            return false;
  • trunk/psModules/src/detrend/pmDark.c

    r28405 r33089  
    601601    if (threaded) {
    602602        // wait here for the threaded jobs to finish
    603         if (!psThreadPoolWait(true)) {
     603        if (!psThreadPoolWait(true, true)) {
    604604            psError(PS_ERR_UNKNOWN, false, "Unable to apply dark.");
    605605            psFree(orders);
  • trunk/psModules/src/detrend/pmFlatField.c

    r28405 r33089  
    161161    if (threaded) {
    162162        // wait here for the threaded jobs to finish
    163         if (!psThreadPoolWait(true)) {
     163        if (!psThreadPoolWait(true, true)) {
    164164            psError(PS_ERR_UNKNOWN, false, "Unable to flat-field image.");
    165165            return false;
  • trunk/psModules/src/detrend/pmShutterCorrection.c

    r29004 r33089  
    805805        if (threaded) {
    806806            // wait here for the threaded jobs to finish
    807             if (!psThreadPoolWait(true)) {
     807            if (!psThreadPoolWait(true, true)) {
    808808                psError(PS_ERR_UNKNOWN, false, "Unable to apply shutter correction.");
    809809                psFree(shutterImage);
  • trunk/psModules/src/imcombine/pmStackReject.c

    r31435 r33089  
    313313    }
    314314
    315     if (!psThreadPoolWait(false)) {
     315    if (!psThreadPoolWait(false, true)) {
    316316        psError(psErrorCodeLast(), false, "Unable to grow bad pixels.");
    317317        psFree(source);
  • trunk/psModules/src/imcombine/pmSubtraction.c

    r32695 r33089  
    905905        }
    906906    }
    907     if (!psThreadPoolWait(true)) {
     907    if (!psThreadPoolWait(true, true)) {
    908908        psError(psErrorCodeLast(), false, "Error waiting for threads.");
    909909        return false;
     
    14271427    }
    14281428
    1429     if (!psThreadPoolWait(false)) {
     1429    if (!psThreadPoolWait(false, true)) {
    14301430        psError(psErrorCodeLast(), false, "Error waiting for threads.");
    14311431        return false;
  • trunk/psModules/src/imcombine/pmSubtractionEquation.c

    r30622 r33089  
    958958    }
    959959
    960     if (!psThreadPoolWait(true)) {
     960    if (!psThreadPoolWait(true, true)) {
    961961        psError(psErrorCodeLast(), false, "Error waiting for threads.");
    962962        return false;
  • trunk/psModules/src/imcombine/pmSubtractionEquation.v0.c

    r30622 r33089  
    882882    }
    883883
    884     if (!psThreadPoolWait(true)) {
     884    if (!psThreadPoolWait(true, true)) {
    885885        psError(psErrorCodeLast(), false, "Error waiting for threads.");
    886886        return false;
  • trunk/psModules/src/imcombine/pmSubtractionMatch.c

    r31671 r33089  
    10911091    }
    10921092
    1093     if (!psThreadPoolWait(true)) {
     1093    if (!psThreadPoolWait(true, true)) {
    10941094        psError(psErrorCodeLast(), false, "Error waiting for threads.");
    10951095        psFree(models);
Note: See TracChangeset for help on using the changeset viewer.