ROMS&SWAN coupling, Segmentation Fault

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
donghua

ROMS&SWAN coupling, Segmentation Fault

#1 Unread post by donghua »

Hello, all

I've tried to run a ROMS&SWAN coupling case. But I got the segmentation fault error. So I turned on

Code: Select all

USE_DEBUG=on
.
In the debug mode, I got the message below:

Code: Select all

SWAN grid   1 is preparing computation

0: Subscript out of range for array globalsegmap_g (waves_coupler.f90: 331)
    subscript=1, lower bound=0, upper bound=-1, dimension=1
0: Subscript out of range for array globalsegmap_g (waves_coupler.f90: 331)
    subscript=1, lower bound=0, upper bound=-1, dimension=1
0: Subscript out of range for array globalsegmap_g (waves_coupler.f90: 331)
    subscript=1, lower bound=0, upper bound=-1, dimension=1
In waves_coupler.f90 file, the 331 line is:

Code: Select all

          CALL Router_init (OCNid, GlobalSegMap_G(iw)%GSMapSWAN,        &
     &                      WAV_COMM_WORLD, Router_O(iw,ng)%SWANtoROMS)
I don't quite understand what is the problem here. Can anyone give me some clues? Thank you so much!

Donghua

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

Re: ROMS&SWAN coupling, Segmentation Fault

#2 Unread post by kate »

John Warner would say you should email him for permission to download his COAWST code, which includes SWAN, ROMS, WRF, etc.

donghua

Re: ROMS&SWAN coupling, Segmentation Fault

#3 Unread post by donghua »

Hi, Kate

Thanks for your quick reply.

I've downloaded the latest COAWST code, and tried to rerun the case.

I updated some obsolete terms. The results of the rerun case is still the same:

Code: Select all

SWAN grid   1 is preparing computation

0: Subscript out of range for array globalsegmap_g (waves_coupler.f90: 341)
    subscript=1, lower bound=0, upper bound=-1, dimension=1
0: Subscript out of range for array globalsegmap_g (waves_coupler.f90: 341)
    subscript=1, lower bound=0, upper bound=-1, dimension=1
0: Subscript out of range for array globalsegmap_g (waves_coupler.f90: 341)
    subscript=1, lower bound=0, upper bound=-1, dimension=1
Within waves_coupler.f90, line 341 is still:

Code: Select all

          CALL Router_init (OCNid, GlobalSegMap_G(iw)%GSMapSWAN,        &
     &                      WAV_COMM_WORLD, Router_O(iw,ng)%SWANtoROMS)
Any suggestion?

Thanks
Donghua

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

Re: ROMS&SWAN coupling, Segmentation Fault

#4 Unread post by jcwarner »

can you post this on
https://coawstmodel-trac.sourcerepo.com ... del_COAWST

i think i will need to see your .h file.
did you compile with nesting and not have 2 swan grids?
-j

donghua

Re: ROMS&SWAN coupling, Segmentation Fault

#5 Unread post by donghua »

Hello, John

Thank you for your reply.

I will post this problem in COAWST Discussion.
Below is my .h file:

Code: Select all

#define ROMS_MODEL
#define SWAN_MODEL
#define MCT_LIB
#define AVERAGES

#define WEC_VF
#define WDISS_WAVEMOD

#define UV_ADV
#define UV_U3HADVECTION
#define UV_C4VADVECTION
#define RADIATION_2D

#define UV_COR
#define UV_LOGDRAG

#define UV_VIS2
#define MIX_S_UV

#define TS_U3HADVECTION
#define TS_C4VADVECTION
#define DJ_GRADPS
#define TS_DIF2
#define  MIX_GEO_TS

#define SALINITY
#define SOLVE3D
#define SPLINES_VVISC
#define SPLINES_VDIFF
#define RI_SPLINES
#define MASKING
#define CURVGRID

#undef ANA_GRID
#undef ANA_INITIAL
#undef ANA_SMFLUX
#undef ANA_STFLUX
#undef ANA_SSFLUX
#define ANA_BTFLUX
#define ANA_BSFLUX
#define BULK_FLUXES
#undef ATM_PRESS
#define LONGWAVE_OUT
#define EMINUSP
#define SOLAR_SOURCE
/*
#define ADD_FSOBC
#define ADD_M2OBC
#define SSH_TIDES
#define UV_TIDES
#define RAMP_TIDES
*/
#define GLS_MIXING
#if defined GLS_MIXING || defined MY25_MIXING
# define KANTHA_CLAYSON
# define N2S2_HORAVG
#else
# define ANA_VMIX
#endif

# define ANA_BIOLOGY
# undef ANA_SPFLUX
# define ANA_BPFLUX
# undef ANA_SRFLUX


Thanks again

Donghua

donghua

Re: ROMS&SWAN coupling, Segmentation Fault

#6 Unread post by donghua »

Hi, John

The NESTING term is not turned on. There is only one grid in swan.
When I run SWAN-only or ROMS-only, both work.
But when SWAN and ROMS couple, the segmentation fault pops up.

donghua

Re: ROMS&SWAN coupling, Segmentation Fault

#7 Unread post by donghua »

Hello, all

The problem is solved!
It is simply because it has not enough memory.

Thank you Kate and John.
Thank you all.

Donghua

Post Reply