 import string;
 import sys;
 
+// BEGIN WORKFLOW ARGUMENTS
 // Data split factor with default
 N = string2int(argv("N", "2"));
 // Maximum stage number with default

  }
}

plan_id = python_persist("import plangen",
                         "str(plangen.plan_prep('%s', '%s', %s))" %
                         (db_file, filename(plan_json), runtype));
printf("DB plan_id: %s", plan_id);

// python("print('hi')");
assert(plan_id != "-1", "Plan already exists!");

stage = 0;
run_stage(N, S, "1", stage, propagate(), plan_id, db_file, runtype) =>
  printf("RESULTS: COMPLETE");

/*
  WORKFLOW SWIFT

  Simply run with: 'swift-t workflow.swift <FILE SETTINGS>'
  Or specify the N, S values:
  'swift-t workflow.swift -N=6 -S=6 <FILE SETTINGS>'
  for 55,986 tasks.
  Flags:
  -N : Number of nodes per stage
  -S : Number of stages
  -r : Use RunType.RESTART, default is RunType.RUN_ALL

  FILE SETTINGS:
  These are mandatory:
  --plan_json=<FILE>     : The JSON plan for topN_to_uno
  --dataframe_csv=<FILE> : The CSV data file for topN_to_uno
  --db_file=<FILE>       : The SQLite DB file
*/

import assert;
