segmentation fault at the end of analysis

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
cenk tort
Posts: 21
Joined: Mon Aug 16, 2004 11:30 am
Location: miteng
Contact:

segmentation fault at the end of analysis

Post by cenk tort »

Hello ,

I am getting a segmentation fault (core dumped) after the analysis is complete. It appears in the function Tcl_Eval but I could not step into it using GDB. Anybody knows what Tcl_Eval does ? or any idea how to debug this. Here is the bt output

#0 0x42075061 in malloc_consolidate () from /lib/i686/libc.so.6
#1 0x42074f4b in _int_free () from /lib/i686/libc.so.6
#2 0x42075a5c in free () from /lib/i686/libc.so.6
#3 0x402abde3 in operator delete(void*) (ptr=0x3ff00000) at ../../../../libstdc++-v3/libsupc++/del_op.cc:39
#4 0x402abe3f in operator delete[](void*) (ptr=0x3ff00000) at ../../../../libstdc++-v3/libsupc++/del_opv.cc:36
#5 0x082eff18 in ~Matrix (this=0x42138cc8) at Matrix.cpp:195
#6 0x4019faa8 in TclSetLibraryPath () from /usr/lib/libtcl8.4.so
#7 0x401824a7 in Tcl_ExitObjCmd () from /usr/lib/libtcl8.4.so
#8 0x4017ce74 in TclEvalObjvInternal () from /usr/lib/libtcl8.4.so
#9 0x401a124d in TclExecuteByteCode () from /usr/lib/libtcl8.4.so
#10 0x401a0933 in TclCompEvalObj () from /usr/lib/libtcl8.4.so
#11 0x4017dd6c in Tcl_EvalObjEx () from /usr/lib/libtcl8.4.so
#12 0x401ad26e in Tcl_RecordAndEvalObj () from /usr/lib/libtcl8.4.so
#13 0x0811ae37 in g3TclMain (argc=1836020336, argv=0x327470, appInitProc=0xbffff2e0) at tclMain.cpp:339
#14 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6
Cenk Tort
Department of Civil Engineering
University of Minnesota
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

what Tcl command causes this segmentation fault? this should help.
otherwise, please post your script.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
cenk tort
Posts: 21
Joined: Mon Aug 16, 2004 11:30 am
Location: miteng
Contact:

tcl script

Post by cenk tort »

Here is the tcl script that I am having the segmentation error

# comment out one of lines if wish to see graphics or not
#set displayMode "displayON"
set displayMode "displayOFF"

model BasicBuilder -ndm 3 -ndf 9

# tag X Y Z
node 1 0 0 0
node 2 0 0 12

# node DXs DYs DZs RX RY RZ DXc DYc DZc
fix 1 1 1 1 1 1 1 1 1 1
fix 2 0 1 0 1 0 1 0 1 0


# tag f'c D t fy Es
uniaxialMaterial RCFT_conc 1 30.0 3.94 0.0854 42.8 29000
# tag fy fu Es D t
uniaxialMaterial RCFT_stl 2 100.0 1000.0 29000.0 3.94 0.0854
# tag E sigmaY K H
uniaxialMaterial RCFTSlip 3 93.13 0.087 0.0 0.1

source RCFTsection.tcl

# Rectangular Composite Section
# tag matIDs matIDc D b t sfl_d sfl_b swl_d swl_b cfl_d cfl_b cwl_d cwl_b cc_d cc_b
RCFTsection 1 2 1 3.94 3.94 0.0854 1 4 4 2 1 4 4 1 4 4
section RCFTAggregator 2 3 S -section 1


# Coordinate transformation
geomTransf RCFTCrd 1 1.0 0.0 0.0

# Constraints
rcftequalDOF 2 1 6 1 0 0
rcftequalDOF 2 2 7 0 1 0

# Number of integration points along length of element
set np 3

# Create the columns using Beam-column elements
# tag ndI ndJ nsecs secID transfTag
element RCFTBeamColumn 1 1 2 $np 2 1

# Constant gravity dead loads in kips
pattern Plain 1 Linear {
# node FXs FYs FZs MX MY MZ FXc FYc FZc
load 2 0.0 0.0 -32.2 0.0 0.0 0.0 0.0 0.0 0.0
}

#set up solution procedure
system FullGeneral
#how it handles boundary conditions
constraints Penalty 1e15 1e15
#constraints Transformation
test NormUnbalance 1.0e-5 10 0
#use Newton's solution algorithm
algorithm Newton
#renumber dof's to minimize band-width
numberer RCM
#set up load stepping
integrator LoadControl 0.1 1 0.1 0.1
#set up type of analysis, static for gravity
analysis Static
#initialize
analyze 10
#recorder
recorder Node -file Node2.out -time -node 2 -dof 3 9 disp

---------

proc RCFTsection { secID matIDs matIDc D B t sfl_d sfl_b swl_d swl_b cfl_d cfl_b cwl_d cwl_b cc_d cc_b} {
# input parameters
# secID - section ID number
# matIDs - material ID number for steel
# matIDc - material ID number for concrete
# D = nominal depth
# B = nominal width
# t = nominal thickness
# sfl_d = number of steel layers in flange in D direction
# sfl_b = number of steel layers in flange in B direction
# swl_d = number of steel layers in web in D direction
# swl_b = number of steel layers in web in B direction
# cfl_d = number of concrete layers in flange in D direction
# cfl_b = number of concrete layers in flange in B direction
# cwl_d = number of concrete layers in web in D direction
# cwl_b = number of concrete layers in web in B direction
# cc_d = number of concrete layers in core in D direction
# cc_b = number of concrete layers in core in B direction
section fiberSec $secID -RCFT 369192.31 $D $B $t {
patch core $matIDc $D $B $t $cfl_d $cfl_b $cwl_d $cwl_b $cc_d $cc_b
patch tube $matIDs $D $B $t $sfl_d $sfl_b $swl_d $swl_b
}
}
Cenk Tort
Department of Civil Engineering
University of Minnesota
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

okey, what version are you using?? i don't have the following:
uniaxialMaterial RCFT_conc
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
cenk tort
Posts: 21
Joined: Mon Aug 16, 2004 11:30 am
Location: miteng
Contact:

tcl script

Post by cenk tort »

Hello Silvia,

Thanks for your messages. I am using 1.6.2 and RCFT_conc is the concrete model that I added to opensees for rectangular concrete filled tube members. But I also tried the same script with ElasticPP and I had the same segmentation fault.
Thanks.
Cenk
Cenk Tort
Department of Civil Engineering
University of Minnesota
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

what was the material command for epp?
is this a version you compiled yourself???

also, did you google Tcl_eval?? http://www.google.com/search?hl=en&q=Tc ... gle+Search
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
cenk tort
Posts: 21
Joined: Mon Aug 16, 2004 11:30 am
Location: miteng
Contact:

epp command

Post by cenk tort »

Hello Silvia,

I compiled this version by myself. Here is the command that I used for elastic perfectly plastic material.

uniaxialMaterial ElasticPP 1 4500 0.00089

uniaxialMaterial ElasticPP 2 29000 0.00276
Cenk Tort
Department of Civil Engineering
University of Minnesota
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

Cenk,
i am not able to run your input file in the current version of OpenSees, can you please e-mail me your executable?
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

Cenk,
I am sorry, I wish you had specified that you had compiled your own version and on Unix at the beginning, as I would not have dragged this on for this long. I hope frank can help you on this, but I would look at what specific command is causing the problem, or maybe test a similar input file on the published and tested version of OpenSees.
please let me know how it goes!
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

Cenk,

the problem is obviously with some of the code you have introduced. suggest you start by changing your stuff with other regular commands, i.e. remove al rcft stuff, till you find what command is causing the problem. hopefully it will show up. if it's a nasty memory problem it might not!
cenk tort
Posts: 21
Joined: Mon Aug 16, 2004 11:30 am
Location: miteng
Contact:

indexing error

Post by cenk tort »

Hello Frank,

Valgrind showed me where the problem is. It was an indexing error in my coordinate transformation function. Now, it looks fine.

Thanks,
Cenk
Cenk Tort
Department of Civil Engineering
University of Minnesota
Post Reply