Main function which will help create graph files for ParMETIS processing Parameters: ----------- params : argparser object An instance of argparser class which stores command line arguments.
(params)
| 379 | |
| 380 | |
| 381 | def run_preprocess_data(params): |
| 382 | """Main function which will help create graph files for ParMETIS processing |
| 383 | |
| 384 | Parameters: |
| 385 | ----------- |
| 386 | params : argparser object |
| 387 | An instance of argparser class which stores command line arguments. |
| 388 | """ |
| 389 | logging.info("Starting to generate ParMETIS files...") |
| 390 | rank = get_proc_info() |
| 391 | |
| 392 | assert os.path.isdir( |
| 393 | params.input_dir |
| 394 | ), f"Please check `input_dir` argument: {params.input_dit}." |
| 395 | |
| 396 | schema_map = read_json(os.path.join(params.input_dir, params.schema_file)) |
| 397 | gen_node_weights_files(schema_map, params) |
| 398 | logging.info("Done with node weights....") |
| 399 | |
| 400 | gen_edge_files(rank, schema_map, params) |
| 401 | logging.info("Done with edge weights...") |
| 402 | |
| 403 | if rank == 0: |
| 404 | gen_parmetis_input_args(params, schema_map) |
| 405 | logging.info("Done generating files for ParMETIS run ..") |
| 406 | |
| 407 | |
| 408 | if __name__ == "__main__": |
no test coverage detected