IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 25, 2012, 10:07:50 AM (14 years ago)
Author:
eugene
Message:

allow remote launch to be verbose

Location:
branches/eam_branches/ipp-20120405/Ohana/src/opihi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120405/Ohana/src/opihi/dvo/dvo_host_utils.c

    r33911 r33912  
    66# define DVO_MAX_PATH 1024
    77
    8 int HostTableLaunchJobs (HostTable *table, char *basecmd, char *options) {
     8int HostTableLaunchJobs (HostTable *table, char *basecmd, char *options, int VERBOSE) {
    99
    1010  char uniquer[12];
     
    1313  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
    1414
     15  int top_status = TRUE;
    1516  int i;
    1617  for (i = 0; i < table->Nhosts; i++) {
     
    3839    free (commandFile);
    3940
    40     if (DEBUG || PARALLEL_MANUAL) fprintf (stderr, "command: %s\n", command);
     41    if (VERBOSE) gprint (GP_ERR, "command: %s\n", command);
    4142
    4243    if (PARALLEL_MANUAL) {
     
    4748      int status = system (command);
    4849      if (status) {
    49         fprintf (stderr, "ERROR running relphot_client\n");
    50         exit (2);
     50        gprint (GP_ERR, "ERROR running relphot_client\n");
     51        top_status = FALSE;
    5152      }
    5253    } else {
     
    5556      int pid = rconnect ("ssh", table->hosts[i].hostname, command, table->hosts[i].stdio, &errorInfo, FALSE);
    5657      if (!pid) {
    57         if (DEBUG) fprintf (stderr, "failure to start %s (error %d)\n", table->hosts[i].hostname, errorInfo);
    58         exit (1);
     58        gprint (GP_ERR, "failure to start %s (error %d)\n", table->hosts[i].hostname, errorInfo);
     59        top_status = FALSE;
     60        continue;
    5961      }
    6062      table->hosts[i].pid = pid; // save for future reference
    6163    }
    6264  }
    63   return TRUE;
     65  return top_status;
    6466}
    6567
     
    126128
    127129  // launch this command remotely
    128   HostTableLaunchJobs (table, basecmd, options);
     130  HostTableLaunchJobs (table, basecmd, options, VERBOSE);
    129131  free (options);
    130132  free (basecmd);
  • branches/eam_branches/ipp-20120405/Ohana/src/opihi/include/dvoshell.h

    r33911 r33912  
    9999dbValue      dbExtractImages        PROTO((Image *image, off_t Nimage, off_t N, dbField *field));
    100100
    101 int          HostTableLaunchJobs    PROTO((HostTable *table, char *basecmd, char *options));
     101int          HostTableLaunchJobs    PROTO((HostTable *table, char *basecmd, char *options, int VERBOSE));
    102102int          HostTableParallelOps   PROTO((int argc, char **argv, char *ResultFile, int Nelements, int VERBOSE));
    103103int          HostTableReloadResults PROTO((char *uniquer, int VERBOSE));
Note: See TracChangeset for help on using the changeset viewer.