IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33227


Ignore:
Timestamp:
Feb 10, 2012, 7:21:08 AM (14 years ago)
Author:
eugene
Message:

working on parallel setphot

Location:
branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/uniphot.c

    r31160 r33227  
    7474  if (!UPDATE) exit (0);
    7575
    76   update (&db, sgroup, Nsgroup);
     76  update_dvo_uniphot (&db, sgroup, Nsgroup);
    7777  dvo_image_unlock (&db);
    7878
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update.c

    r31160 r33227  
    22# include <glob.h>
    33
    4 void update (FITS_DB *db, Group *sgroup, int Nsgroup) {
     4// update images & catalogs for uniphot
     5void update_dvo_uniphot (FITS_DB *db, Group *sgroup, int Nsgroup) {
    56
    67  off_t i, Nimage, Nkeep, *keep;
     
    102103
    103104    fprintf (stderr, "catalog: %s sgroup: %d %s %f\n", catalog.filename, Nmin, sgroup[Nmin].label, Rmin);
    104     update_dvo_catalog (&catalog, &sgroup[Nmin], (Rmin > 2*RADIUS));
     105    update_catalog_uniphot (&catalog, &sgroup[Nmin], (Rmin > 2*RADIUS));
    105106    dvo_catalog_save (&catalog, VERBOSE);
    106107    dvo_catalog_unlock (&catalog);
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog.c

    r16810 r33227  
    11# include "uniphot.h"
    22
    3 void update_dvo_catalog (Catalog *catalog, Group *sgroup, int warn) {
     3// update a single catalog for uniphot
     4void update_catalog_uniphot (Catalog *catalog, Group *sgroup, int warn) {
    45
    56  int i, j, m, found;
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_setphot.c

    r33226 r33227  
    1010int update_setphot_parallel () {
    1111
    12    return (TRUE);
     12  strcpy (connect, "ssh");
     13
     14  // load the list of hosts
     15  HostTable *table = HostTableLoad (catdir, "HostTable.dat");
     16
     17  for (i = 0; i < table->Nhosts; i++) {
     18
     19    char command[1024];
     20    snprintf (command, 1024, "setphot_update_catalogs");
     21
     22    // launch the job on the remote machine (no handshake)
     23    int pid = rconnect (connect, table->hosts[i].hostname, command, table->hosts[i].stdio, &errorInfo, FALSE);
     24    if (!pid) {
     25      if (DEBUG) fprintf (stderr, "failure to start %s (error %d)\n", table->hosts[i].hostname, errorInfo);
     26      exit (1);
     27    }
     28    table->hosts[i].pid; // save for future reference
     29
     30    // check that all hosts started OK?
     31  }
     32
     33  // watch for stdout / stderr from those jobs...
     34  // wait for all of them to complete...
     35
     36  return (TRUE);
    1337}     
    1438
Note: See TracChangeset for help on using the changeset viewer.