Troubleshooting MCNP6: 'Bad Trouble in Subroutine Source' & More

In summary, the conversation is about an error message that is appearing when the code is run in MCNP6. The output is showing a problem with the source subroutine and no tallies in the problem. The individual is confused because they have already included the KCODE, KSRC, and tally in their code. They have tried swapping the position of the material card, but this led to more errors. They are looking for help in finding the mistake and someone suggests that their installation of MCNP6 may not be complete. It is also mentioned that there could be a problem with parsing the input file due to odd characters or incorrect formatting.
  • #1
tysonman166
8
1
TL;DR Summary
Hi! so i kinda stuck when i tried to run my code in MCNP6 because the output keep showing me "bad trouble in subroutine source of mcrun
you need a source subroutine."
While im sure i already put my KCODE and KSRC in my code (on the picture below). Could anyone help me where i should start looking for the mistake? thank you!
Hi! so i kinda stuck when i tried to run my code in MCNP6 because the output keep showing me "bad trouble in subroutine source of mcrun
you need a source subroutine."
While I am sure i already put my KCODE and KSRC in my code (on the picture below). Could anyone help me where i should start looking for the mistake? thank you!
1656338769465.png


And this is kinda small but the output said "warning. there are no tallies in this problem." where it really got me confused since i already put the tally in there? i tried to swap the position with the material card but that leads me to more error (my material can't be read by MCNP). If anyone could help me it could be really great...

Many Thanks!
 
Engineering news on Phys.org
  • #2
That error message sounds like your installation of MCNP6 is not complete. You might have to reinstall it.
 
  • #3
This is a deep techy error. If MCNP can't find a card to specify source parameters it calls the user source routine, which by default is a dummy routine that reports an error and quits.

Most probable is something is preventing the correct parsing of the input file. This could be an odd character code in the input file, or wrong number of empty lines that separate sections.
 

1. What is MCNP6 and why is it important?

MCNP6 is a Monte Carlo N-Particle transport code used for simulating the transport of particles through matter. It is widely used in the field of nuclear engineering and physics for various applications such as radiation shielding, reactor design, and medical physics.

2. What does the error message "Bad Trouble in Subroutine Source" mean?

This error message indicates that there is an issue with the source definition in the input file. It could be due to incorrect syntax, missing information, or incompatible parameters. It is important to carefully review the input file and make necessary corrections to resolve this error.

3. How can I troubleshoot the "Bad Trouble in Subroutine Source" error?

The first step is to carefully review the input file and check for any errors or missing information in the source definition. You can also try simplifying the source definition or using different parameters to see if the error persists. Additionally, consulting the MCNP6 user manual or seeking help from experienced users can also be helpful in troubleshooting this error.

4. Can other errors besides "Bad Trouble in Subroutine Source" occur in MCNP6?

Yes, there are various other errors that can occur in MCNP6 such as "Fatal Error", "Warning", "Error in Material Definition", etc. These errors can have different causes and may require different troubleshooting approaches. It is important to carefully review the error message and consult the user manual or seek help from experienced users to resolve these errors.

5. How can I prevent errors in MCNP6?

To prevent errors in MCNP6, it is important to carefully review the input file before running the simulation. Make sure all parameters are correctly defined and there are no syntax errors. It is also helpful to use the "runtpe" command to check for any potential issues before running the simulation. Additionally, regularly consulting the user manual and seeking help from experienced users can also help prevent errors in MCNP6.

Similar threads

Replies
6
Views
1K
Replies
1
Views
1K
Replies
5
Views
2K
  • Nuclear Engineering
Replies
24
Views
5K
Replies
3
Views
2K
  • Nuclear Engineering
Replies
11
Views
7K
Replies
7
Views
2K
Replies
2
Views
2K
Replies
7
Views
411
Back
Top