MCNP4C suppressing terminal/console window popping up?

  • Thread starter Thread starter cpa09gp
  • Start date Start date
  • Tags Tags
    Mcnp Window
Click For Summary
SUMMARY

The discussion centers on the issue of the MCNP4C software opening a separate terminal window when executing commands, which the user wishes to suppress. The user is attempting to automate MCNP input file creation and execution using Python but encounters unwanted console pop-ups. Suggestions include verifying that MCNP is the executable and not a batch file, checking the input file contents, and renaming the input file to 'inp' before running the command 'mcnp'. The conversation also raises the possibility that this behavior may be version-specific, with later versions of MCNP potentially handling execution differently.

PREREQUISITES
  • Familiarity with MCNP4C software
  • Basic understanding of Python scripting
  • Knowledge of command line operations in Windows
  • Experience with input file configurations for MCNP
NEXT STEPS
  • Investigate MCNP4C command line options for suppressing terminal windows
  • Explore Python libraries for automating command line processes
  • Research differences between MCNP4C and later versions regarding terminal behavior
  • Examine input file structure and parameters that may influence console output
USEFUL FOR

This discussion is beneficial for computational physicists, nuclear engineers, and researchers using MCNP for criticality safety analysis who are looking to streamline their workflow by minimizing console interruptions.

cpa09gp
Messages
2
Reaction score
0
TL;DR
Query regarding how to prevent the MCNP terminal/console from popping up after executing an MCNP command in Command Prompt
Hi all,

I am working on some criticality problems using MCNP4C. A key aspect of what I am attempting to do is to use Python to automate the creation and running of MCNP input files.

One of the issues so far is that after each command entered into the Command Prompt window, the MCNP terminal/console will pop up (as expected). I would like to prevent this from happening, with MCNP running purely in the Command Prompt window.

Is this possible to do in MCNP4C? If so, how do I go about it?

So far I have attempted using the following (with no success - they appear to do nothing different to omitting them):
  • NOTEK, as in e.g. "mcnp ixr i=inp1 NOTEK"; and
  • start/wait, as in e.g. "start/wait mcnp ixr i=inp1"
It's possible that a work-around could be to use Python to detect an opened window (in this case the MCNP terminal/console) and close it automatically, but that would likely mean that I can't use my computer whilst MCNP runs in the background, which would slow me down a lot.

Any and all info/suggestions would be gratefully received!
 
Engineering news on Phys.org
Unless I am misunderstanding, this is not normal. mcnp should run only in the console unless something explicit asks for, say, a plot. This could be in the input file (I think this is possible) or on the command line. Check mcnp is the executable and not a batch file. Check the contents of the input file. Rename the input file to inp, and run with just 'mcnp'. See what happens.
 
Alex A said:
Unless I am misunderstanding, this is not normal. mcnp should run only in the console unless something explicit asks for, say, a plot. This could be in the input file (I think this is possible) or on the command line. Check mcnp is the executable and not a batch file. Check the contents of the input file. Rename the input file to inp, and run with just 'mcnp'. See what happens.
Thanks, and sorry for the delay in replying! Thanks for the suggestions - I have checked/tried them all and the file still opens windows as described.

For me MCNP has always opened a separate terminal, regardless of whether I was working on a shielding or criticality problem. It would then open another window/terminal on top if I had requested it to do something graphical like create a plot.

Is it possible that this is just an MCNP version issue, i.e. with 4C it opens a separate terminal and with later versions it does everything within the console?
 
What OS are you in and what happens if your input file is just called 'inp' and you just run the command 'mcnp' with nothing else?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
5K
Replies
3
Views
2K
Replies
3
Views
11K
  • · Replies 18 ·
Replies
18
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
8K
Replies
1
Views
2K
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K