IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39353


Ignore:
Timestamp:
Feb 18, 2016, 6:23:49 AM (10 years ago)
Author:
eugene
Message:

allow reload run with parallel-manual; delete the targetted image tables (Image.NN.fits) on launch

Location:
trunk/Ohana/src/relphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/assign_images.c

    r39351 r39353  
    2626  char mapfile[DVO_MAX_PATH];
    2727  snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
    28   table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
     28  AstromOffsetTable *table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
    2929
    3030  // assign images.coords.offsetMap -> table->map[i]
    3131  if (table) {
    3232    AstromOffsetTableMatchChips (image, Nimage, table);
    33   } else {
    34     table = AstromOffsetTableInit ();
    3533  }
    3634
  • trunk/Ohana/src/relphot/src/launch_region_hosts.c

    r38441 r39353  
    66  int i;
    77
    8   // clear the I/O files
    9   for (i = 0; i < regionHosts->Nhosts; i++) {
    10     char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync");
    11     if (truncate (syncfile, 0)) fprintf (stderr, "trouble clearing syncfile %s\n", syncfile);
    12     free (syncfile);
     8  // do not remove the sync and fits files if we do a manual run -- user must clear if needed
     9  if (!PARALLEL_REGIONS_MANUAL) {
     10    // clear the I/O files
     11    for (i = 0; i < regionHosts->Nhosts; i++) {
     12      char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync");
     13      if (truncate (syncfile, 0)) fprintf (stderr, "trouble clearing syncfile %s\n", syncfile);
     14      free (syncfile);
    1315
    14     char *fitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.fits");
    15     if (truncate (fitsfile, 0)) fprintf (stderr, "trouble clearing fitsfile %s\n", fitsfile );
    16     free (fitsfile);
     16      char *fitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.fits");
     17      if (truncate (fitsfile, 0)) fprintf (stderr, "trouble clearing fitsfile %s\n", fitsfile );
     18      free (fitsfile);
    1719
    18     char *imsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync");
    19     if (truncate (imsyncfile, 0)) fprintf (stderr, "trouble clearing imsyncfile %s\n", imsyncfile);
    20     free (imsyncfile);
     20      char *imsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync");
     21      if (truncate (imsyncfile, 0)) fprintf (stderr, "trouble clearing imsyncfile %s\n", imsyncfile);
     22      free (imsyncfile);
    2123
    22     char *imfitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.fits");
    23     if (truncate (imfitsfile, 0)) fprintf (stderr, "trouble clearing imfitsfile %s\n", imfitsfile);
    24     free (imfitsfile);
     24      char *imfitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.fits");
     25      if (truncate (imfitsfile, 0)) fprintf (stderr, "trouble clearing imfitsfile %s\n", imfitsfile);
     26      free (imfitsfile);
    2527
    26     char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "loop.sync");
    27     if (truncate (loopsyncfile, 0)) fprintf (stderr, "trouble clearing loopsyncfile %s\n", loopsyncfile);
    28     free (loopsyncfile);
     28      char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "loop.sync");
     29      if (truncate (loopsyncfile, 0)) fprintf (stderr, "trouble clearing loopsyncfile %s\n", loopsyncfile);
     30      free (loopsyncfile);
     31    }
    2932  }
    3033
     
    3740    char filename[1024];
    3841    snprintf (filename, 1024, "%s/Image.%d.fits", CATDIR, host->hostID);
     42    if (unlink (filename)) fprintf (stderr, "trouble clearing image %s\n", filename);
    3943
    4044    // write the image subset for this host
     
    98102  }
    99103
     104  int status = TRUE;
    100105  if (PARALLEL_REGIONS_MANUAL) {
    101106    fprintf (stderr, "run the relphot_client commands above.  when these are done, hit return\n");
     
    103108  } else {
    104109    RegionHostTableWaitJobsGetIO (regionHosts, __FILE__, __LINE__, VERBOSE);
    105   }
    106  
    107   int status = TRUE;
    108   for (i = 0; i < regionHosts->Nhosts; i++) {
    109     status = status && (regionHosts->hosts[i].status == 0);
     110
     111    for (i = 0; i < regionHosts->Nhosts; i++) {
     112      status = status && (regionHosts->hosts[i].status == 0);
     113    }
    110114  }
    111115
Note: See TracChangeset for help on using the changeset viewer.