IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 2, 2014, 10:05:38 AM (12 years ago)
Author:
eugene
Message:

fix a segfault, add client logger

Location:
branches/eam_branches/ipp-20140904/Ohana/src/relastro
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/Makefile

    r37684 r37706  
    8989$(SRC)/indexCatalogs.$(ARCH).o \
    9090$(SRC)/syncfile.$(ARCH).o \
     91$(SRC)/client_logger.$(ARCH).o \
    9192$(SRC)/relastroVisual.$(ARCH).o
    9293
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/include/relastro.h

    r37699 r37706  
    653653void lockUpdateChips ();
    654654void unlockUpdateChips ();
     655
     656int client_logger_init (char *dirname);
     657int client_logger_message (char *format,...);
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/BrightCatalog.c

    r37655 r37706  
    4343  if (!gfits_fread_header (f, &header)) {
    4444    if (VERBOSE) fprintf (stderr, "can't read image subset header\n");
    45     fclose (f);
    4645    goto escape;
    4746  }
    4847  if (!gfits_fread_matrix (f, &matrix, &header)) {
    4948    if (VERBOSE) fprintf (stderr, "can't read image subset matrix\n");
    50     gfits_free_header (&header);
    51     fclose (f);
    5249    goto escape;
    5350  }
     
    316313  if (catalog) free (catalog);
    317314
    318   fclose (f);
     315  if (f) fclose (f);
    319316  return NULL;
    320317}
  • branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_parallel_images.c

    r37703 r37706  
    1717  INITTIME;
    1818
     19  client_logger_init (CATDIR);
     20
    1921  // load the RegionTable (UserRegion should not be used at this level)
    2022  RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, REGION_FILE);
    2123  int myHost = regionHosts->index[REGION_HOST_ID];
    2224  RegionHostFindNeighbors (regionHosts, myHost);
     25  client_logger_message ("started parallel images on %s\n", regionHosts->hosts[myHost].hostname);
    2326
    2427  // load the subset images belonging to this host
     
    4447  }
    4548  put_astrom_table (table);
     49  client_logger_message ("loaded images on %s\n", regionHosts->hosts[myHost].hostname);
    4650
    4751  // once we have read this table, we should remove it for repeat runs
     
    6367  free (syncfile);
    6468 
     69  client_logger_message ("loaded catalog data %s\n", regionHosts->hosts[myHost].hostname);
     70
    6571  // find ICRF QSOs for reference downstream (only if USE_ICRF_CORRECT)
    6672  select_catalog_ICRF (catalog, Ncatalog);
     
    8490  createStarMap (catalog, Ncatalog);
    8591
     92  client_logger_message ("set up image indexes on %s\n", regionHosts->hosts[myHost].hostname);
     93
    8694  markObjects (catalog, Ncatalog);
    8795
    8896  SAVEPLOT = FALSE;
     97
     98  client_logger_message ("starting the loops: %s\n", regionHosts->hosts[myHost].hostname);
    8999
    90100  /* major modes */
     
    105115        UpdateMeasures (catalog, Ncatalog);
    106116        MARKTIME("reset measures, host %d: %f sec\n", REGION_HOST_ID, dtime);
     117        client_logger_message ("reset measures: %s\n", regionHosts->hosts[myHost].hostname);
    107118      }
    108119      for (i = 0; i < NLOOP; i++) {
    109120        UpdateObjects (catalog, Ncatalog, (i > 0));
    110121        MARKTIME("update objects loop %d, host %d: %f sec\n", i, REGION_HOST_ID, dtime);
     122        client_logger_message ("update objects loop %d: %s\n", i, regionHosts->hosts[myHost].hostname);
    111123        if ((i > 1) || !USE_GALAXY_MODEL) {
    112124          // if GALAXY_MODEL is selected, we want to delay the frame correction until we have
     
    114126          FrameCorrectionParallelSlave (catalog, Ncatalog, regionHosts, i);
    115127          MARKTIME("frame correction loop %d, host %d: %f sec\n", i, REGION_HOST_ID, dtime);
     128          client_logger_message ("frame correction loop %d: %s\n", i, regionHosts->hosts[myHost].hostname);
    116129        }
    117130        share_mean_pos (catalog, Ncatalog, regionHosts, i);
    118131        slurp_mean_pos (catalog, Ncatalog, regionHosts, i);
     132        client_logger_message ("slurp mags loop %d: %s\n", i, regionHosts->hosts[myHost].hostname);
    119133
    120134        UpdateChips (catalog, Ncatalog);
    121135        MARKTIME("update chips loop %d, host %d: %f sec\n", i, REGION_HOST_ID, dtime);
     136        client_logger_message ("update chips loop %d: %s\n", i, regionHosts->hosts[myHost].hostname);
     137
    122138        share_image_pos (regionHosts, i);
    123139        slurp_image_pos (catalog, Ncatalog, regionHosts, i);
     140        client_logger_message ("slurp image pos loop %d: %s\n", i, regionHosts->hosts[myHost].hostname);
     141
    124142        share_meas_pos (catalog, Ncatalog, regionHosts, i);
    125143        slurp_meas_pos (catalog, Ncatalog, regionHosts, i);
    126144        MARKTIME("done exchange loop %d, host %d: %f sec\n", i, REGION_HOST_ID, dtime);
     145        client_logger_message ("slurp meas loop %d: %s\n", i, regionHosts->hosts[myHost].hostname);
    127146      }
    128147      // create summary plots of the process
     
    159178
    160179  share_image_pos (regionHosts, -1);
     180  client_logger_message ("share image pos loop %d: %s\n", -1, regionHosts->hosts[myHost].hostname);
    161181
    162182  exit (0);
Note: See TracChangeset for help on using the changeset viewer.