version 1.11, 2013/04/28 08:05:21
|
version 1.12, 2014/06/06 13:04:19
|
Line 33 ModuleArgs_t module_args[] = |
|
Line 33 ModuleArgs_t module_args[] = |
|
{ARG_STRING, "segin", kNOTSPECIFIED, "input data segment"}, | {ARG_STRING, "segin", kNOTSPECIFIED, "input data segment"}, |
{ARG_STRING, "segout", kNOTSPECIFIED, "output data segment"}, | {ARG_STRING, "segout", kNOTSPECIFIED, "output data segment"}, |
{ARG_STRING, "histlink", "HISTORY", "name of link to ancillary dataseries for processing metadata"}, | {ARG_STRING, "histlink", "HISTORY", "name of link to ancillary dataseries for processing metadata"}, |
|
{ARG_INT, "MEMUSE", "3", "set to 0 to minimize use of file descriptors and memory, set to 1 to read slices and write whole files, 2 to read whole files and write slices, 3 to read whole files and write whole files."}, |
{ARG_INT, "PERM", "1", "set to 0 for transient records, nonzero for permanent records"}, | {ARG_INT, "PERM", "1", "set to 0 for transient records, nonzero for permanent records"}, |
{ARG_INT, "VERB", "1", "option for level of verbosity: 0=only error and warning messages; >0=print messages outside of loop; >1=print messages inside loop; >2=debugging output", NULL}, | {ARG_INT, "VERB", "1", "option for level of verbosity: 0=only error and warning messages; >0=print messages outside of loop; >1=print messages inside loop; >2=debugging output", NULL}, |
{ARG_INT, "CALVERKEY","2", "short integer bit mask determining which 4-bit fields of CALVER64 are permitted to change on input. set the bit to disallow change of the corresponding nybble."}, | {ARG_INT, "CALVERKEY","2", "short integer bit mask determining which 4-bit fields of CALVER64 are permitted to change on input. set the bit to disallow change of the corresponding nybble."}, |
Line 52 ModuleArgs_t module_args[] = |
|
Line 53 ModuleArgs_t module_args[] = |
|
| |
#include "jretile_manytofew.c" | #include "jretile_manytofew.c" |
#include "jretile_fewtomany.c" | #include "jretile_fewtomany.c" |
|
#include "jretile_maxmem.c" |
| |
int DoIt(void) | int DoIt(void) |
{ | { |
|
|
char *ttotal, *tchunk; | char *ttotal, *tchunk; |
DRMS_Record_t *tempoutrec = NULL; | DRMS_Record_t *tempoutrec = NULL; |
// DRMS_RecordSet_t *inrecset = NULL; | // DRMS_RecordSet_t *inrecset = NULL; |
int verbflag; |
int verbflag, memflag; |
| |
inrecquery = (char *)cmdparams_get_str(&cmdparams, "in", &status); | inrecquery = (char *)cmdparams_get_str(&cmdparams, "in", &status); |
outseries = (char *)cmdparams_get_str(&cmdparams, "out", &status); | outseries = (char *)cmdparams_get_str(&cmdparams, "out", &status); |
|
|
if (lchunksize == 0) | if (lchunksize == 0) |
lchunksize=lmax+1; | lchunksize=lmax+1; |
verbflag = cmdparams_get_int(&cmdparams, "VERB", &status); | verbflag = cmdparams_get_int(&cmdparams, "VERB", &status); |
|
memflag = cmdparams_get_int(&cmdparams, "MEMUSE", &status); |
| |
ttotal=(char *)cmdparams_get_str(&cmdparams, "TTOTAL", &status); | ttotal=(char *)cmdparams_get_str(&cmdparams, "TTOTAL", &status); |
status=drms_names_parseduration(&ttotal, &nseconds, 1); | status=drms_names_parseduration(&ttotal, &nseconds, 1); |
|
|
if (verbflag) | if (verbflag) |
printf("nrecsin = %d, nrecsout = %d, ", nrecsin, nrecsout); | printf("nrecsin = %d, nrecsout = %d, ", nrecsin, nrecsout); |
| |
|
if (memflag==0) |
|
{ |
if (nrecsin > nrecsout) | if (nrecsin > nrecsout) |
{ | { |
if (verbflag) | if (verbflag) |
|
|
printf("using jretile_fewtomany()\n"); | printf("using jretile_fewtomany()\n"); |
status=jretile_fewtomany(); | status=jretile_fewtomany(); |
} | } |
|
} |
|
else if (memflag==1) |
|
{ |
|
if (verbflag) |
|
printf("forced use of jretile_fewtomany()\n"); |
|
status=jretile_fewtomany(); |
|
} |
|
else if (memflag==2) |
|
{ |
|
if (verbflag) |
|
printf("forced use of jretile_manytofew()\n"); |
|
status=jretile_manytofew(); |
|
} |
|
else if (memflag==3) |
|
{ |
|
if (verbflag) |
|
printf("using jretile_maxmem()\n"); |
|
status=jretile_maxmem(); |
|
} |
| |
return status; | return status; |
| |