MCNP4C suppressing terminal/console window popping up?

  • #1
cpa09gp
2
0
TL;DR Summary
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
  • #2
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.
 
  • #3
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?
 
  • #4
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?
 
Back
Top