IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35327


Ignore:
Timestamp:
Mar 27, 2013, 6:44:17 AM (13 years ago)
Author:
eugene
Message:

only launch remote ops on machines that host data we need

Location:
branches/eam_branches/ipp-20130307/Ohana/src/opihi
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/dvo/avextract.c

    r34749 r35327  
    137137  // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
    138138  if (PARALLEL && !HOST_ID) {
    139     int status = HostTableParallelOps (argc, argv, RESULT_FILE, TRUE, 0, VERBOSE);
     139      int status = HostTableParallelOps (skylist, argc, argv, RESULT_FILE, TRUE, 0, VERBOSE);
    140140
    141141    dbFreeFields (fields, Nfields);
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/dvo/avmatch.c

    r34749 r35327  
    9595
    9696    // I need to pass the RA & DEC vectors to the remote clients...
    97     int status = HostTableParallelOps (argc, argv, RESULT_FILE, TRUE, RAvec->Nelements, VERBOSE);
     97    int status = HostTableParallelOps (skylist, argc, argv, RESULT_FILE, TRUE, RAvec->Nelements, VERBOSE);
    9898    if (vec) free (vec);
    9999   
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/dvo/dvo_host_utils.c

    r35109 r35327  
    88# define DIE(WHO,MSG) { perror(WHO); myAbort(MSG); }
    99
    10 int HostTableLaunchJobs (HostTable *table, char *basecmd, char *options, int VERBOSE) {
     10int HostTableLaunchJobs (SkyList *sky, HostTable *table, char *basecmd, char *options, int VERBOSE) {
    1111
    1212  char uniquer[12];
     
    3535
    3636  int top_status = TRUE;
    37   int i;
     37  int i, j;
    3838  for (i = 0; i < table->Nhosts; i++) {
     39
     40      if (sky && (sky->Nregions < table->Nhosts)) {
     41      // do any of the regions want this host?
     42      int wantThisHost = FALSE;
     43      for (j = 0; j < sky->Nregions; j++) {
     44        if (HostTableTestHost (sky->regions[j], table->hosts[i].hostID)) {
     45          wantThisHost = TRUE;
     46          break;
     47        }
     48      }
     49      if (!wantThisHost) {
     50        // fprintf (stderr, "skip host %s\n", table->hosts[i].hostname);
     51        continue;
     52      }
     53      // fprintf (stderr, "not skip host %s\n", table->hosts[i].hostname);
     54    }
    3955
    4056    // ensure that the paths are absolute path names
     
    88104// an alternative ending step ignores the result files and instead saves the names into
    89105// the list 'result:n' for the user to access as desired
    90 int HostTableParallelOps (int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE) {
     106int HostTableParallelOps (SkyList *sky, int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE) {
    91107
    92108  int i;
    93109
    94   // load the list of hosts
    95   SkyTable *sky = GetSkyTable();
    96   if (!sky) {
    97     gprint (GP_ERR, "failed to load sky table for database\n");
    98     return FALSE;
    99   }
     110  // XX // load the list of hosts
     111  // XX SkyTable *sky = GetSkyTable();
     112  // XX if (!sky) {
     113  // XX   gprint (GP_ERR, "failed to load sky table for database\n");
     114  // XX   return FALSE;
     115  // XX }
    100116
    101117  char *tmppath = GetCATDIR ();
     
    145161
    146162  // launch this command remotely
    147   HostTableLaunchJobs (table, basecmd, options, VERBOSE);
     163  HostTableLaunchJobs (sky, table, basecmd, options, VERBOSE);
    148164  free (options);
    149165  free (basecmd);
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/dvo/mextract.c

    r35263 r35327  
    171171
    172172    // call the remote client
    173     int status = HostTableParallelOps (targc, targv, RESULT_FILE, TRUE, 0, VERBOSE);
     173    int status = HostTableParallelOps (skylist, targc, targv, RESULT_FILE, TRUE, 0, VERBOSE);
    174174
    175175    dbFreeFields (fields, Nfields);
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/dvo/mmatch.c

    r35263 r35327  
    167167
    168168    // call the remote client
    169     int status = HostTableParallelOps (targc, targv, RESULT_FILE, TRUE, 0, VERBOSE);
     169    int status = HostTableParallelOps (skylist, targc, targv, RESULT_FILE, TRUE, 0, VERBOSE);
    170170    if (vec) free (vec);
    171171   
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/dvo/remote.c

    r35109 r35327  
    6262
    6363  // strip of the 'remote' and send the remaining arguments to the remote machine
    64   int status = HostTableParallelOps (argc - 1, &argv[1], NULL, ReadVectors, 0, VERBOSE);
     64  int status = HostTableParallelOps (NULL, argc - 1, &argv[1], NULL, ReadVectors, 0, VERBOSE);
    6565  return status;
    6666}
  • branches/eam_branches/ipp-20130307/Ohana/src/opihi/include/dvoshell.h

    r35109 r35327  
    9999dbValue      dbExtractImages        PROTO((Image *image, off_t Nimage, off_t N, dbField *field));
    100100
    101 int          HostTableLaunchJobs    PROTO((HostTable *table, char *basecmd, char *options, int VERBOSE));
    102 int          HostTableParallelOps   PROTO((int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE));
     101int          HostTableLaunchJobs    PROTO((SkyList *sky, HostTable *table, char *basecmd, char *options, int VERBOSE));
     102int          HostTableParallelOps   PROTO((SkyList *sky, int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE));
    103103int          HostTableReloadResults PROTO((char *uniquer, int VERBOSE));
    104104int          HostTableGetResults    PROTO((char *uniquer, int VERBOSE));
Note: See TracChangeset for help on using the changeset viewer.