IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 16, 2012, 4:16:48 PM (14 years ago)
Author:
eugene
Message:

move max path length to dvo.h and rename DVO_MAX_PATH

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

Legend:

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

    r33662 r33870  
    44# define PARALLEL_MANUAL 0
    55# define PARALLEL_SERIAL 0
    6 # define MAX_PATH_LENGTH 1024
     6# define DVO_MAX_PATH 1024
    77
    88int HostTableLaunchJobs (HostTable *table, char *basecmd, char *options) {
     
    1717
    1818    // ensure that the paths are absolute path names
    19     char *tmppath = abspath (table->hosts[i].pathname, MAX_PATH_LENGTH);
     19    char *tmppath = abspath (table->hosts[i].pathname, DVO_MAX_PATH);
    2020    free (table->hosts[i].pathname);
    2121    table->hosts[i].pathname = tmppath;
     
    2323    // need to save the results filename with the uniquer
    2424    // XXX a bit of a waste (but only 1024 * 60 bytes or so
    25     ALLOCATE (table->hosts[i].results, char, MAX_PATH_LENGTH);
    26     snprintf (table->hosts[i].results, MAX_PATH_LENGTH, "%s/dvo.results.%s.fits", table->hosts[i].pathname, uniquer);
     25    ALLOCATE (table->hosts[i].results, char, DVO_MAX_PATH);
     26    snprintf (table->hosts[i].results, DVO_MAX_PATH, "%s/dvo.results.%s.fits", table->hosts[i].pathname, uniquer);
    2727
    28     char commandBase[MAX_PATH_LENGTH];
    29     snprintf (commandBase, MAX_PATH_LENGTH, "dvo.command.%s.txt", uniquer);
    30     char *commandFile = abspath(commandBase, MAX_PATH_LENGTH);
     28    char commandBase[DVO_MAX_PATH];
     29    snprintf (commandBase, DVO_MAX_PATH, "dvo.command.%s.txt", uniquer);
     30    char *commandFile = abspath(commandBase, DVO_MAX_PATH);
    3131
    3232    FILE *f = fopen (commandFile, "w");
     
    8686  }
    8787
    88   char *CATDIR = abspath (tmppath, MAX_PATH_LENGTH);
     88  char *CATDIR = abspath (tmppath, DVO_MAX_PATH);
    8989  if (!CATDIR) {
    9090    gprint (GP_ERR, "failed to make an absolute path from %s (too long)\n", tmppath);
  • branches/eam_branches/ipp-20120405/Ohana/src/opihi/dvo/hosts.c

    r33662 r33870  
    11# include "dvoshell.h"
    22# include <glob.h>
    3 # define MAX_PATH_LENGTH 1024
     3# define DVO_MAX_PATH 1024
    44
    55// functions to manage the remote hosts
     
    5959    for (i = 0; i < table->Nhosts; i++) {
    6060      pglob.gl_offs = 0;
    61       char name[MAX_PATH_LENGTH];
    62       snprintf (name, MAX_PATH_LENGTH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
     61      char name[DVO_MAX_PATH];
     62      snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
    6363      if (VERBOSE) gprint (GP_ERR, "checking %s\n", name);
    6464      glob (name, 0, NULL, &pglob);
  • branches/eam_branches/ipp-20120405/Ohana/src/opihi/dvo/remote.c

    r33662 r33870  
    11# include "dvoshell.h"
    22# include <glob.h>
    3 # define MAX_PATH_LENGTH 1024
     3# define DVO_MAX_PATH 1024
    44
    55// functions to manage the remote hosts
Note: See TracChangeset for help on using the changeset viewer.