<commit_before>#include "parallel.h"
#include <iostream>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include "cmdLineOptions.h"
#include "h5test.h"

void printVersion(const char* execName)
{
  if (P.myProc == 0)
    std::cerr << execName << " Version: " << H5TEST_VERSION << std::endl;
}

void printUsage(const char* execName)
{
  printVersion(execName);

  if (P.myProc == 0)
    std::cerr << "\nUsage:\n"
              << execName << " [options]\n\n"
              << "Options:\n"
              << " -h, -?        : Print Usage\n"
              << " -v            : Print Version\n"
              << " -C            : use h5 chunk\n"
              << " -S            : use h5 slab (default)\n"
              << " -N            : no T3PIO\n"
              << " -O type       : output type (l: lua, t: table, b: both (default: table))\n"
              << " -n nvar       : nvar  (default=4)\n"
              << " -l num        : local size is num (default=10)\n"
              << " -g num        : global size is num\n"
              << " -f factor     : number of stripes per writer (default=2)\n"
              << " -s num        : maximum number of stripes\n"
              << " -z num        : maximum stripe size in MB\n"
              << " -p num        : maximum number of writers per node\n"
              << " -w num        : Total number of writers\n"
              << std::endl;
}



CmdLineOptions::CmdLineOptions(int argc, char* argv[])
  : m_state(iBAD)
{
  int  opt;
  bool version, help, illegal;
  char option;

  maxWritersPer  = INT_MAX;

  useT3PIO         = true;
  maxWriters       = -1;
  version          = false;
  help             = false;
  localSz          = -1;
  globalSz         = -1;
  h5chunk          = false;
  h5slab           = false;
  factor           = 1;
  stripes          = -1;
  stripeSz         = -1;
  h5style          = "h5slab";
  luaStyleOutput   = false;
  tableStyleOutput = true;

  while ( (opt = getopt(argc, argv, "s:hCSLO:f:p:w:l:g:n:z:?v")) != -1)
    {
      switch (opt)
        {
        case 'v':
          version = true;
          break;
        case '?':
        case 'h':
          help = true;<commit_msg>better output report control with -O option<commit_after>#include "parallel.h"
#include <iostream>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include "cmdLineOptions.h"
#include "h5test.h"

void printVersion(const char* execName)
{
  if (P.myProc == 0)
    std::cerr << execName << " Version: " << H5TEST_VERSION << std::endl;
}

void printUsage(const char* execName)
{
  printVersion(execName);

  if (P.myProc == 0)
    std::cerr << "\nUsage:\n"
              << execName << " [options]\n\n"
              << "Options:\n"
              << " -h, -?        : Print Usage\n"
              << " -v            : Print Version\n"
              << " -C            : use h5 chunk\n"
              << " -S            : use h5 slab (default)\n"
              << " -N            : no T3PIO\n"
              << " -O type       : output type (l: lua, t: table, b: both (default: table))\n"
              << " -n nvar       : nvar  (default=4)\n"
              << " -l num        : local size is num (default=10)\n"
              << " -g num        : global size is num\n"
              << " -f factor     : number of stripes per writer (default=2)\n"
              << " -s num        : maximum number of stripes\n"
              << " -z num        : maximum stripe size in MB\n"
              << " -p num        : maximum number of writers per node\n"
              << " -w num        : Total number of writers\n"
              << std::endl;
}



CmdLineOptions::CmdLineOptions(int argc, char* argv[])
  : m_state(iBAD)
{
  int  opt;
  bool version, help, illegal;
  char choice;

  maxWritersPer  = INT_MAX;

  useT3PIO         = true;
  maxWriters       = -1;
  version          = false;
  help             = false;
  localSz          = -1;
  globalSz         = -1;
  h5chunk          = false;
  h5slab           = false;
  factor           = 1;
  stripes          = -1;
  stripeSz         = -1;
  h5style          = "h5slab";
  luaStyleOutput   = false;
  tableStyleOutput = true;

  while ( (opt = getopt(argc, argv, "s:hCSLO:f:p:w:l:g:n:z:?v")) != -1)
    {
      switch (opt)
        {
        case 'v':
          version = true;
          break;
        case '?':
        case 'h':
          help = true;
{'fraction_non_alphanumeric': 0.14513951395139513, 'fraction_numerical': 0.010351035103510351, 'mean_word_length': 1.4236641221374047, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2627675', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1474, 'n_words': 375}