IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 29, 2011, 11:24:06 AM (15 years ago)
Author:
eugene
Message:

fix optimized build issues; add I/O test

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

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110505/Ohana/src/libdvo/src/dvo_catalog_split.c

    r31468 r31586  
    172172  header.buffer = NULL;
    173173  primary = NULL;
     174  status = FALSE;
    174175
    175176  /* get the components from the header - these duplicate information in the split files (NAXIS2) */
  • branches/eam_branches/ipp-20110505/Ohana/src/relphot/src/load_images.c

    r31584 r31586  
    6565      }
    6666      Nsubset += NsubsetExtra;
    67       MARKTIME("selected %d overlapping images: %f sec\n", (int) Nsubset, dtime);
     67      MARKTIME("selected %d overlapping images: %f sec\n", (int) NsubsetExtra, dtime);
    6868    } else {
    6969      skylist = SkyListByPatch (sky, -1, region);
     
    7272      // 'subset' points to a new copy of the data (different from 'image')
    7373      subset = select_images (skylist, image, Nimage, &LineNumber, &Nsubset);
    74       MARKTIME("selected %d overlapping images: %f sec\n", (int) NsubsetExtra, dtime);
     74      MARKTIME("selected %d overlapping images: %f sec\n", (int) Nsubset, dtime);
    7575    }
    7676  } else {
  • branches/eam_branches/ipp-20110505/Ohana/src/relphot/src/relphot.c

    r31552 r31586  
    11# include "relphot.h"
    22# define USE_DIRECT 0
     3
     4# define TIMESTAMP(TIME) \
     5    gettimeofday (&stop, (void *) NULL);        \
     6    dtime = DTIME (stop, start);                \
     7    TIME += dtime;                              \
     8    gettimeofday (&start, (void *) NULL);
    39
    410# define MARKTIME(MSG,...) { \
     
    1723
    1824  gettimeofday (&start, (void *) NULL);
     25
     26  // XXX quick and stupid test:
     27  if (0) {
     28    int i, j;
     29    off_t *Nlist, *NLIST, **mlist;
     30    off_t *NlistI, *NLISTI, **mlistI;
     31    int **clist;
     32    int **clistI;
     33    float dtime;
     34    float time1 = 0.0;
     35    float time2 = 0.0;
     36
     37    int Nmosaic = 10000;
     38    int Nimage = 600000;
     39
     40    for (j = 0; j < 19000; j++) {
     41
     42      // mosaic indexes
     43      ALLOCATE (Nlist, off_t,   Nmosaic);
     44      ALLOCATE (NLIST, off_t,   Nmosaic);
     45      ALLOCATE (clist, int *,   Nmosaic);
     46      ALLOCATE (mlist, off_t *, Nmosaic);
     47   
     48      for (i = 0; i < Nmosaic; i++) {
     49        Nlist[i] = 0;
     50        NLIST[i] = 100;
     51        ALLOCATE (clist[i], int,   NLIST[i]);
     52        ALLOCATE (mlist[i], off_t, NLIST[i]);
     53      }
     54
     55      // image indexes
     56      ALLOCATE (NlistI, off_t,   Nimage);
     57      ALLOCATE (NLISTI, off_t,   Nimage);
     58      ALLOCATE (clistI, int *,   Nimage);
     59      ALLOCATE (mlistI, off_t *, Nimage);
     60   
     61      for (i = 0; i < Nimage; i++) {
     62        NlistI[i] = 0;
     63        NLISTI[i] = 100;
     64        ALLOCATE (clistI[i], int,   NLISTI[i]);
     65        ALLOCATE (mlistI[i], off_t, NLISTI[i]);
     66      }
     67
     68      TIMESTAMP(time1);
     69
     70      // free mosaic indexes
     71      for (i = 0; i < Nmosaic; i++) {
     72        free (clist[i]);
     73        free (mlist[i]);
     74      }
     75      free (Nlist);
     76      free (NLIST);
     77      free (clist);
     78      free (mlist);
     79
     80      // free image indexes
     81      for (i = 0; i < Nimage; i++) {
     82        free (clistI[i]);
     83        free (mlistI[i]);
     84      }
     85      free (NlistI);
     86      free (NLISTI);
     87      free (clistI);
     88      free (mlistI);
     89
     90      TIMESTAMP(time2);
     91
     92      if (j % 100 == 0) {
     93        fprintf (stderr, "done with %d\n", j);
     94        fprintf (stderr, "time1  %f : init mosaic\n", time1);
     95        fprintf (stderr, "time2  %f : free mosaic\n", time2);
     96      }
     97    }
     98   
     99    fprintf (stderr, "time1  %f : init mosaic\n", time1);
     100    fprintf (stderr, "time2  %f : free mosaic\n", time2);
     101    exit (1);
     102  }
    19103
    20104  /* get configuration info, args */
Note: See TracChangeset for help on using the changeset viewer.