[MCNPX] How to run an entire folder?

  • Thread starter Thread starter Alexander Camargo
  • Start date Start date
  • Tags Tags
    Mcnp Mcnpx
Click For Summary

Discussion Overview

The discussion revolves around how to run multiple MCNPX simulation files located in a folder, particularly addressing the challenges of executing a large number of simulations efficiently. Participants explore methods for automation and file management in the context of running MCNPX simulations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant inquires about running an entire folder of MCNPX files, indicating a need for a method to handle numerous simulations.
  • Another participant expresses doubt that MCNP programs can run multiple files directly and suggests writing a batch file for automation, asking for the operating system in use.
  • A participant mentions that WORM was designed for similar use cases but does not run MCNPX or extract results, only creating input files.
  • Some participants share that they have automated their processes using tools like Notepad++ and "advanced renamer" to manage file names for their simulations.
  • There is a reference to a Python example that can edit input files, run MCNP, and extract results, suggesting a potential solution for automation.

Areas of Agreement / Disagreement

Participants generally agree that running multiple MCNPX files directly is not supported by the software, and there is a consensus on the need for automation due to the large number of simulations. However, there is no consensus on the best method to achieve this, with various suggestions and tools being proposed.

Contextual Notes

Participants mention limitations in the MCNPX software's capabilities regarding batch processing and the need for external scripts or tools to manage large-scale simulations effectively.

Who May Find This Useful

This discussion may be useful for users of MCNPX who are looking to automate the running of multiple simulation files, particularly those dealing with large datasets or requiring batch processing solutions.

Alexander Camargo
Messages
37
Reaction score
10
I know that "mcnpx n=filename" I run the file, but how do I run the entire folder with the entries inside?
 
Engineering news on Phys.org
I don't *think* any of the mcnp programs will do that. It's fairly trivial to write a batch file, either for windows or linux to do the job and clean up the run files. Which OS?
 
Alex A said:
I don't *think* any of the mcnp programs will do that. It's fairly trivial to write a batch file, either for windows or linux to do the job and clean up the run files. Which OS?

Hi, thanks for replying. That was the conclusion I came to. I wanted the method I mentioned because I have more than 12 thousand simulations to do. I renamed them all and used the same batch method.
 
That is the kind of use case WORM was created for, but it doesn't run mcnp/x or extract the results, it just creates the input files. I found some example stuff in python that will edit an input file, run mcnp, in this case 6 and extract the result here - https://www.justanswer.com/computer-programming/gfgmq-again-thank-again-excellent-help-think.html
If you have 12k problems, maybe this is worth automating at this level.
 
Alex A said:
That is the kind of use case WORM was created for, but it doesn't run mcnp/x or extract the results, it just creates the input files. I found some example stuff in python that will edit an input file, run mcnp, in this case 6 and extract the result here - https://www.justanswer.com/computer-programming/gfgmq-again-thank-again-excellent-help-think.html
If you have 12k problems, maybe this is worth automating at this level.
Thanks a lot for the help. I automate my entries with notepad++ using macros and "advanced renamer" for the different names of each file. I already put the 12k input to simulate, now just wait about 100 hours. hahaha
 
  • Like
Likes   Reactions: Alex A

Similar threads

Replies
0
Views
936
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
6
Views
7K
Replies
1
Views
3K