IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37650


Ignore:
Timestamp:
Nov 20, 2014, 8:31:46 PM (12 years ago)
Author:
eugene
Message:

fix parallel loadICRF

Location:
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_client.c

    r37570 r37650  
    1717  SkyList *skylist = SkyRegionByCPT (sky, CPT_FILE);
    1818
     19  char cptfile[1024];
     20  snprintf (cptfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[0]->name);
     21
    1922  int Nstars;
    2023  ICRF_Stars *stars = loadICRF_load_stars (INPUT, &Nstars);
    2124
    22   loadICRF_catalog (stars, Nstars, skylist->regions[0], CPT_FILE, &options);
     25  loadICRF_catalog (stars, Nstars, skylist->regions[0], cptfile, &options);
    2326
    2427  free (stars);
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_io.c

    r37570 r37650  
    8181  gfits_free_table (&ftable);
    8282
     83  fclose (f);
     84
    8385  return TRUE;
    8486}
     
    143145  GET_COLUMN(Map     , "M_AP",        float);
    144146  GET_COLUMN(dMap    , "dM_AP",       float);
    145   GET_COLUMN(photcode, "PHOTCODE",    unsigned int);
    146   GET_COLUMN(flags   , "FLAGS",       unsigned int);
     147  GET_COLUMN(photcode, "PHOTCODE",    int);
     148  GET_COLUMN(flags   , "FLAGS",       int);
    147149
    148150  gfits_free_header (&theader);
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_remote_hosts.c

    r37570 r37650  
    7676  if ((pid == -1) && (errno != ECHILD)) myAbort ("programming error?");
    7777
     78  if (DEBUG) fprintf (stdout, "PID %d done\n", pid);
     79
    7880  // find the host which has finished
    7981  int i;
     
    8385    if (hosts[i][0].pid != pid) continue;
    8486    found = TRUE;
     87    break;
    8588  }
    8689  myAssert (found, "Programming error: failed to matched finished job to known host!");
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_save_remote.c

    r37570 r37650  
    3333    char filename[1024]; // CATDIR/tmpdir/ICRF.PID.index.fits
    3434    snprintf (filename, 1024, "%s/tmpdir/ICRF.%s.%05d.fits", CATDIR, uniquer, region->index);
     35    if (!check_file_access (filename, FALSE, TRUE, TRUE)) exit (2);
    3536
    3637    // write the data to the given FITS file
     
    5051    HostInfo *host = NULL;
    5152    ALLOCATE (host, HostInfo, 1);
     53    InitHost (host);
    5254
    5355    // we want to run this job on the host described by hostMach.  copy
     
    6971    strextend (command, "-cpt %s", region->name);
    7072    strextend (command, "-input %s", filename);
     73    strextend (command, "-D ADDSTAR_RADIUS %f", options->radius);
     74
     75    fprintf (stderr, "command: %s\n", command);
    7176
    7277    // launch the job on the remote machine (no handshake)
     
    7883    }
    7984    host->pid = pid; // save for future reference
     85    fprintf (stderr, "launch cpt %s on %s @ %d\n", region->name, host->pathname, pid);
    8086   
    8187    save_remote_host (host);
  • branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadstarpar_remote_hosts.c

    r37417 r37650  
    8383    if (hosts[i][0].pid != pid) continue;
    8484    found = TRUE;
     85    break;
    8586  }
    8687  myAssert (found, "Programming error: failed to matched finished job to known host!");
Note: See TracChangeset for help on using the changeset viewer.