Forrtl: severe <157> : program exception -access violation MCNP6

In summary: Yes, debugging is necessary. Is there a specific line in the code where the error is happening? How do you want to debug it?In summary, the code is trying to read from a memory location that it should not be reading from, and an argument of a subroutine call is not right.
  • #1
khary23
93
6
Hello all,

Starting yesterday I have been intermittently getting a " forrtl: severe <157> : program exception -access violation" and my runs stopping . Does anyone have any ideas as to what could be causing this ?

I have attached a screen shot of the entire error message

thanks
 

Attachments

  • Screenshot (4).png
    Screenshot (4).png
    4.7 KB · Views: 624
Engineering news on Phys.org
  • #2
I wanted to add that now when I try to run anything I get
'MNCP' is not a reconized internal or external command, operable program or batch file.
 
  • #3
khary23 said:
I wanted to add that now when I try to run anything I get
'MNCP' is not a reconized internal or external command, operable program or batch file.
Have you tried searching in edit:Stack Overflow? They keep track of a large number and variety of error messages.
 
Last edited:
  • #4
khary23 said:
Starting yesterday I have been intermittently getting a " forrtl: severe <157> : program exception -access violation" and my runs stopping . Does anyone have any ideas as to what could be causing this ?
khary23 said:
I have attached a screen shot of the entire error message
You haven't provided much information for us to go on. From the cryptic error message, my guess is that it is short for Fortran Run-time library. Here's a link to a stack exchange question about this error - https://stackoverflow.com/questions/13391267/forrtl-severe-157-program-exception-access-violation

Does your problem stem from a program you wrote? If so, the program could be trying to read from or write to a memory location that it should not be using. Or, an argument of a subroutine call isn't right. If this error comes from some code you wrote, show us the code, especially the part that is generating this error.
 
  • Like
Likes Klystron
  • #5
khary23 said:
'MNCP' is not a reconized internal or external command, operable program or batch file.
You have to spell it correctly. In your thread title you have MCNP6 (Monte Carlo N-Particle Transport Code)
 
  • #6
The title is correct. MCNP6
 
  • #7
Mark44 said:
You haven't provided much information for us to go on. From the cryptic error message, my guess is that it is short for Fortran Run-time library. Here's a link to a stack exchange question about this error - https://stackoverflow.com/questions/13391267/forrtl-severe-157-program-exception-access-violation

Does your problem stem from a program you wrote? If so, the program could be trying to read from or write to a memory location that it should not be using. Or, an argument of a subroutine call isn't right. If this error comes from some code you wrote, show us the code, especially the part that is generating this error.

I tried another simpler code with the same result. I think I will back up my codes and reinstall
 
  • #8
khary23 said:
The title is correct. MCNP6
Right, but you're apparently typing MNCP. From post #2:
khary23 said:
'MNCP' is not a reconized internal or external command, operable program or batch file.
 
  • #9
Mark44 said:
Right, but you're apparently typing MNCP. From post #2:

When I ran the code I double checked that it was typed correctly as that was my first thought when it didn't run.
 
  • #10
khary23 said:
When I ran the code I double checked that it was typed correctly as that was my first thought when it didn't run.
I was just going by what you wrote in post #2.

Based on the output you included as a screen shot, the last line of output was this:
Code:
cp0 = 0.02

So the exception comes after this point in the code.

Is this code you wrote, and hence have access to the source, or is it just some program you are running? I asked this back in post #4, but you didn't respond to that question.

If this is your code, it looks like some debugging is in order.
 
  • Like
Likes jim mcnamara
  • #11
Mark44 said:
You haven't provided much information for us to go on. From the cryptic error message, my guess is that it is short for Fortran Run-time library. Here's a link to a stack exchange question about this error - https://stackoverflow.com/questions/13391267/forrtl-severe-157-program-exception-access-violation

Does your problem stem from a program you wrote? If so, the program could be trying to read from or write to a memory location that it should not be using. Or, an argument of a subroutine call isn't right. If this error comes from some code you wrote, show us the code, especially the part that is generating this error.

yes it is a program I wrote. I do not think that it is the program because it was running fine until Friday , unless something was inadvertently changed that I did not catch.
 
  • #12
Mark44 said:
I was just going by what you wrote in post #2.

Based on the output you included as a screen shot, the last line of output was this:
Code:
cp0 = 0.02

So the exception comes after this point in the code.

Is this code you wrote, and hence have access to the source, or is it just some program you are running? I asked this back in post #4, but you didn't respond to that question.

If this is your code, it looks like some debugging is in order.

How do I find where the cp0=0.02 point is ? I ask because I am new to MCNP and do not know what cp0 even means.
 
  • #13
khary23 said:
yes it is a program I wrote.
khary23 said:
How do I find where the cp0=0.02 point is ?
Is there somewhere in your code where it displays a value for cp0? It would help if you included the code you wrote.
 
  • #14
The screen shot you uploaded in post #1 has this information:
Code:
warning. material      4 has been set to a conductor.

ctm =  0.00  nrn = 0
dump   1 on file runtpi   nps = 0        coll = 0
xact   is done

cp0 = 0.02
forrtl: severe (157): Program Exception - access violation
This information is followed by a list of DLLS, that might be a stack trace.

The last line above before the exception gives a value for cp0, but the first line, which mentions material 4, whatever that is, could be the start of the problem.

Again, show us the code you wrote, and maybe we can figure out where things are going wrong.
 
  • #15
Mark44 said:
The screen shot you uploaded in post #1 has this information:
Code:
warning. material      4 has been set to a conductor.

ctm =  0.00  nrn = 0
dump   1 on file runtpi   nps = 0        coll = 0
xact   is done

cp0 = 0.02
forrtl: severe (157): Program Exception - access violation
This information is followed by a list of DLLS, that might be a stack trace.

The last line above before the exception gives a value for cp0, but the first line, which mentions material 4, whatever that is, could be the start of the problem.

Again, show us the code you wrote, and maybe we can figure out where things are going wrong.
I searched through the file by eye and with EmEditor, but did not find a cp0=0.02. What I did find was that at the start of a run with a simple code, that I know works, one of the cp0= 0.01 was printed underneath ctm etc. So I don't think the 0.02 was the issue.
I have attached the code if you have time to look over it.
 

Attachments

  • FMESH_RDF.txt
    4 KB · Views: 371
  • #16
Caveat: I've never used MCNP. Everything I know about it has come from looking at some documentation about the input files.

The first warning on your screen shot in post #1 refers to material 4, so I looked at the input file you posted, in the material card section.

In your input file, in the materials card, you have same materials listed in M3 and M4, which looks to me like it's a mistake. M3 and M4 both list manganese, silicon, chromium, nickel, and iron.

There's what I believe is a comment (a line starting with C) that lists oxygen and hydrogen, with what appear to be incorrect fractional amounts of about 89% and about 11%. If this is supposed to be water, the fractions should be -0.333 and -0.667 for oxygen and hydrogen, respectively.

Should what you have as m4 really be what you have in the commented line referring to M3?
C Define Materials
C Ir-192
M1 077192 1
M2 6000 -0.00012 7000 -0.75527 8000 -0.23178 18000 -0.01283 GAS=1
C Stainless Steel
M3 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68 <--- same
C M3 8000 -0.888 1000 -.112
m4 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68 <--- same
 
  • #17
The path in your original error screen cap seems to indicate Windows. I have tried to run your input on my desktop install and it finishes with no weird error messages.

If you get " 'MNCP' is not a reconized " or similar error, you need to check spelling and paths and so on. You have spelled MCNP wrong, left off the 6, and even mis-spelled recognized. If you really did spell it correctly, then be sure you have run the correct bat file before starting. On my Windows install I have a special shortcut that runs the setup bat and leaves a DOS window open for work.

Then check that you actually have got MCNP installed on your system. Check that the installation test bat file will run, for example.

When you get weird error messages like the dreaded "severe exception" kind of thing, you need to round up the usual suspects. This is what happens when MCNP realizes it is in trouble, but is not smart enough to get itself out.

First check you have enough disk space. And that you have the appropriate permissions to read/write/execute everything. You can check that last pretty easily by making a bat file that copies a text file to a new file and running it in the dir you are working in. Also, take a look at the task manager and see how much memory is being used when you run. Have you got enough memory?

Then look to your input file. Did MCNP produce any kind of output file? If MCNP won't produce any useful error messages, you may have to fall back on "brute force" debugging. Make a debug copy of everything and start hacking. Remove about half the input file and see if the error goes away. And so on.

Sometimes the plotter will be useful. Have you got VisEd installed? Though often it is just a big frustration device.
 
  • #18
Mark44 said:
Caveat: I've never used MCNP. Everything I know about it has come from looking at some documentation about the input files.

The first warning on your screen shot in post #1 refers to material 4, so I looked at the input file you posted, in the material card section.

In your input file, in the materials card, you have same materials listed in M3 and M4, which looks to me like it's a mistake. M3 and M4 both list manganese, silicon, chromium, nickel, and iron.

There's what I believe is a comment (a line starting with C) that lists oxygen and hydrogen, with what appear to be incorrect fractional amounts of about 89% and about 11%. If this is supposed to be water, the fractions should be -0.333 and -0.667 for oxygen and hydrogen, respectively.

Should what you have as m4 really be what you have in the commented line referring to M3?

They are the same material

Wow! How did I not catch that, thank you! The problem still persisted
 
  • #19
Well I reinstalled MCNP6 and it is now running fine, though my results are not what
I expect.
 
  • #20
This is what I copied from the file you uploaded:
C Define Materials
C Ir-192
M1 077192 1
M2 6000 -0.00012 7000 -0.75527 8000 -0.23178 18000 -0.01283 GAS=1
C Stainless Steel
M3 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68 <--- same
C M3 8000 -0.888 1000 -.112
m4 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68 <--- same

Should it be like this instead:
Code:
C Define Materials
C Ir-192
M1 077192 1
M2 6000 -0.00012 7000 -0.75527 8000 -0.23178 18000 -0.01283 GAS=1
C Stainless Steel
M3 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68 
C Water ??
M4 8000 -0.888 1000 -.112
Again, the fractional amounts of oxygen and hydrogen don't seem right to me, with twice as many hydrogen atoms as oxygen atoms.
 
  • #21
Mark44 said:
This is what I copied from the file you uploaded:Should it be like this instead:
Code:
C Define Materials
C Ir-192
M1 077192 1
M2 6000 -0.00012 7000 -0.75527 8000 -0.23178 18000 -0.01283 GAS=1
C Stainless Steel
M3 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68
C Water ??
M4 8000 -0.888 1000 -.112
Again, the fractional amounts of oxygen and hydrogen don't seem right to me, with twice as many hydrogen atoms as oxygen atoms.

In this code it is the mass fraction of water with oxygen composing of 88.8% of the mass and hydrogen 11.2%.
There are twice as many hydrogen atoms, but they have a mass of only 1.00784 u compared to oxygen at~ 16.0 u
 
Last edited:
  • #22
OK, but my main point was that you had the same materials for both M3 and M4, and there was no materials card for water.
 
  • #23
The water card is commented out as the DE/Df cards convert the energy deposited to dose to water. Thank you for catching the M3/M4 mistake.
 
  • #24
Okay so the reinstall did not fix it. I checked the memory and cpu usage and I have more than enough memory and the run is using 17% of the cpu.
I also wanted to add that initial plot (ip) works and a window opens that shows problem and tally geometry.
 
  • #25
khary23 said:
The water card is commented out as the DE/Df cards convert the energy deposited to dose to water.
What does "to dose to water" mean? Is this a typo?

In post #11 you wrote
yes it is a program I wrote.
Actually you wrote a script that was the input to the program, MCNP6, just to clear up that misconception on your part.
khary23 said:
Okay so the reinstall did not fix it. I checked the memory and cpu usage and I have more than enough memory and the run is using 17% of the cpu.
17% of CPU may or may not be excessive. I'm not familiar with the program, but I'm reasonably sure the program is doing a huge number of floating point calculations.
khary23 said:
I also wanted to add that initial plot (ip) works and a window opens that shows problem and tally geometry.
What is the program not doing that you believe it should be doing? Are the results it's producing near to or far from what it should be getting?
 
  • #26
Mark44 said:
What does "to dose to water" mean? Is this a typo?In post #11 you wrote

Actually you wrote a script that was the input to the program, MCNP6, just to clear up that misconception on your part.
17% of CPU may or may not be excessive. I'm not familiar with the program, but I'm reasonably sure the program is doing a huge number of floating point calculations.
What is the program not doing that you believe it should be doing? Are the results it's producing near to or far from what it should be getting?
Sorry should be have written absorbed dose.

The issue I am having is that I am once again getting the forrl:<severe> program exception error.
 
  • #27
Can you post the input file you got the error from? Can you also post the exact command line you used to run it? Copy-paste is good.

Did you get any output file at all?
 
  • Like
Likes Mark44
  • #28
DEvens said:
Can you post the input file you got the error from? Can you also post the exact command line you used to run it? Copy-paste is good.

Did you get any output file at all?
the input file is attached. The command line is "mcnp6 in= FMESH_RDF.txt
I get an incomplete output file and no meshtal file.
 
  • #29
Here is the input file.
 

Attachments

  • FMESH_RDF.txt
    4 KB · Views: 241
  • #30
Update: My code has been run on MCNP 6.2 by other MCNP users and it ran, but will sstill not run on my version which is 6.1.
 
  • #31
MCNP, you are a thing.

If I run your case on MCNP6.1 I get Windows telling me MCNP has stopped working.

If I use a smaller NPS number, say 400000 instead of 1000000, then it runs to completion.
If I take out the DE4-DF4 data, it runs to completion.

I'm thinking a bug in version 6.1, some kind of memory overflow that only shows up when you reach some kind of limit in FMESH.

Is it an option to step up to version 6.2?
 
  • #32
DEvens said:
MCNP, you are a thing.

If I run your case on MCNP6.1 I get Windows telling me MCNP has stopped working.

If I use a smaller NPS number, say 400000 instead of 1000000, then it runs to completion.
If I take out the DE4-DF4 data, it runs to completion.

I'm thinking a bug in version 6.1, some kind of memory overflow that only shows up when you reach some kind of limit in FMESH.

Is it an option to step up to version 6.2?

I submitted a request for 6.2 last night, but I need to get my data in the next week so that I can write and be finished by January. The confusing thing is that it was running up until Friday.
 
  • #33
Hi
I thing the bug only appears why you try to use a x-windows no ?
 
  • #34
PSRB191921 said:
Hi
I thing the bug only appears why you try to use a x-windows no ?

Using MSWindows here. It hangs.
 
  • #35
PSRB191921 said:
Hi
I thing the bug only appears why you try to use a x-windows no ?

No regular Windows 10
 
  • Like
Likes DEvens

Similar threads

  • Nuclear Engineering
Replies
5
Views
2K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
19
Views
1K
  • Programming and Computer Science
Replies
9
Views
15K
  • Programming and Computer Science
Replies
6
Views
3K
  • Biology and Medical
Replies
5
Views
3K
  • Computing and Technology
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
3K
  • Programming and Computer Science
Replies
2
Views
5K
Back
Top