eleLoad command causes segmentation fault on Mac OS

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
gaziz
Posts: 16
Joined: Fri Aug 02, 2013 1:44 pm
Location: University of British Columbia

eleLoad command causes segmentation fault on Mac OS

Post by gaziz »

Hi there,

I am experiencing problems while using eleLoad command. OpenSees returns segmentation fault: 11 on MacOS, but exactly the same input works just fine on Windows. Other inputs where I do not have eleLoad command work fine on MacOS.
Any clue what could be wrong? The input is below followed by the error I get.

Here is the input I use (it works on Windows, but not on MacOS!)
##############################
wipe

model BasicBuilder -ndm 3 -ndf 4

# create nodes
node 1 1.0 0.0 0.0
node 2 1.0 1.0 0.0
node 3 0.0 1.0 0.0
node 4 0.0 0.0 0.0
node 5 1.0 0.0 1.0
node 6 1.0 1.0 1.0
node 7 0.0 1.0 1.0
node 8 0.0 0.0 1.0

# Triaxial boundary conditions
fix 1 0 1 1 1
fix 2 0 0 1 1
fix 3 1 0 1 1
fix 4 1 1 1 1
fix 5 0 1 0 1
fix 6 0 0 0 1
fix 7 1 0 0 1
fix 8 1 1 0 1

# create material
nDMaterial ElasticIsotropic 1 25000 0.35 1.7

# create element
set perm 1.0e-9
element SSPbrickUP 1 1 2 3 4 5 6 7 8 1 2.2e6 1.0 $perm $perm $perm 0.95 1.0e-5 0.0 0.0 -9.81

# create analysis
constraints Penalty 1.0e14 1.0e14
test NormDispIncr 1.0e-5 35 1
algorithm Newton
numberer RCM
system SparseSYM
integrator Newmark 0.5 0.25
analysis Transient

# record nodal displacment
eval "recorder Node -file displacement.out -time -nodeRange 1 8 -dof 1 2 3 disp"

# record elemental stress and strain (files are names to reflect GiD gp numbering)
recorder Element -file stress.out -time -ele 1 stresses
recorder Element -file strain.out -time -ele 1 strains
puts "Finished creating isotropic loading recorders..."

# create self-weight pattern
pattern Plain 1 {Series -time {0 5000 1.0e10} -values {0 1 1} -factor 1} {
puts "define element for self-weight"
eleLoad -ele 1 -type -selfWeight 1.0 1.0
puts "finished defining element for self-weight"
}

# analyze
set Tot_numIncr 10
set dT 5.0e2
for {set numIncr 1} {$numIncr <= $Tot_numIncr} {incr numIncr 1} {
puts "##### self-weight: Step $numIncr #####";
analyze 1 $dT
}
puts "Finished with self-weight"

wipe
##############################

and this is the error I get on MacOS (it appears as soon as "eleLoad -ele 1 -type -selfWeight 1.0 1.0" line is invoked):
##############################
Finished creating isotropic loading recorders...
define element for self-weight
Segmentation fault: 11
##############################

Thank you!
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: eleLoad command causes segmentation fault on Mac OS

Post by fmk »

thanks .. i have fixed the bug and it will be out in next release, it will flag what you input as an error .. the eleLoad command for Self weight options needs 3 components for the brick and you were only providing 2, the windows results may be screwy as results probably just include data for whatever was being stored in memory address beyond the vector of size 2 you were passing in .. that option really need 3 values for the way the code is written.
gaziz
Posts: 16
Joined: Fri Aug 02, 2013 1:44 pm
Location: University of British Columbia

Re: eleLoad command causes segmentation fault on Mac OS

Post by gaziz »

Thank you Frank!
Exact same situation for Nine_Four_Node_QuadUP element, I would guess that being 2D element it requires:

eleLoad -ele 1 -type -selfWeight 1.0 1.0

but this again only works on Windows! On MacOS it can be run only with:

eleLoad -ele 1 -type -selfWeight 1.0 1.0 1.0

which seems not what 2D element needs. Do I understand it correctly?

Here is the input to test it
##############################
wipe

model BasicBuilder -ndm 2 -ndf 3
# create nodes
node 1 0.0 0.0
node 2 1.0 0.0
node 3 1.0 1.0
node 4 0.0 1.0
# 1D boundary conditions
fix 1 1 1 1
fix 2 1 1 1
fix 3 1 0 1
fix 4 1 0 1

model BasicBuilder -ndm 2 -ndf 2
# create nodes
node 5 0.5 0.0
node 6 1.0 0.5
node 7 0.5 1.0
node 8 0.0 0.5
node 9 0.5 0.5
# 1D boundary conditions
fix 5 0 1
fix 6 1 0
fix 7 0 0
fix 8 1 0
fix 9 0 0

# create material
nDMaterial ElasticIsotropic 1 25000 0.35 1.7

# create element
set perm 1.0e-9
element 9_4_QuadUP 1 1 2 3 4 5 6 7 8 9 1.0 1 2.2e6 1.0 1.0 1.0 0.0 -9.81
# create analysis
constraints Penalty 1.0e14 1.0e14
test NormDispIncr 1.0e-5 35 1
algorithm Newton
numberer RCM
system SparseSYM
integrator Newmark 0.5 0.25
analysis Transient

# record nodal displacment
eval "recorder Node -file 1Ddisplacement.out -time -nodeRange 1 9 -dof 1 2 3 disp"

# record elemental stress and strain (files are names to reflect GiD gp numbering)
recorder Element -file 1Dstress.out -time -ele 1 material 1 stress
recorder Element -file 1Dstrain.out -time -ele 1 material 1 strain
puts "Finished creating 1D loading recorders..."

# create self-weight pattern
pattern Plain 1 {Series -time {0 5000 1.0e10} -values {0 1 1} -factor 1} {
puts "define element for self-weight"
eleLoad -ele 1 -type -selfWeight 1.0 1.0
puts "finished defining element for self-weight"
}

# analyze
set Tot_numIncr 10
set dT 5.0e2
for {set numIncr 1} {$numIncr <= $Tot_numIncr} {incr numIncr 1} {
puts "##### self-weight: Step $numIncr #####";
analyze 1 $dT
}
puts "Finished with self-weight"

wipe
##############################


Thank you for your help!
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: eleLoad command causes segmentation fault on Mac OS

Post by fmk »

the element only uses the first 2 values, the problem is the SelfWeight command. it was written to always take 3 values. that code has been updated.
gaziz
Posts: 16
Joined: Fri Aug 02, 2013 1:44 pm
Location: University of British Columbia

Re: eleLoad command causes segmentation fault on Mac OS

Post by gaziz »

Thank you Frank for clarification!
Post Reply