Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] - ADD keyword RMODE0 to mcnp benchmarks #313

Closed
dodu94 opened this issue Aug 8, 2024 · 0 comments · Fixed by #316
Closed

[Feature request] - ADD keyword RMODE0 to mcnp benchmarks #313

dodu94 opened this issue Aug 8, 2024 · 0 comments · Fixed by #316
Assignees
Labels
enhancement New feature or request

Comments

@dodu94
Copy link
Member

dodu94 commented Aug 8, 2024

Is your feature request related to a problem? Please describe.
When running in clusters it may be useful to run the benchmarks with the prompt version of D1SUNED which is faster with respect to vanilla MCNP. In order to do so, inputs need to have the RMODE 0 keyword in them

Describe the solution you'd like
Currently I have been using the following script to perform this operation, but it would be nicer to add it as an utility in JADE:

import os
root = r'R:\AC_ResultsDB\Jade\04_JADE_latest_root\Benchmarks_Inputs - Copy'

# walk trough the root tree, when mcnp folder is found, the RMODE 0 line has
# to be added to the input file
for dirpath, dirnames, filenames in os.walk(root):
    if 'mcnp' in dirnames:
        mcnp_dir = os.path.join(dirpath, 'mcnp')
        for filename in os.listdir(mcnp_dir):
            filepath = os.path.join(mcnp_dir, filename)
            with open(filepath, 'r') as f:
                lines = f.readlines()
            flag_no_rmode = True
            with open(filepath, 'w') as f:
                for line in lines:
                    f.write(line)
                    if 'RMODE' in line:
                        flag_no_rmode = False
                if flag_no_rmode:
                    f.write('RMODE 0\n')
@dodu94 dodu94 added the enhancement New feature or request label Aug 8, 2024
@dodu94 dodu94 self-assigned this Aug 8, 2024
@dodu94 dodu94 added this to v3.3.0 Aug 8, 2024
@dodu94 dodu94 linked a pull request Aug 9, 2024 that will close this issue
18 tasks
@dodu94 dodu94 closed this as completed Oct 4, 2024
@github-project-automation github-project-automation bot moved this to Done in v3.3.0 Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant