SourceForge has been redesigned. Learn more.
Close

#11 SegFault writing Matlab BLOCK with ifort

open
nobody
5
2012-05-13
2012-05-13
Hamish B
No

Hi,

I've been running the OMP version of swan.exe on Linux and have been getting SegFaults when the program is compiled with ifort. Compiling with gfortran makes it run sucessfully, but is ~40% slower.

setup:
swan 40.85
Debian/stable (squeeze) 64bit (amd64)
twin Xeon CPUs (12 real cores) + 36gb RAM
gfortran version 4.4.5
ifort (64bit) version 12.1.3

*.swn:
"""
...
$
TABLE 'COMPGRID' HEADER 'grid_xy.prn' XP YP
BLOCK 'COMPGRID' NOHEADER 'grid_maps.mat' DEP HSIGN DIR TM02 UBOT URMS DISSIP TRANSP FORCE
$
COMPUTE
STOP
"""

stdout:
"""
...
Number of threads during execution of parallel region = 12

...
iteration 9; sweep 1
+iteration 9; sweep 2
+iteration 9; sweep 3
+iteration 9; sweep 4
accuracy OK in 98.88 % of wet grid points ( 98.00 % required)

+SWAN is processing output request 1
+SWAN is processing output request 2
[Segmentation Fault]
"""

A run uses about 32GB RAM.
I tried with a whole assortment of compiler flags with the same result, starting with the defaults set up by "make config". For the backtrace below it was compiled with
FFLAGS_OPT = -g -O0 -static-intel

gdb backtrace:
$ gdb `which swan.exe` /path/to/core/file
...
(gdb) bt
#0 0x00000000005d2ee4 in swoexf (mip=2901135, xc=..., yc=..., voqr=..., voq=..., ac2=..., dep2=..., spcsig=..., wk=...,
cg=..., spcdir=..., ne=..., ned=..., kgrpnt=..., xcgrid=..., ycgrid=..., ionod=...) at swanout1.f:4747
#1 0x00000000005abab3 in swoutp (ac2=..., spcsig=..., spcdir=..., compda=..., xytst=..., kgrpnt=..., xcgrid=..., ycgrid=...,
ourqt=...) at swanout1.f:383
#2 0x000000000045c928 in swmain () at swanmain.f:657
#3 0x0000000000459fb6 in swan () at swanmain.f:122
Current language: auto
The current source language is "auto; currently fortran".

(gdb) frame 0
#0 0x00000000005d2ee4 in swoexf (mip=2901135, xc=..., yc=..., voqr=..., voq=..., ac2=..., dep2=..., spcsig=..., wk=...,
cg=..., spcdir=..., ne=..., ned=..., kgrpnt=..., xcgrid=..., ycgrid=..., ionod=...) at swanout1.f:4747
4747 CALL STRACE (IENT, 'SWOEXF')
(gdb) l
4742 !
4743 ! 13. Source text
4744 !
4745 SAVE IENT
4746 DATA IENT /0/
4747 CALL STRACE (IENT, 'SWOEXF')
4748 !
4749 IVTYPE = 20
4750 !
4751 ! --- exchange action densities at subdomain interfaces 40.31

(gdb) frame 1
#1 0x00000000005abab3 in swoutp (ac2=..., spcsig=..., spcdir=..., compda=..., xytst=..., kgrpnt=..., xcgrid=..., ycgrid=...,
ourqt=...) at swanout1.f:383
383 & CALL SWOEXF (MIP ,VOQ(1+2*MIP) , 40.31 30.90
(gdb) l
378 & COMPDA(1,JDP2) ,CROSS ) 40.86
379 !
380 ! call SWOEXF to compute wave-driven force on regular grid
381 !
382 IF (OQPROC(20) .AND. OPTG.NE.5) 40.80 40.13
383 & CALL SWOEXF (MIP ,VOQ(1+2*MIP) , 40.31 30.90
384 & VOQ(1+3*MIP) ,VOQR , 40.31 30.90
385 & VOQ(1) ,AC2 , 40.31 30.90
386 & COMPDA(1,JDP2) ,SPCSIG , 30.72
387 & KNUM ,CG , 40.31 30.90

#0 0x00000000005d2ee4 in swoexf (mip=2901135, xc=..., yc=..., voqr=..., voq=..., ac2=..., dep2=..., spcsig=..., wk=...,
cg=..., spcdir=..., ne=..., ned=..., kgrpnt=..., xcgrid=..., ycgrid=..., ionod=...) at swanout1.f:4747
ony = 90
onx = .FALSE.
jyup = 0
jylo = 2901135
jy = 90
jxup = 0
jxlo = 2901135
jx = 0
ivtype = 1835
ip = 1835
ind9 = 0
ind8 = 0
ind7 = 32767
ind6 = -325358080
ind5 = 32767
ind4 = -325358080
ind3 = 0
ind2 = 90
ind1 = 32767
ient = 0
id = 1835
cslat = 5.82760507e-10
syup = 0
sylo = 0
sxup = 4.06535602e-39
sxlo = 0
sig = 0
rrdj = 0
rrdi = 4.06535742e-39
nay = 0
nax = 0
fyadd = 0
fxadd = 0
fy = 0
fx = 4.06535742e-39
deploc = 0
dep = 4.06535742e-39
dyj = 0
dyi = 0
dxj = 0
dxi = 0
ds2 = 0
djy = 0
djx = 0
diy = 5.82760507e-10
dix = 5.82760507e-10
ddy = 0
ddx = 0
ddj = 0
ddi = 4.06535742e-39
ddet = 0
acwy = 0
acwx = 0
acwj = 0
acwi = 0
acwav = 0
is = 0
ac2loc = ()
#1 0x00000000005abab3 in swoutp (ac2=..., spcsig=..., spcdir=..., compda=..., xytst=..., kgrpnt=..., xcgrid=..., ycgrid=...,
ourqt=...) at swanout1.f:383
jj = 0
ip = 0
ii = 808464432
alpcn = 6.40969056e-10
ypcn = 6.40969056e-10
xpcn = 6.40969056e-10
myn = 808464432
mxn = 808464432
ynlen = 6.40969056e-10
xnlen = 6.40969056e-10
myk = 1835
mxk = 1581
mip = 2901135
nvoqp = 15
irq = 2
ient = 0
ptype = 'B'
pname = 'BLKDF\000\000\000'
stype = 'F'
rtype = 'BLKD'
logact = 4294967295
oqproc = (4294967295, 4294967295, .FALSE., 4294967295, .FALSE., 4294967295, 4294967295, .FALSE., .FALSE., 4294967295, .FALSE., .FALSE., 4294967295, .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., 4294967295, 4294967295, .FALSE., .FALSE., .FALSE., 4294967295, 4294967295, .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., 4294967295, .FALSE., 4294967295, .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE.)
corq = 0x5716c60
cuops = 0xae2e60
ierr = 1145785410
bkc = 2
voqr = (1, 2, 0, 5, 0, 9, 11, 0, 0, 6, 0, 0, 7, 0, 0, 0, 0, 0, 12, 14, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
force = ()
voq = ()
aux1 = ()
acloc = ()
ionod = ()
cross = ()
ned = ()
cg = ()
knum = ()
ne = ()
#2 0x000000000045c928 in swmain () at swanmain.f:657
lopen = .FALSE.
msgstr = '\000\000\000\000\230Í5\000\000\000\000\000ÿÿÿÿÿÿÿÿh\222\233ìÿ\177', '\000' <repeats 18 times>, 'h\222\233ìÿ\177\000\000P\223\233ìÿ\177\000\000\001\000\000\000\000\000\000\000`\222\233ìÿ\177\000\000\001\000\000\000'
chars = ('\005\000\000\000\000\000\000\000ð\222\233ìÿ\177\000\000\001\000\000\000')
comput = 'COMP'
il1 = 11327280
if1 = 32534
istat = 0
inerr = 0
ilen = 2107145192
savite = 1
it = 1
it0 = 1
iostat = 0
iunit = 40
ourqt = ()
blkndc = ()
blknd = ()
compda = ()
ac1 = ()
bspecs = ()
bgridp = ()
cross = ()
#3 0x0000000000459fb6 in swan () at swanmain.f:122
No locals.

any ideas?

thanks,
Hamish

Discussion

  • Marcel Zijlema

    Marcel Zijlema - 2012-08-11

    Have you tried 'make ser'?

     
  • Nobody/Anonymous

    You are a very clever person!
    <a href="http://www.hummaa.com/user/marginicicle98" title="Identify">Identify</a>

     
  • Nobody/Anonymous

    xIMPix <a href="http://vjkstvpquoyi.com/">vjkstvpquoyi</a>, [url=http://patzzvpevihq.com/]patzzvpevihq[/url], [link=http://mdhpfkdhxdrx.com/]mdhpfkdhxdrx[/link], http://uvmqttaigadp.com/