Segmentation fault with floats

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
lalvarez
Posts: 100
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Segmentation fault with floats

#1 Post by lalvarez » Wed May 08, 2019 3:46 pm

Hello to All

I had a problem with the floats in my run, it is a short time 40 days and a release floats 10, 15 and 20 days after the model starts, here is what I got. The total number of floats are 8400.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 #0 0x7FE2D7CC7777
0x7FE2D7CC7777
#1 0x7FE2D7CC7D7E
#1 0x7FE2D7CC7D7E
#2 0x7FE2D6F8AD3F
#2 0x7FE2D6F8AD3F
#3 #3 0x51E10E in __interp_floats_mod_MOD_interp_floats
0x51E10E in __interp_floats_mod_MOD_interp_floats
#4 #4 0x4B4B2D in __step_floats_mod_MOD_step_floats_tile at 0x4B4B2D in __step_floats_mod_MOD_step_floats_tile at step_floats.f90:?
step_floats.f90:?
#5 #5 0x4B9164 in __step_floats_mod_MOD_step_floats0x4B9164 in __step_floats_mod_MOD_step_floats

#6 #6 0x44D832 in main3d_0x44D832 in main3d_

#7 0x7FE2D753F349
#8 0x7FE2D7321181
#7 0x407089 in __ocean_control_mod_MOD_roms_run
#9 0x7FE2D704E47C
#10 0xFFFFFFFFFFFFFFFF
Violación de segmento



Can anyone give a hand on this
Thanks in advance

User avatar
kate
Posts: 3683
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: Segmentation fault with floats

#2 Post by kate » Wed May 08, 2019 3:53 pm

The first step is to recompile in USE_DEBUG mode. The resulting output should look similar but include line numbers for the .f90 files. You then need to look at the appropriate .f90 file and see what is at that line. Next would be to perhaps add print statements around there to see what is in the relevant variables.

lalvarez
Posts: 100
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Segmentation fault with floats

#3 Post by lalvarez » Sat May 11, 2019 6:23 pm

Hello Kate

Thanks a lot for your ASAP answer, I'm working on it

Have a nice day

User avatar
wilkin
Posts: 506
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Segmentation fault with floats

#4 Post by wilkin » Sun May 12, 2019 1:06 pm

When does the seg fault occur?

At model initialization, at first float release, or midway in the run?
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
arango
Site Admin
Posts: 1081
Joined: Wed Feb 26, 2003 4:41 pm
Location: IMCS, Rutgers University
Contact:

Re: Segmentation fault with floats

#5 Post by arango » Sun May 12, 2019 1:44 pm

Segmentation violations (SIGSEGV) are usually a sign of memory problems on the computer and available stack for the run. Perhaps, your computer doesn't have too much memory for your application, and you are deploying too many floats for it. I will try to run without floats to see if it works. Then add floats but put a few.

lalvarez
Posts: 100
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Segmentation fault with floats

#6 Post by lalvarez » Mon May 13, 2019 2:39 pm

Hello Hernan

Actually the model runs ok until the day it has to deploy the floats, I'll try to set fewer floats I guess that's my problem

Thank alot

User avatar
kate
Posts: 3683
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: Segmentation fault with floats

#7 Post by kate » Mon May 13, 2019 2:52 pm

I suspect that the problem is not the number of floats but something else. The way to debug these things is to save a restart record at the time of the first float release, or just before. Then do your tests in a restart run so that it blows up right away and you're not running forever in debug mode.

Post Reply