IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37958


Ignore:
Timestamp:
Mar 5, 2015, 2:07:12 PM (11 years ago)
Author:
eugene
Message:

add some memcheck calls because of corruption problem; add client logger

Location:
branches/eam_branches/ipp-20150112/Ohana/src/relastro
Files:
4 edited

Legend:

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

    r37807 r37958  
    138138$(SRC)/relastroVisual.$(ARCH).o \
    139139$(SRC)/syncfile.$(ARCH).o \
     140$(SRC)/client_logger.$(ARCH).o \
    140141$(SRC)/BrightCatalog.$(ARCH).o
    141142
  • branches/eam_branches/ipp-20150112/Ohana/src/relastro/src/BrightCatalog.c

    r37807 r37958  
    344344  /*** MeasureTiny ***/
    345345  {
     346    ohana_memcheck_func (1);
    346347    gfits_create_table_header (&theader, "BINTABLE", "MEASURE_TINY");
    347348
     349    ohana_memcheck_func (1);
    348350    gfits_define_bintable_column (&theader, "D", "RA",       "ra",                         "degrees", 1.0, 0.0);
    349351    gfits_define_bintable_column (&theader, "D", "DEC",      "dec",                        "degrees", 1.0, 0.0);
     
    368370
    369371    // generate the output array that carries the data
     372    ohana_memcheck_func (1);
    370373    gfits_create_table (&theader, &ftable);
     374    ohana_memcheck_func (1);
    371375
    372376    // create intermediate storage arrays
     
    391395    int    *catID     ; ALLOCATE (catID    ,  int  ,  catalog->Nmeasure);
    392396    short  *photcode  ; ALLOCATE (photcode ,  short,  catalog->Nmeasure);
     397    ohana_memcheck_func (1);
    393398
    394399    // assign the storage arrays
     
    416421      photcode[i] = measure[i].photcode ;
    417422    }
     423    ohana_memcheck_func (1);
    418424
    419425    // add the columns to the output array
    420426    gfits_set_bintable_column (&theader, &ftable, "RA",         R,         catalog->Nmeasure);
     427    ohana_memcheck_func (1);
    421428    gfits_set_bintable_column (&theader, &ftable, "DEC",        D,         catalog->Nmeasure);
     429    ohana_memcheck_func (1);
    422430    gfits_set_bintable_column (&theader, &ftable, "ROFF_GAL",   RoffGAL,   catalog->Nmeasure);
    423431    gfits_set_bintable_column (&theader, &ftable, "DOFF_GAL",   DoffGAL,   catalog->Nmeasure);
  • branches/eam_branches/ipp-20150112/Ohana/src/relastro/src/client_logger.c

    r37807 r37958  
    2727int client_logger_message (char *format,...) {
    2828
     29  if (!logfile) return FALSE;
     30
    2931  va_list argp;
    3032
  • branches/eam_branches/ipp-20150112/Ohana/src/relastro/src/load_catalogs.c

    r37807 r37958  
    1717
    1818  if (VERBOSE) fprintf (stderr, "loading catalog data\n");
     19  client_logger_message ("loading catalog data\n");
    1920
    2021  ALLOCATE (catalog, Catalog, skylist[0].Nregions);
     
    255256
    256257    BrightCatalog *bcatalog = BrightCatalogLoad (table->hosts[i].results);
    257     assert (bcatalog);
     258    if (!bcatalog) {
     259      client_logger_message ("problem loading table from %s\n", table->hosts[i].hostname);
     260      exit (2);
     261    }
    258262   
    259263    BrightCatalogSplit (catalogs, bcatalog);
     
    277281
    278282  fprintf (stderr, "loaded %d catalogs, using a total of %d stars (%d measures)\n", catalogs->Ncatalog, Naverage, Nmeasure);
     283  client_logger_message ("loaded %d catalogs, using a total of %d stars (%d measures)\n", catalogs->Ncatalog, Naverage, Nmeasure);
    279284
    280285  return (catalog);
Note: See TracChangeset for help on using the changeset viewer.