Changeset 38381
- Timestamp:
- Jun 5, 2015, 12:09:09 PM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429/src/addstar
- Files:
-
- 6 edited
-
include/addstar.h (modified) (1 diff)
-
src/args.c (modified) (1 diff)
-
src/args_parallel_client.c (modified) (1 diff)
-
src/loadICRF_save_remote.c (modified) (2 diffs)
-
src/loadstarpar_save_remote.c (modified) (3 diffs)
-
src/resort_catalogs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/addstar/include/addstar.h
r38346 r38381 327 327 void *memrchr(const void *s, int c, size_t n); 328 328 int addstar_create_ID (); 329 int strextend (char *input, char *format,...);330 329 331 330 void initMosaicCoords (); -
branches/eam_branches/ohana.20150429/src/addstar/src/args.c
r37807 r38381 480 480 } 481 481 482 int strextend (char *input, char *format,...) {483 484 char tmpextra[1024], tmpline[1024];485 va_list argp;486 487 va_start (argp, format);488 vsnprintf (tmpextra, 1024, format, argp);489 snprintf (tmpline, 1024, "%s %s", input, tmpextra);490 strcpy (input, tmpline);491 492 return TRUE;493 }494 495 482 /** addstar modes: 496 483 -
branches/eam_branches/ohana.20150429/src/addstar/src/args_parallel_client.c
r37116 r38381 125 125 } 126 126 127 int strextend (char *input, char *format,...) {128 129 char tmpextra[1024], tmpline[1024];130 va_list argp;131 132 va_start (argp, format);133 vsnprintf (tmpextra, 1024, format, argp);134 snprintf (tmpline, 1024, "%s %s", input, tmpextra);135 strcpy (input, tmpline);136 137 return TRUE;138 }139 -
branches/eam_branches/ohana.20150429/src/addstar/src/loadICRF_save_remote.c
r37807 r38381 2 2 # include "loadICRF.h" 3 3 # define DEBUG 1 4 5 int strextend (char *input, char *format,...) {6 7 char tmpextra[1024], tmpline[1024];8 va_list argp;9 10 va_start (argp, format);11 vsnprintf (tmpextra, 1024, format, argp);12 snprintf (tmpline, 1024, "%s %s", input, tmpextra);13 strcpy (input, tmpline);14 15 return TRUE;16 }17 4 18 5 int loadICRF_save_remote (ICRF_Stars *stars, int Nstars, HostTable *hosts, SkyRegion *region, char *fullname, AddstarClientOptions *options) { … … 64 51 65 52 // need to generate the remote command 66 char command[1024];67 s nprintf (command, 1024, "loadICRF_client");68 strextend ( command, "-hostID %d", host->hostID);69 strextend ( command, "-D CATDIR %s", CATDIR);70 strextend ( command, "-hostdir %s", host->pathname);71 strextend ( command, "-cpt %s", region->name);72 strextend ( command, "-input %s", filename);73 strextend ( command, "-D ADDSTAR_RADIUS %f", options->radius);53 char *command = NULL; 54 strextend (&command, "loadICRF_client"); 55 strextend (&command, "-hostID %d", host->hostID); 56 strextend (&command, "-D CATDIR %s", CATDIR); 57 strextend (&command, "-hostdir %s", host->pathname); 58 strextend (&command, "-cpt %s", region->name); 59 strextend (&command, "-input %s", filename); 60 strextend (&command, "-D ADDSTAR_RADIUS %f", options->radius); 74 61 75 62 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ohana.20150429/src/addstar/src/loadstarpar_save_remote.c
r37807 r38381 2 2 # include "loadstarpar.h" 3 3 # define DEBUG 1 4 5 int strextend (char *input, char *format,...) {6 7 char tmpextra[1024], tmpline[1024];8 va_list argp;9 10 va_start (argp, format);11 vsnprintf (tmpextra, 1024, format, argp);12 snprintf (tmpline, 1024, "%s %s", input, tmpextra);13 strcpy (input, tmpline);14 15 return TRUE;16 }17 4 18 5 int loadstarpar_save_remote (StarPar_Stars *stars, int Nstars, HostTable *hosts, SkyRegion *region, char *fullname, AddstarClientOptions *options) { … … 62 49 63 50 // need to generate the remote command 64 char command[1024];65 s nprintf (command, 1024, "loadstarpar_client");66 strextend ( command, "-hostID %d", host->hostID);67 strextend ( command, "-D CATDIR %s", CATDIR);68 strextend ( command, "-hostdir %s", host->pathname);69 strextend ( command, "-cpt %s", region->name);70 strextend ( command, "-input %s", filename);51 char *command = NULL; 52 strextend (&command, "loadstarpar_client"); 53 strextend (&command, "-hostID %d", host->hostID); 54 strextend (&command, "-D CATDIR %s", CATDIR); 55 strextend (&command, "-hostdir %s", host->pathname); 56 strextend (&command, "-cpt %s", region->name); 57 strextend (&command, "-input %s", filename); 71 58 72 59 // launch the job on the remote machine (no handshake) … … 78 65 } 79 66 host->pid = pid; // save for future reference 67 free (command); 80 68 81 69 save_remote_host (host); -
branches/eam_branches/ohana.20150429/src/addstar/src/resort_catalogs.c
r37116 r38381 74 74 table->hosts[i].pathname = tmppath; 75 75 76 char command[1024];77 s nprintf (command, 1024, "addstar_client -resort");78 strextend ( command, "-D CATDIR %s", CATDIR);79 strextend ( command, "-hostID %d", table->hosts[i].hostID);80 strextend ( command, "-hostdir %s", table->hosts[i].pathname);81 strextend ( command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);76 char *command = NULL; 77 strextend (&command, "addstar_client -resort"); 78 strextend (&command, "-D CATDIR %s", CATDIR); 79 strextend (&command, "-hostID %d", table->hosts[i].hostID); 80 strextend (&command, "-hostdir %s", table->hosts[i].pathname); 81 strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 82 82 83 if (VERBOSE) strextend ( command, "%s-v");84 if (NTHREADS) strextend ( command, "%s-threads %d", NTHREADS);85 if (OLD_RESORT) strextend ( command, "%s-old-resort");86 if (options->nosort == 3) strextend ( command, "%s-force-sort");87 if (options->existing_regions) strextend ( command, "%s-existing-regions");83 if (VERBOSE) strextend (&command, "-v"); 84 if (NTHREADS) strextend (&command, "-threads %d", NTHREADS); 85 if (OLD_RESORT) strextend (&command, "-old-resort"); 86 if (options->nosort == 3) strextend (&command, "-force-sort"); 87 if (options->existing_regions) strextend (&command, "-existing-regions"); 88 88 89 89 fprintf (stderr, "command: %s\n", command);
Note:
See TracChangeset
for help on using the changeset viewer.
