Skip to content

[Bug] Input unsuccessfully copied when '&' was used. #478

@jude-moo

Description

@jude-moo

When trying to add the FNG-SS benchmarks, I did a trial run of JADE with these files added. One of the cells was defined as:

C     SS BLOCK
  100  1   -7.954   100 -101 102 -103 104 -105 &
  #500 #501 #502 #503 #504 #505 #506

When I ran the command, 'python -m jade --run', the code would fail to run and returned the error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/__main__.py", line 57, in <module>
    main()
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/__main__.py", line 41, in main
    app.run_benchmarks()
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/app/app.py", line 173, in run_benchmarks
    commands = benchmark.run()
               ^^^^^^^^^^^^^^^
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/run/benchmark.py", line 509, in run
    runs = self._run_sub_benchmarks(root_benchmark, code, lib)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/run/benchmark.py", line 531, in _run_sub_benchmarks
    single_run = SingleRunFactory.create(
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/run/benchmark.py", line 365, in create
    inp = InputMCNP(template_folder, lib)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/home/jk8173/JADE_Engine/JADE/src/jade/run/input.py", line 114, in __init__
    self.inp = MCNPInput.from_input(filepath)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/home/jk8173/JADE_Engine/jade_venv/lib/python3.11/site-packages/f4enix/input/MCNPinput.py", line 331, in from_input
    cells = cls._to_dict(cells)
            ^^^^^^^^^^^^^^^^^^^
  File "/lustre/home/jk8173/JADE_Engine/jade_venv/lib/python3.11/site-packages/f4enix/input/MCNPinput.py", line 581, in _to_dict
    card.get_values()
  File "/lustre/home/jk8173/JADE_Engine/jade_venv/lib/python3.11/site-packages/numjuggler/parser.py", line 341, in get_values
    self._protect_nums()
  File "/lustre/home/jk8173/JADE_Engine/jade_venv/lib/python3.11/site-packages/numjuggler/parser.py", line 299, in _protect_nums
    if int(mat) != 0:
       ^^^^^^^^
ValueError: invalid literal for int() with base 10: '#501'

After this cell definition was condensed down to one line, the code ran without a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions