IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36577


Ignore:
Timestamp:
Mar 6, 2014, 4:42:10 PM (12 years ago)
Author:
eugene
Message:

only work with neighbors

Location:
branches/eam_branches/ipp-20140206/Ohana/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/libdvo/include/dvo.h

    r36576 r36577  
    311311  off_t *imseq;
    312312
    313   int *neighbors;
    314   int Nneighbors;
     313  int *neighbors;             // list of neighbor index values
     314  int Nneighbors;             // number of neighbors
     315  char isNeighbor;            // TRUE if I am a neighbor to the current region host
    315316} RegionHostInfo;
    316317
     
    906907int RegionHostTableWaitJobs (RegionHostTable *regionHosts, char *file, int lineno);
    907908int RegionHostTableWaitJobsGetIO (RegionHostTable *regionHosts, char *file, int lineno, int VERBOSE);
     909int RegionHostFindNeighbors (RegionHostTable *table, int Nhost);
    908910
    909911# endif // DVO_H
  • branches/eam_branches/ipp-20140206/Ohana/src/libdvo/src/RegionHostTable.c

    r36576 r36577  
    3030    hosts[i].neighbors = NULL;
    3131    hosts[i].Nneighbors = 0;
     32    hosts[i].isNeighbor = FALSE;
    3233  }
    3334  return;
     
    170171  }
    171172
    172   for (i = 0; i < table->Nhosts; i++) {
    173     RegionHostFindNeighbors (table, i);
    174   }
    175 
    176173  free (filename);
    177174  fclose (f);
     
    180177
    181178int RegionHostFindNeighbors (RegionHostTable *table, int Nhost) {
     179
     180  int i;
    182181
    183182  // given a specific host (by table sequence), find all of its neighbors
     
    192191
    193192    if (i == Nhost) continue;
    194     RegionHostInfo *althost = &table->hosts[i];
     193    RegionHostInfo *altHost = &table->hosts[i];
    195194   
    196195    int onBorder;
     
    226225      myhost->Nneighbors ++;
    227226      REALLOCATE (myhost->neighbors, int, myhost->Nneighbors + 1);
     227      altHost->isNeighbor = TRUE;
    228228  }
    229229  return TRUE;
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_parallel_images.c

    r36564 r36577  
    1919  // load the RegionTable (UserRegion should not be used at this level)
    2020  RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, REGION_FILE);
     21  int myHost = regionHosts->index[REGION_HOST_ID];
     22  RegionHostFindNeighbors (regionHosts, myHost);
    2123
    2224  // load the subset images belonging to this host
     
    112114
    113115  // this is a checkpoint to make sure all hosts have finished the loop above
    114   int myHost = regionHosts->index[REGION_HOST_ID];
    115116  char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loop.sync");
    116117  update_sync_file (loopsyncfile, 0);
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/share_images_pos.c

    r36565 r36577  
    5353  for (i = 0; i < regionHosts->Nhosts; i++) {
    5454    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
    55     // XXX add neighbor check? : if (not_neighbor(host[i])) continue;
     55    if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
    5656
    5757    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagepos.sync");
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/share_mean_pos.c

    r36574 r36577  
    6666
    6767  for (i = 0; i < regionHosts->Nhosts; i++) {
    68     // if (not_neighbor(host[i])) continue;
    6968    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
     69    if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
    7070
    7171    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanpos.sync");
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_images.c

    r36558 r36577  
    2121  // load the RegionTable (UserRegion should not be used at this level)
    2222  RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, REGION_FILE);
     23  int myHost = regionHosts->index[REGION_HOST_ID];
     24  RegionHostFindNeighbors (regionHosts, myHost);
    2325
    2426  // load the subset images belonging to this host
     
    117119
    118120  // this is a checkpoint to make sure all hosts have finished the loop above
    119   int myHost = regionHosts->index[REGION_HOST_ID];
    120121  char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loop.sync");
    121122  update_sync_file (loopsyncfile, 0);
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_image_mags.c

    r36549 r36577  
    5353  for (i = 0; i < regionHosts->Nhosts; i++) {
    5454    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
    55     // XXX add neighbor check? : if (not_neighbor(host[i])) continue;
     55    if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
    5656
    5757    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync");
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_mean_mags.c

    r36558 r36577  
    7777    // if (not_neighbor(host[i])) continue;
    7878    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
     79    if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
    7980
    8081    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync");
Note: See TracChangeset for help on using the changeset viewer.