- Timestamp:
- Mar 23, 2012, 2:19:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/avextract.c
r33583 r33600 41 41 remove_argument (N, &argc, argv); 42 42 PARALLEL = TRUE; 43 } 44 45 // use remote tables, but not dvo_client.. 46 int PARALLEL_LOCAL = FALSE; 47 HostTable *table = NULL; 48 if ((N = get_argument (argc, argv, "-parallel-local"))) { 49 remove_argument (N, &argc, argv); 50 PARALLEL_LOCAL = TRUE; 51 52 char *CATDIR = GetCATDIR(); 53 if (!CATDIR) { 54 gprint (GP_ERR, "CATDIR is not set\n"); 55 return FALSE; 56 } 57 SkyTable *sky = GetSkyTable(); 58 if (!sky) { 59 gprint (GP_ERR, "failed to load sky table for database\n"); 60 return FALSE; 61 } 62 table = HostTableLoad (CATDIR, sky->hosts); 63 if (!table) { 64 gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR); 65 return FALSE; 66 } 43 67 } 44 68 … … 96 120 // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results 97 121 if (PARALLEL && !HOST_ID) { 98 int status = HostTableParallelOps (argc, argv, RESULT_FILE, 0 );122 int status = HostTableParallelOps (argc, argv, RESULT_FILE, 0, VERBOSE); 99 123 100 124 dbFreeFields (fields, Nfields); … … 141 165 /* lock, load, unlock catalog */ 142 166 char hostfile[1024]; 167 if (PARALLEL_LOCAL) { 168 int hostID = skylist[0].regions[i]->hostID; 169 int seq = table->index[hostID]; 170 HOSTDIR = table->hosts[seq].pathname; 171 } 143 172 snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name); 144 catalog.filename = HOST_ID? hostfile : skylist[0].filename[i];173 catalog.filename = (HOST_ID || PARALLEL_LOCAL) ? hostfile : skylist[0].filename[i]; 145 174 catalog.catflags = LOAD_AVES | LOAD_SECF; 146 175 if (needMeasures) { … … 205 234 } 206 235 236 if (table) free (table); 207 237 if (vec) free (vec); 208 238 if (values) free (values); … … 215 245 216 246 escape: 247 if (table) free (table); 217 248 if (vec) free (vec); 218 249 if (values) free (values);
Note:
See TracChangeset
for help on using the changeset viewer.
