Register to reply

Bad Trouble Error

by NuclearEng12
Tags: error, trouble
Share this thread:
NuclearEng12
#1
Dec23-12, 09:31 PM
P: 11
I am getting an error which reads as follows:


"bad trouble in imcn in routine pass1
unexpected eof in file ****** "

I just added a sdef and nps card to my input file, so I assumed the error was with one of those.

SDEF AXS=0 0 1 ERG=D1 RAD=D2 WGT=1 TME=0 PAR=1
SI1 0 .4 .8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 5.2 5.6 6 6.4
6.8 7.2 7.6 8 8.4 8.8 9.2 9.6 10 10.4 10.8 11.2 11.6 12 12.4
12.8 13.2 13.6 14 14.4 14.8 15.2 15.6 16 16.4 16.8 17.2 17.6
18 18.4 18.8 19.2 19.6 20
SP1 0 .8718 .0320 .0181 .0145 .0121 .0113 .009 .007 .0044 .0035
.0035 .0028 .0028 .0023 .0011 .0011 .0007 .0005 .0002 .0004
.0002 .0002 .000026 .000081 .0002 .000089 .0001 .000077
.000018 .000018 .000026 0 0 .000017 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
SI2 -21 0

But I just can not figure out what is the problem. Would appreciate any suggestions.
Phys.Org News Partner Science news on Phys.org
Scientists develop 'electronic nose' for rapid detection of C. diff infection
Why plants in the office make us more productive
Tesla Motors dealing as states play factory poker
Borek
#2
Dec24-12, 02:46 AM
Admin
Borek's Avatar
P: 23,592
Without any specification of software and OS used it classifies for random thoughts thread, not technical question.
I like Serena
#3
Dec24-12, 04:50 AM
HW Helper
I like Serena's Avatar
P: 6,188
The format of your input file does not comply with what is expected by the program.
Apparently you cannot add sdef or nps to it, or at least not in the way you have done it.

To fix it, you need to use a document specifying the format of the file, if it exists.

Or contact the author of the code and ask him.

Or you would need to analyse the code that tries to read the input file.
Assuming of course that you have access to the source code.
It seems to be in some module named "imcn" that contains a routine named "pass1".
Search for the error message in the source code.
I expect the code to be fairly straight forward, so you may be able to deduce what it expects.

Astronuc
#4
Dec24-12, 09:34 AM
Admin
Astronuc's Avatar
P: 21,880
Bad Trouble Error

I'm not familiar with MCNP, but one should check one's syntax.

I believe that SI1 should be followed by an A to indicate an array.

SP1 should have the same number of entries as SI1.

SI2 needs a corresponding SP2 with the same number of entries. If SP2 is omitted, that is probably where the program encounters and unexpected EOF since it would be looking for a SP2 vector.


I nice simple reference - http://www.mne.ksu.edu/~jks/MCNPprmr.pdf


I would also urge one to annotate (write comments in) the input deck in order to explain the model and the logic behind the model (see page 30 (33 of 45 in pdf) of the document cited).
py1sl
#5
Dec31-12, 12:37 PM
P: 10
The first distribution needs equal numbers on the SI and SP cards
You need to fix the second distribution defining the radius of your source. it needs an si and sp line,

Also check you have not removed the line break between the surface cards and data cards
DEvens
#6
May7-13, 02:25 PM
P: 65
Quote Quote by NuclearEng12 View Post
I am getting an error which reads as follows:


"bad trouble in imcn in routine pass1
unexpected eof in file ****** "

I just added a sdef and nps card to my input file, so I assumed the error was with one of those.

SDEF AXS=0 0 1 ERG=D1 RAD=D2 WGT=1 TME=0 PAR=1
SI1 0 .4 .8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 5.2 5.6 6 6.4
6.8 7.2 7.6 8 8.4 8.8 9.2 9.6 10 10.4 10.8 11.2 11.6 12 12.4
12.8 13.2 13.6 14 14.4 14.8 15.2 15.6 16 16.4 16.8 17.2 17.6
18 18.4 18.8 19.2 19.6 20
SP1 0 .8718 .0320 .0181 .0145 .0121 .0113 .009 .007 .0044 .0035
.0035 .0028 .0028 .0023 .0011 .0011 .0007 .0005 .0002 .0004
.0002 .0002 .000026 .000081 .0002 .000089 .0001 .000077
.000018 .000018 .000026 0 0 .000017 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
SI2 -21 0

But I just can not figure out what is the problem. Would appreciate any suggestions.
Ok, that's odd. In the quote screen the continuation of the SI card and SP card are shown indented, but not when I read your post directly. And when I preview there are no leading blanks either. PF has some quirks.

When your SDEF uses ERG=D1, then you add cards to provide the information. Those cards are cards, not continuations of the SDEF. You hook them up through the number, D1 goes with SI1 and SP1. You don't hook them up with indenting.

So in the first two lines

SDEF AXS=0 0 1 ERG=D1 RAD=D2 WGT=1 TME=0 PAR=1
__________SI1 0 .4 .8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 5.2 5

I put in _ characters indicating the leading blanks I found. Don't use _ in MCNP, use blank.

You have blank characters in front of SI1. The first line of the SI1 card does not get indented. It's a card. The extra lines of the SI1 card get indented. (With spaces, not a tab. Don't use the tab character.) MCNP probably thinks the various SI and SP cards are part of the SDEF card. (Indenting 5 or more spaces indicates a continuation of a card.)

So it's looking for the SI and SP cards to match ERG=D1 and RAD=D2, and does not find them before the end of the file, because it has not parsed the entire (incorrect) SDEF card yet.

Other than that, round up the usual suspects:

Cells then surfaces then data, exactly one blank line between.

No tab characters.

Look to your line lengths, nothing longer than 72 characters.

Number of entries in SI1 and SP1 have to agree.

Hope this helps.
Dan
flpojken
#7
May8-13, 09:26 AM
P: 8
I concur with evrything the previous writer said with one important addition.

If there is an continuation to a previuos card you cannot have a digit within the first 5 spaces of the new line. MCNP then interprets this as a new card. Just an important note to think of when writing your input deck.


Register to reply

Related Discussions
Run time error M6201:MATH-log domain error Engineering, Comp Sci, & Technology Homework 6
Having trouble with error propagation General Math 0
How do you count Uncertainty Measurement using Precision Error and Bias Error? Engineering, Comp Sci, & Technology Homework 0
Measurement error analyses, fitting min/max slopes to data with error bars. Set Theory, Logic, Probability, Statistics 2
Having trouble with Standard Error of the Mean Introductory Physics Homework 1