Skip to content

Commit

Permalink
Merge pull request #2434 from stfc/2433_aggregate_process_nemo_inlcud…
Browse files Browse the repository at this point in the history
…e_paths

(closes #2433) process_nemo.py argparse aggregates provided -I flags
  • Loading branch information
arporter authored Dec 14, 2023
2 parents dfed1f3 + 910b0c9 commit d3cc718
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
37) PR #2387 towards #1799. Add support for querying the datatype of
operations.

38) PR #2434 for #2433. Bug fix for process_nemo.py script to
aggregate -I arguments.

release 2.4.0 29th of September 2023

1) PR #1758 for #1741. Splits the PSyData read functionality into a
Expand Down
6 changes: 3 additions & 3 deletions examples/nemo/scripts/process_nemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
help="Add profiling instrumentation to any files that "
"are not being transformed (i.e. appear in the "
"NOT_PERFORMANT list)")
PARSER.add_argument('-I', dest='include_path')
PARSER.add_argument('-I', action='append', dest='include_path', default=[])
ARGS = PARSER.parse_args()

# Check whether the PSyclone command has been specified in an environment
Expand Down Expand Up @@ -144,8 +144,8 @@
else:
print(f"Processing {file_name} (passthrough only)...")

if ARGS.include_path:
extra_args += ["-I", ARGS.include_path]
for ipath in ARGS.include_path:
extra_args += ["-I", ipath]
extra_args += ["-oalg", "/dev/null",
"-opsy", out_file, ffile]
# Since we're in Python we could call psyclone.generator.main()
Expand Down
Binary file modified psyclone.pdf
Binary file not shown.

0 comments on commit d3cc718

Please sign in to comment.