Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Wed Jun 19, 2019 5:48 am




Post new topic Reply to topic  [ 5 posts ] 

All times are UTC

Author Message
PostPosted: Tue May 29, 2018 8:58 pm 
Offline

Joined: Thu Mar 29, 2018 5:03 pm
Posts: 13
Location: Stony Brook University
Hi,

I was compiling an application on ROMS. And when I was running oceanG and *.in file, I met with following error

Program received signal 11 (SIGSEGV): Segmentation fault.

Backtrace for this error:
+ /lib64/libc.so.6() [0x3d21432510]
+ function load_i_ (0x4341A5)
at line 1026 of file inp_par.f90
+ function read_phypar_ (0x456ED8)
at line 214 of file read_phypar.f90
+ function inp_par_ (0x40C8A1)
at line 67 of file inp_par.f90
+ function __ocean_control_mod_MOD_roms_initialize (0x4035F3)
at line 75 of file ocean_control.f90
+ in the main program
at line 81 of file master.f90
+ /lib64/libc.so.6(__libc_start_main+0xfd) [0x3d2141ed1d]

Does anybody know what are these about? I'm trying to figure them out but the progress is slow.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 30, 2018 6:02 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3601
Location: IMS/UAF, USA
The place to look is here:
Quote:
at line 214 of file read_phypar.f90
This file should be in your $SCRATCH_DIR. What is on that line?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 30, 2018 2:34 pm 
Offline

Joined: Thu Mar 29, 2018 5:03 pm
Posts: 13
Location: Stony Brook University
kate wrote:
The place to look is here:
Quote:
at line 214 of file read_phypar.f90
This file should be in your $SCRATCH_DIR. What is on that line?


Below is the related program. Line 214 is marked red.

! Read in physical model parameters. Then, load input data into module.
! Take into account nested grid configurations.
!-----------------------------------------------------------------------
!
DO WHILE (.TRUE.)
READ (inp,'(a)',ERR=10,END=20) line
status=decode_line(line, KeyWord, Nval, Cval, Rval)
IF (status.gt.0) THEN
SELECT CASE (TRIM(KeyWord))
CASE ('TITLE')
IF (Nval.eq.1) THEN
title=TRIM(ADJUSTL(Cval(Nval)))
ELSE
WRITE(title,'(a,1x,a)') TRIM(ADJUSTL(title)), &
& TRIM(ADJUSTL(Cval(Nval)))
END IF
CASE ('MyAppCPP')
DO i=1,LEN(MyAppCPP)
MyAppCPP(i:i)=blank
END DO
MyAppCPP=TRIM(ADJUSTL(Cval(Nval)))
CASE ('VARNAME')
DO i=1,LEN(varname)
varname(i:i)=blank
END DO
varname=TRIM(ADJUSTL(Cval(Nval)))
CASE ('Ngrids')
Npts=load_i(Nval, Rval, 1, Ivalue)
Ngrids=Ivalue(1)
IF (Ngrids.le.0) THEN
IF (Master) WRITE (out,290) 'Ngrids', Ngrids, &
& 'must be greater than zero.'
exit_flag=5
RETURN
END IF
got_Ngrids=.TRUE.
CALL allocate_param ! Start allocating variables in
CALL allocate_parallel ! modules that solely depend on
CALL allocate_iounits ! the number of nested grids
CALL allocate_stepping
IF (.not.allocated(Ldiag)) THEN
allocate ( Ldiag(Ngrids) )
END IF
IF (.not.allocated(Nfiles)) THEN
allocate ( Nfiles(Ngrids) )
Nfiles(1:Ngrids)=0
END IF
CASE ('NestLayers')
Npts=load_i(Nval, Rval, 1, Ivalue)
NestLayers=Ivalue(1)
IF (NestLayers.lt.1) THEN
IF (Master) WRITE (out,290) 'NestLayers', NestLayers, &
& 'must be greater or equal than one.'
exit_flag=5
RETURN
END IF
IF (NestLayers.gt.1) THEN
IF (Master) WRITE (out,290) 'NestLayers', NestLayers, &
& 'must be equal to one in non-nesting applications.'
exit_flag=5
RETURN
END IF
got_NestLayers=.TRUE.
IF (.not.allocated(GridsInLayer)) THEN
allocate ( GridsInLayer(NestLayers) )
GridsInLayer(1:NestLayers)=1
END IF
IF (.not.allocated(GridNumber)) THEN
allocate ( GridNumber(Ngrids,NestLayers) )
GridNumber(1:Ngrids,1:NestLayers)=0 ! Important
END IF
CASE ('GridsInLayer')
IF (.not.got_NestLayers) THEN
IF (Master) WRITE (out,320) 'NestLayers', &
& 'Add "NestLayers" keyword before GridsInLayer.'
exit_flag=5
RETURN
END IF
Npts=load_i(Nval, Rval, NestLayers, GridsInLayer)
ng=0
DO nl=1,NestLayers
DO i=1,GridsInLayer(nl)
ng=ng+1 ! order of grids are very in
GridNumber(i,nl)=ng ! nesting applications. See
END DO ! WikiROMS for details.
END DO
CASE ('Lm')
IF (.not.got_Ngrids) THEN
IF (Master) WRITE (out,320) 'Ngrids', &
& 'Add "Ngrids" keyword before grid dimension (Lm, Mm).'
exit_flag=5
RETURN
END IF
Npts=load_i(Nval, Rval, Ngrids, Lm)
DO ng=1,Ngrids
IF (Lm(ng).le.0) THEN
IF (Master) WRITE (out,300) 'Lm', ng, &
& 'must be greater than zero.'
exit_flag=5
RETURN
END IF
END DO
CASE ('Mm')
Npts=load_i(Nval, Rval, Ngrids, Mm)
DO ng=1,Ngrids
IF (Mm(ng).le.0) THEN
IF (Master) WRITE (out,300) 'Mm', ng, &
& 'must be greater than zero.'
exit_flag=5
RETURN
END IF
END DO
CASE ('N')
Npts=load_i(Nval, Rval, Ngrids, N)
DO ng=1,Ngrids
IF (N(ng).lt.0) THEN
IF (Master) WRITE (out,300) 'N', ng, &
& 'must be greater than zero.'
exit_flag=5
RETURN
END IF
END DO
CASE ('NAT')
Npts=load_i(Nval, Rval, 1, Ivalue)
NAT=Ivalue(1)
IF ((NAT.lt.1).or.(NAT.gt.2)) THEN
IF (Master) WRITE (out,290) 'NAT = ', NAT, &
& 'make sure that NAT is either 1 or 2.'
exit_flag=5
RETURN
END IF
IF (NAT.ne.2) THEN
IF (Master) WRITE (out,290) 'NAT = ', NAT, &
& 'make sure that NAT is equal to 2.'
exit_flag=5
RETURN
END IF
CASE ('NtileI')
Npts=load_i(Nval, Rval, Ngrids, NtileI)
NtileX(1:Ngrids)=NtileI(1:Ngrids)
CASE ('NtileJ')
Npts=load_i(Nval, Rval, Ngrids, NtileJ)
NtileE(1:Ngrids)=NtileJ(1:Ngrids)


Top
 Profile  
Reply with quote  
PostPosted: Wed May 30, 2018 5:09 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3601
Location: IMS/UAF, USA
So this code is reading NtileI from the ocean_xxx.in file. Did you switch so that NtileJ comes before NtileI in the ocean.in file? This is forbidden. Or is something else screwy in your ocean.in file? That's what you need to check next.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 30, 2018 6:26 pm 
Offline

Joined: Thu Mar 29, 2018 5:03 pm
Posts: 13
Location: Stony Brook University
kate wrote:
So this code is reading NtileI from the ocean_xxx.in file. Did you switch so that NtileJ comes before NtileI in the ocean.in file? This is forbidden. Or is something else screwy in your ocean.in file? That's what you need to check next.


Thanks, kate. I'll check my ocean.in file.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group