SIGSEGV, segmentation fault occurred (with Empty log file)

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

SIGSEGV, segmentation fault occurred (with Empty log file)

#1 Unread post by ifeanyee »

Hi everyone, I am trying to setup a shallow water 2D model in idealized setting. I tried using including grid and initial condition from a netcdf file. While my compilation was mostly OK, when running the model I was greeted with an error.

Code: Select all

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
romsS              0000000000641C51  Unknown               Unknown  Unknown
romsS              0000000000640107  Unknown               Unknown  Unknown
romsS              00000000005F5AB4  Unknown               Unknown  Unknown
romsS              00000000005F58C6  Unknown               Unknown  Unknown
romsS              00000000005B95C6  Unknown               Unknown  Unknown
romsS              00000000005BE3DD  Unknown               Unknown  Unknown
libpthread.so.0    0000003C5600F7E0  Unknown               Unknown  Unknown
romsS              00000000005696B9  mod_ncparam_mp_in        1039  mod_ncparam.f90
romsS              00000000004D0D8F  read_phypar_              224  read_phypar.f90
romsS              00000000004B8A4A  inp_par_mod_mp_in          84  inp_par.f90
romsS              000000000040ADDF  roms_kernel_mod_m          86  roms_kernel.f90
romsS              000000000040A879  MAIN__                     75  master.f90
romsS              000000000040A76E  Unknown               Unknown  Unknown
libc.so.6          0000003C5581ED20  Unknown               Unknown  Unknown
romsS              000000000040A679  Unknown               Unknown  Unknown
I have followed other discussion on this SIGSEGV Segmentation fault error, But I haven't been able to resolve the issue. I check the mod_ncparam.f90 according to the traceback but I can't figure why the error occur. I was wondering if anyone has encountered this issue and found a way to solve it. I would be glad if someone can help point in direction on how to resolve this problem. I included my cpp header file as well as my .in file to see my simple setup.

Thanks
Attachments
myshallow.log
(281 Bytes) Downloaded 126 times
shallow2d.h
(631 Bytes) Downloaded 122 times
roms_shallow2d.in
(154.75 KiB) Downloaded 107 times

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

#2 Unread post by jcwarner »

take a look at the file Build/mod_ncparam.f90 at line 1039 and see what it is looking for.

romsS 00000000005696B9 mod_ncparam_mp_in 1039 mod_ncparam.f90

ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

#3 Unread post by ifeanyee »

Hi John,
I checked the line 1039 of mod_ncparams.f90. I seemed like a loop through the state variables:

Code: Select all

!  Set IDs for state some state variables.
!
      ic=5
      DO i=1,MT
        ic=ic+1
        isTvar(i)=ic
      END DO
      isWvel=ic+1
I'm not thoroughly sure why such error occur given that I did get to tamper with the mod_ncparams file and my setup seems simple enough. Btw, I'm a beginner with ROMS so I might be missing something.

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

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

#4 Unread post by wilkin »

Your shallow2d.h file has almost nothing in it. I'm not sure what you're going to get for default options on so many aspects of the code.

Your roms_shallow.in is based of the upwelling example. Did you manage to run the upwelling test case successfully?

If so, build from that by changing the options you need to in order the approach the configuration you want.
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: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

#5 Unread post by arango »

There are 29 examples cases of idealized and realistic applications in the svn test repository of various complexity. Check :arrow: wikiROMS for how to access that repository. Then, start from one of the cases. It is what we recommend when you register as a user.

ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

#6 Unread post by ifeanyee »

Ok; I will check out the wiki link and familarize myself with some of the idealized case. I come back to this thread very soon.

Thanks

smchen
Posts: 11
Joined: Sat Mar 21, 2015 12:38 am
Location: TORI, Taiwan

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

#7 Unread post by smchen »

I have come across strange Segmentation fault error (not exactly the same as your traceback messages) and spent a LOT of time on it. Then I realized that it was just due to stack size too small. Try ulimit -s 819200

-- Shi-Ming

Post Reply