- Timestamp:
- Mar 16, 2012, 2:14:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c
r33543 r33563 38 38 remove_argument (N, &argc, argv); 39 39 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);48 40 } 49 41 … … 63 55 } 64 56 65 // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results66 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 74 57 // init locally static variables (time refs) 75 58 dbExtractMeasuresInit(); … … 112 95 /* load region corresponding to selection above */ 113 96 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 } 114 110 115 111 // load image data if needed (for fields listed below) … … 227 223 228 224 // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere) 229 if (R esultFile) {230 int status = WriteVectorTableFITS (R esultFile, "RESULT", vec, Nreturn, FALSE, NULL);225 if (RESULT_FILE) { 226 int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, NULL); 231 227 if (!status) goto escape; 232 228 } … … 243 239 244 240 escape: 245 if (ResultFile) free (ResultFile);246 241 if (vec) free (vec); 247 242 free (values);
Note:
See TracChangeset
for help on using the changeset viewer.
