Segmentation fault output, why?
Moderator: Moderators
-
- Posts: 73
- Joined: Tue Feb 20, 2007 6:48 am
- Location: IIEES
- Contact:
Segmentation fault output, why?
when i run my model this output appear:
Segmentation fault.
I guess it is for equalDof command.
the procedure run until i import eigen or analyse command. what?
Segmentation fault.
I guess it is for equalDof command.
the procedure run until i import eigen or analyse command. what?
operating system: Debian Gnu/Linux lenny 64Bit debian (DOT) org/
email : e.roknabadi (AT) iiees.ac.ir
email : e.roknabadi (AT) iiees.ac.ir
-
- Posts: 73
- Joined: Tue Feb 20, 2007 6:48 am
- Location: IIEES
- Contact:
I emailed to Frank,but another error occured:
my code file is:
and the error is 'segmentation fault'
and numeric input file is:
and error of this code is:
it seems the constraint is not enough. what this mean?
________________________________________________
I generate my numeric code by this program in python:
my code file is:
Code: Select all
wipe
set g 9.81
set numXele 8
set numYele 4
set xSize 1
set ySize 1
# base plate
set lenBaseplate 4
set buryDepth 2
set rho 1.9
set gravX 0
set gravY [expr -$g*$rho] ;# soil mass density
#================================================================
#Elastic-plastic model
#================================================================
set G 18.61e4
set nu_soil .4
set E_soil [expr 2*(1+$nu_soil)*$G]
set B [expr $E_soil/(3*(1-2*$nu_soil))] ;
set press 0 ;# isotropic consolidation pressure on quad element(s)
#================================================================
#Elastic-plastic model
#================================================================
# uniaxialMaterial parameters
set Vs 310
set dampH [expr $rho*$Vs] ;
set BnodeDampH [expr $ySize*$dampH]
# ################################
# create the modelbuilder
# #################################
model BasicBuilder -ndm 2 -ndf 2
nDMaterial PressureIndependMultiYield 1 2 1.9 18.34e4 $B 10 .1 \
21.4 80 0 -9 1.e-06 1 3.16e-06 0.913 1.e-05 0.761 \
3.16e-05 0.565 1.e-04 0.4 3.16e-04 0.261 1.e-03 0.152 3.16e-03 0.076 1.e-02 0.037
updateMaterialStage -material 1 -stage 0
#================================================================
# build the soil model
#================================================================
set numXnode [expr $numXele+1]
set numYnode [expr $numYele+1]
set nodeNum 0
for {set j 1} {$j <= $numYnode} {incr j 1} {
for {set i 1} {$i <= $numXnode} {incr i 1} {
incr nodeNum 1
set xdim [expr ($i-1)*$xSize]
set ydim [expr ($j-1)*$ySize]
node $nodeNum $xdim $ydim
}
}
# define elements
for {set i 1} {$i <= $numXele} {incr i 1} {
for {set j 1} {$j <= $numYele} {incr j 1} {
set eleNum [expr $i + ($j-1)*$numXele]
set n1 [expr $i + ($j-1)*$numXnode]
set n2 [expr $i + ($j-1)*$numXnode + 1]
set n4 [expr $i + $j*$numXnode + 1]
set n3 [expr $i + $j*$numXnode]
element quad $eleNum $n1 $n2 $n4 $n3 1.0 "PlaneStrain" 1 $press 0. $gravX $gravY
}
}
fixY 0.0 1 1
# ################################
# create the modelbuilder
# #################################
model BasicBuilder -ndm 2 -ndf 3
# define base plate nodes
set diameter [expr $numXele*$xSize]
set height [expr $numYele*$ySize]
set numXeleBaseplate [expr int($lenBaseplate/$xSize)]
set numYeleBaseplate [expr int($buryDepth/$ySize)]
set numXnodeBaseplate [expr $numXeleBaseplate+1]
set numYnodeBaseplate [expr $numYeleBaseplate+1]
set xLeftBaseplate [expr ($diameter-$lenBaseplate)/2.0]
set yLeftBaseplate $height
set xCenterBaseplate [expr $xLeftBaseplate+($lenBaseplate/2.)]
set yCenterBaseplate [expr $yLeftBaseplate-($buryDepth/2.)]
set nodeLeftSoilID [expr int(($yLeftBaseplate/$ySize)*$numXnode+($xLeftBaseplate/$xSize))]
set nodeCenterSoilID [expr int(($yCenterBaseplate/$ySize)*$numXnode+($xCenterBaseplate/$xSize))]
# box plate nodes
set baseplateNodesID ""
for {set j 1} {$j <= $numYnodeBaseplate} {incr j 1} {
for {set i 1} {$i <= $numXnodeBaseplate} {incr i 1} {
incr nodeNum 1
incr nodeLeftSoilID 1
set xdim [expr $xLeftBaseplate+($i-1)*$xSize]
set ydim [expr $yLeftBaseplate+(1-$j)*$ySize]
node $nodeNum $xdim $ydim
lappend baseplateNodesID $nodeNum
equalDOF $nodeLeftSoilID $nodeNum 1 2
}
incr nodeLeftSoilID $numXnode
}
# master node for base plate
incr nodeNum 1
set masterNodeID $nodeNum
node $masterNodeID $xCenterBaseplate $yCenterBaseplate
# create rigid box plate
equalDOF $nodeCenterSoilID $masterNodeID 1 2
foreach node $baseplateNodesID {
equalDOF $masterNodeID $node 3
}
set lambda [eigen 1]
set wn [expr pow($lambda,.5)]
set period [expr 2*3.14/$wn]
puts "period is $period"
and numeric input file is:
Code: Select all
wipe
model BasicBuilder -ndm 2 -ndf 2
nDMaterial PressureIndependMultiYield 1 2 1.9 18.34e4 868466.666667 10 .1 \
21.4 80 0 -9 1.e-06 1 3.16e-06 0.913 1.e-05 0.761 \
3.16e-05 0.565 1.e-04 0.4 3.16e-04 0.261 1.e-03 0.152 3.16e-03 0.076 1.e-02 0.037
updateMaterialStage -material 1 -stage 0
#================================================================
# build the soil model
#================================================================
node 1 0 0
node 2 1 0
node 3 2 0
node 4 3 0
node 5 4 0
node 6 5 0
node 7 6 0
node 8 7 0
node 9 8 0
node 10 0 1
node 11 1 1
node 12 2 1
node 13 3 1
node 14 4 1
node 15 5 1
node 16 6 1
node 17 7 1
node 18 8 1
node 19 0 2
node 20 1 2
node 21 2 2
node 22 3 2
node 23 4 2
node 24 5 2
node 25 6 2
node 26 7 2
node 27 8 2
node 28 0 3
node 29 1 3
node 30 2 3
node 31 3 3
node 32 4 3
node 33 5 3
node 34 6 3
node 35 7 3
node 36 8 3
node 37 0 4
node 38 1 4
node 39 2 4
node 40 3 4
node 41 4 4
node 42 5 4
node 43 6 4
node 44 7 4
node 45 8 4
# define elements
element quad 1 1 2 11 10 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 9 10 11 20 19 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 17 19 20 29 28 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 25 28 29 38 37 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 2 2 3 12 11 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 10 11 12 21 20 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 18 20 21 30 29 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 26 29 30 39 38 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 3 3 4 13 12 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 11 12 13 22 21 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 19 21 22 31 30 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 27 30 31 40 39 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 4 4 5 14 13 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 12 13 14 23 22 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 20 22 23 32 31 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 28 31 32 41 40 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 5 5 6 15 14 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 13 14 15 24 23 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 21 23 24 33 32 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 29 32 33 42 41 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 6 6 7 16 15 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 14 15 16 25 24 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 22 24 25 34 33 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 30 33 34 43 42 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 7 7 8 17 16 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 15 16 17 26 25 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 23 25 26 35 34 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 31 34 35 44 43 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 8 8 9 18 17 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 16 17 18 27 26 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 24 26 27 36 35 1.0 PlaneStrain 1 0 0. 0 -18.639
element quad 32 35 36 45 44 1.0 PlaneStrain 1 0 0. 0 -18.639
fixY 0.0 1 1
# ################################
# create the modelbuilder
# #################################
model BasicBuilder -ndm 2 -ndf 3
# define base plate nodes
# box plate nodes
node 46 2.0 4
node 47 3.0 4
node 48 4.0 4
node 49 5.0 4
equalDOF 39 46 1 2
equalDOF 40 47 1 2
equalDOF 41 48 1 2
equalDOF 42 49 3
set lambda [eigen 1]
set wn [expr pow($lambda,.5)]
set period [expr 2*3.14/$wn]
puts "period is $period"
Code: Select all
BandArpackSolver::Error in dgbtrf_
Warning FrequencyAlgo::solveCurrentStep() - the EigenSOE failed in solve().
EigenAnalysis::analyze() - algorithm failed
syntax error in expression "pow(,.5)": commas can only separate function arguments
while executing
"expr pow($lambda,.5)"
invoked from within
"set wn [expr pow($lambda,.5)]"
(file "modes1.tcl" line 115)
________________________________________________
I generate my numeric code by this program in python:
Code: Select all
import string
import os
def findItem(line,noPuts):
''' search items that include in noPuts in the line '''
for item in noPuts:
if string.find(line,item) != -1:
find = 1
break
find = 0
return find
def filterFile(oldFile,newFile):
# open files for read and write
f1 = open(oldFile,"r")
f2 = open(newFile,"w")
text = f1.readlines()
f2.write('set numericFile [open ./modes1.tcl w 0600]\n')
noPuts = ['set ','foreach ','{set ','else {','if {','incr ','}','puts "']
for line in range(0,len(text)):
f2.write(text[line])
if findItem(text[line],noPuts):
continue
prefix = '''puts $numericFile "'''
suffix = '''"'''
textWrite = prefix+text[line].strip()+suffix
f2.write(textWrite)
f2.write('\n')
f2.write('\n')
f2.write('close $numericFile')
f1.close()
f2.close()
return
# now we run
inputFile = "ssiEarthquakePlastic.tcl"
outputFile = "numeric"+inputFile
filterFile(inputFile,outputFile)
operating system: Debian Gnu/Linux lenny 64Bit debian (DOT) org/
email : e.roknabadi (AT) iiees.ac.ir
email : e.roknabadi (AT) iiees.ac.ir
-
- Posts: 73
- Joined: Tue Feb 20, 2007 6:48 am
- Location: IIEES
- Contact:
I abbreviate input file, now when i define this parameter :
the error is:
and when I define this:
the error is:
Code: Select all
set numXele 24
set numYele 12
Code: Select all
Segmentation fault
Code: Select all
set numXele 12
set numYele 6
the error is:
Code: Select all
BandArpackSolver::Error in dgbtrf_
Warning FrequencyAlgo::solveCurrentStep() - the EigenSOE failed in solve().
EigenAnalysis::analyze() - algorithm failed
syntax error in expression "pow(,0.5)": commas can only separate function arguments
while executing
"expr pow($Lambda,0.5)"
("for" body line 3)
invoked from within
"for {set mod 1} {$mod <= 2} {incr mod 1} {
set Lambda [lindex $lambda [expr $mod-1]];
set W$mod [expr pow($Lambda,0.5)];
#set T$mod [expr 2*$pi/$W$..."
(file "ssiEarthquakePlastic.tcl" line 176)
operating system: Debian Gnu/Linux lenny 64Bit debian (DOT) org/
email : e.roknabadi (AT) iiees.ac.ir
email : e.roknabadi (AT) iiees.ac.ir
the MP constraints in your first model are all messed up, only the first five make sense .. put a print before the eigen command and have a look at them .. i need to fix the code so that it does not seg fault on gi.
the second model has one messed up constraint & requires that the rotations on those extra nodes be constrained.
also the updateMaterialStage command needs to be issued after the element commands that contain the material.
the second model has one messed up constraint & requires that the rotations on those extra nodes be constrained.
Code: Select all
equalDOF 42 49 1 2
fix 46 0 0 1
fix 47 0 0 1
fix 48 0 0 1
fix 49 0 0 1
-
- Posts: 73
- Joined: Tue Feb 20, 2007 6:48 am
- Location: IIEES
- Contact:
Thanks.
when i fixed rotation of nodes = {46,47,48,49} model runed, but I want to model this:
a base plate that lie on the soil. soil nodes have two DOF and base plate Nodes have three DOF. I constraint movement of BP (base Plate) nodes to soil nodes. then I define a master node in BP( in center of BP) and constrain hole nodes of BP to master node in DOF 3 ( rotation), because i want a rigid BP that rotates with soil.
I hope i could clear problem.
then, in another analyse, i want to put a steel box in soil (buried box in soil).
fmk wrote:
also the updateMaterialStage command needs to be issued after the element commands that contain the material.
but i see thees routine in:
http://cyclic.ucsd.edu/opensees/
in OS 1.7.3 it don't send any warning, but in 1.7.5 and 2.0 warning appear:
and when i put it after element definition, warning elimination.
pleas, excuse me for my poor english.
when i fixed rotation of nodes = {46,47,48,49} model runed, but I want to model this:
a base plate that lie on the soil. soil nodes have two DOF and base plate Nodes have three DOF. I constraint movement of BP (base Plate) nodes to soil nodes. then I define a master node in BP( in center of BP) and constrain hole nodes of BP to master node in DOF 3 ( rotation), because i want a rigid BP that rotates with soil.
I hope i could clear problem.
then, in another analyse, i want to put a steel box in soil (buried box in soil).
fmk wrote:
also the updateMaterialStage command needs to be issued after the element commands that contain the material.
but i see thees routine in:
http://cyclic.ucsd.edu/opensees/
Code: Select all
#############################################################
# BUILD MODEL
#create the ModelBuilder
model basic -ndm 2 -ndf 2
# define material and properties
switch $matOpt {
1 {
nDMaterial PressureDependMultiYield 1 2 $mass $G $B 31.4 .1 80 0.5 \
26.5 0.17 0.4 10 10 0.015 1.0
updateMaterialStage -material 1 -stage 0
set gravY [expr -9.81*$mass] ;#gravity
set gravX [expr -$gravY*$loadBias]
}
2 {
nDMaterial PressureDependMultiYield 1 2 $mass $G $B 31.4 .1 80 0.5 \
26.5 0.17 0.4 10 10 0.015 1.0
nDMaterial FluidSolidPorous 2 2 1 2.2e6
updateMaterialStage -material 1 -stage 0
updateMaterialStage -material 2 -stage 0
set gravY [expr -9.81*($mass-$fmass)] ;# buoyant unit weight
set gravX [expr -$gravY*$loadBias]
}
3 {
nDMaterial PressureIndependMultiYield 1 2 $mass 4.e4 2.e5 20 .1
nDMaterial FluidSolidPorous 3 2 1 2.2e6
updateMaterialStage -material 1 -stage 0
updateMaterialStage -material 3 -stage 0
set gravY [expr -9.81*($mass-fmass)] ;# buoyant unit weight
set gravX [expr -$gravY*$loadBias]
}
4 {
nDMaterial ElasticIsotropic 4 2000 0.3 $mass
set gravY [expr -9.81*$mass] ;#gravity
set gravX [expr -$gravY*$loadBias]
}
}
Code: Select all
WARNING: updateMaterialStage - MaterialStageParameter::setDomain() - no effect with material tag 1
pleas, excuse me for my poor english.
operating system: Debian Gnu/Linux lenny 64Bit debian (DOT) org/
email : e.roknabadi (AT) iiees.ac.ir
email : e.roknabadi (AT) iiees.ac.ir
the extra nodes needed the fixity about rz because there was rigid-body modes, there will not be when you add the structure so you can remove the fixity after that.
that manual is slightly out of date, the command must appear after the element command .. also by default the soil starts in stage 0, hence warning about no effect.
that manual is slightly out of date, the command must appear after the element command .. also by default the soil starts in stage 0, hence warning about no effect.