MCNP4C suppressing terminal/console window popping up?

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

Discussion Overview

The discussion revolves around the operation of MCNP4C, specifically addressing the issue of the MCNP terminal/console window popping up during execution when using Python to automate input file creation and running. Participants explore potential solutions and workarounds to keep the process within the Command Prompt window.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks to prevent the MCNP terminal/console from popping up after each command, expressing a desire for it to run solely in the Command Prompt.
  • Another participant suggests that it is not normal for MCNP to open a separate terminal unless explicitly requested, indicating that the issue may stem from the input file or command line options.
  • A later reply mentions that the behavior of MCNP could be version-dependent, speculating that MCNP4C might inherently open a separate terminal compared to later versions.
  • Participants discuss checking the executable type and the contents of the input file as potential troubleshooting steps.

Areas of Agreement / Disagreement

Participants express differing experiences with MCNP's behavior, with some asserting that it should run in the console while others report consistent terminal pop-ups. The discussion remains unresolved regarding whether this behavior is a version issue or related to specific input file configurations.

Contextual Notes

There are unresolved assumptions regarding the specific configurations of the input files and the exact nature of the MCNP executable being used. The discussion does not clarify whether the issue is consistent across different operating systems.

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