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

Click For Summary
SUMMARY

The discussion centers on troubleshooting the "Bad Trouble in Subroutine Source" error encountered in MCNP6, specifically when the user attempts to run a code that includes KCODE and KSRC. The error indicates that the source subroutine is missing, suggesting that the installation of MCNP6 may be incomplete. Additionally, the warning about the absence of tallies points to potential issues with the input file's parsing, possibly due to incorrect formatting or extraneous characters.

PREREQUISITES
  • Familiarity with MCNP6 simulation software
  • Understanding of KCODE and KSRC parameters in MCNP6
  • Knowledge of input file formatting and structure
  • Basic troubleshooting skills for software installation issues
NEXT STEPS
  • Review the MCNP6 installation guide to ensure all components are correctly installed
  • Learn about the correct formatting of input files in MCNP6
  • Investigate common causes of parsing errors in MCNP6 input files
  • Explore the use of tallies in MCNP6 and how to properly implement them
USEFUL FOR

This discussion is beneficial for nuclear engineers, researchers using MCNP6 for simulations, and anyone involved in troubleshooting MCNP6 code execution errors.

tysonman166
Messages
7
Reaction score
1
TL;DR
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
That error message sounds like your installation of MCNP6 is not complete. You might have to reinstall it.
 
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.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
6
Views
867
Replies
6
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 24 ·
Replies
24
Views
6K
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K