IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33204


Ignore:
Timestamp:
Feb 6, 2012, 6:50:18 AM (14 years ago)
Author:
eugene
Message:

added some notes to dvosplit; working on dvodist

Location:
branches/eam_branches/ipp-20111122/Ohana/src
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/dvosplit/src/dvosplit.c

    r25757 r33204  
    11# include "dvosplit.h"
    22
     3// XXX : go to this : dvosplit (catdir) (outlevel) [-region Rmin Rmax Dmin Dmax]
    34// dvosplit (outlevel) [-region Rmin Rmax Dmin Dmax]
    45int main (int argc, char **argv) {
     
    1415  ConfigInit (&argc, argv);
    1516  args (argc, argv);
     17
     18  // XXX : OUTCAT = strcreate (argv[1]);
     19  // XXX : OUT_DEPTH = atoi (argv[2]);
    1620
    1721  OUT_DEPTH = atoi (argv[1]);
     
    2933    // if (current level >  out level) skip: cannot currently merge catalogs
    3034    // if (current level == out level) skip: no action is needed
     35    // XXX if outdir != indir, copy the tables across
    3136    if (skylist[0].regions[i][0].depth >= OUT_DEPTH) continue;
    3237
     
    5156    // change sky.regions[i].depth for these regions
    5257    outlist = SkyListByPatch (sky, OUT_DEPTH, skylist[0].regions[i]);
     58    // XXX update the filenames for outlist given the new outdir
    5359
    5460    outcatalogs = open_output_catalogs (outlist);
  • branches/eam_branches/ipp-20111122/Ohana/src/libautocode/def/SkyRegion.d

    r5945 r33204  
    88FIELD   Dmin,      D_MIN,          float,
    99FIELD   Dmax,      D_MAX,          float,
    10 FIELD   childS,    CHILD_S,        int,           sequence number in full table of first child
    11 FIELD   childE,    CHILD_E,        int,           sequence number in full table of last child + 1
    12 FIELD   parent,    PARENT,         int,           sequence number in full table of parent
    13 FIELD   index,     INDEX,          int,           sequence number in full table of this entry
    14 FIELD   depth,     DEPTH,          char,          depth of this entry
    15 FIELD   child,     CHILD,          char,          does this entry have children?
    16 FIELD   table,     TABLE,          char,          does this entry have a table?
    17 FIELD   name,      NAME,           char[21],      name / filename
     10FIELD   childS,    CHILD_S,        int,            sequence number in full table of first child
     11FIELD   childE,    CHILD_E,        int,            sequence number in full table of last child + 1
     12FIELD   parent,    PARENT,         int,            sequence number in full table of parent
     13FIELD   index,     INDEX,          int,            sequence number in full table of this entry
     14FIELD   depth,     DEPTH,          char,           depth of this entry
     15FIELD   child,     CHILD,          char,           does this entry have children?
     16FIELD   table,     TABLE,          char,           does this entry have a table?
     17FIELD   name,      NAME,           char[19],       name / filename
     18FIELD   hostID,    HOST_ID,        unsigned short, host ID where data is stored
     19
     20# note : 2012.02.05 : stole 2 bytes from 'name' to use for host ID (no
     21#        DBs were created with more than 17 bytes in the name).  The
     22#        hostID points at an entry in the host table (text file).
     23#        There is no safety on this, but it is recoverable (by
     24#        examining the directories) if misplaced.
     25#
     26#        Note that SkyTables from databases generated in the past may
     27#        have garbage characters here.  To ensure catch this
     28#        condition, we add a header keyword to SkyTables in which the
     29#        hostID has been set; if that is not present, the SkyTable
     30#        loading software should init these bytes to 0 (== unassigned).
  • branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/HostTableLoad.c

    r33203 r33204  
    11# include "photdbc.h"
     2# define DEBUG 1
    23
    34typedef struct {
     
    4849  InitHosts (hosts, Nhosts, NHOSTS);
    4950
     51  int maxID = 0;
     52
    5053  int Nline;
    5154  for (Nline = 0; TRUE; Nline ++) {
     
    6972    }
    7073
     74    // check the validity of ID (0 < ID < MAX_SHORT)
     75
     76    if (ID < 1) {
     77      fprint (stderr, "invalid host ID %d\n", ID);
     78      exit (1);
     79    }
     80    if (ID > 65535) {
     81      fprint (stderr, "invalid host ID %d\n", ID);
     82      exit (1);
     83    }
     84    maxID = MAX(maxID, ID);
     85
    7186    hosts[Nhosts].hostID = ID;
    7287    hosts[Nhosts].hostname = strcreate(tmphost);
     
    85100  table->hosts = hosts;
    86101
     102  ALLOCATE (table->index, unsigned short, maxID + 1);
     103  for (i = 0; i <= maxID; i++) table->index[i] = -1;
     104
     105  for (i = 0; i < table->Nhosts; i++) {
     106    if (table->index[table->hosts[i].hostID] == -1) {
     107      fprintf (stderr, "error: duplicate hostID %d\n", table->hosts[i].hostID);
     108      exit (1);
     109    }
     110    table->index[table->hosts[i].hostID] = i;
     111  }
     112
    87113  return table;
    88114}
     
    90116int CheckHostsAndPaths (HostTable *table) {
    91117
     118  int i;
     119  int stdio[3];
    92120  char command[64];
    93121  char shell[64];
    94122
    95123  strcpy (command, "ssh");
    96   strcpy (shell, "pclient");
     124  strcpy (shell, "csh");
    97125
    98126  for (i = 0; i < table->Nhosts; i++) {
     
    101129    if (DEBUG) fprintf (stderr, "starting host within thread\n");
    102130
    103     pid = rconnect (command, host[0].hostname, shell, stdio);
     131    pid = rconnect (command, table->hosts[i].hostname, shell, stdio);
    104132    if (!pid) {     
    105133      /** failure to start: extend retry period **/
    106134      if (DEBUG) fprintf (stderr, "failure to start %s\n", table->hosts[i].hostname);
     135      exit (1);
    107136    }
     137
     138    // XXX check anything else?
     139
     140    // close the connection
     141    close(stdio[0]);
     142    close(stdio[1]);
     143    close(stdio[2]);
     144
     145    status = check_dir_access (table->hosts[i].pathname, DEBUG);
     146    if (!status) {
     147      fprintf (stderr, "failed to find / create target path\n");
     148      exit (2);
     149    }
     150
     151    fprintf (stderr, "success : %s, %s\n", table->hosts[i].hostname, table->hosts[i].pathname);
    108152  }
    109 
     153  return (TRUE);
    110154}
Note: See TracChangeset for help on using the changeset viewer.