IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 16, 2012, 2:14:22 PM (14 years ago)
Author:
eugene
Message:

rework dvo_client calls to pass the command via a file, not the cmd line (parens too complex)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c

    r33543 r33563  
    3838    remove_argument (N, &argc, argv);
    3939    PARALLEL = TRUE;
    40   }
    41 
    42   // dump results directly to fits file (esp for parallel dvo)
    43   char *ResultFile = NULL;
    44   if ((N = get_argument (argc, argv, "-result"))) {
    45     remove_argument (N, &argc, argv);
    46     ResultFile = strcreate(argv[N]);
    47     remove_argument (N, &argc, argv);
    4840  }
    4941
     
    6355  }
    6456
    65   // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
    66   if (PARALLEL && !HOST_ID) {
    67     // not all parallel ops need to set the region selection...
    68     if (!SetSkyRegions (selection)) goto escape;
    69 
    70     int status = HostTableParallelOps (argc, argv, ResultFile, 0);
    71     return status;
    72   }
    73 
    7457  // init locally static variables (time refs)
    7558  dbExtractMeasuresInit();
     
    11295  /* load region corresponding to selection above */
    11396  if ((skylist = SelectRegions (selection)) == NULL) goto escape;
     97
     98  // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
     99  if (PARALLEL && !HOST_ID) {
     100    int status = HostTableParallelOps (argc, argv, RESULT_FILE, 0);
     101
     102    dbFreeFields (fields, Nfields);
     103    dbFreeStack (stack, Nstack);
     104    free (stack);
     105    FreeSkyRegionSelection (selection);
     106    dvo_catalog_free (&catalog);
     107
     108    return status;
     109  }
    114110
    115111  // load image data if needed (for fields listed below)
     
    227223
    228224  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    229   if (ResultFile) {
    230     int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nreturn, FALSE, NULL);
     225  if (RESULT_FILE) {
     226    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, NULL);
    231227    if (!status) goto escape;
    232228  }
     
    243239
    244240escape:
    245   if (ResultFile) free (ResultFile);
    246241  if (vec) free (vec);
    247242  free (values);
Note: See TracChangeset for help on using the changeset viewer.