parametric study with more than one cores
Posted: Wed Jan 26, 2011 12:36 pm
hi,
for parametric study with OpenSeesMP if I want to take advantage of more than one core on my machine, each one has 8 processors, do I need any additional commands than those on example from the documentation for OpenSees parallel that follows?
set pid [getPID]
set np [getNP]
set recordsFileID [open "peerRecords.txt" r]
set count 0;
foreach gMotion [split [read $recordsFileID] \n] {
if {[expr $count % $np] == $pid} {
source model.tcl
source analysis.tcl
set ok [doGravity] loadConst -time 0.0
set gMotionList [split $gMotion "/"]
set gMotionDir [lindex $gMotionList end-1]
set gMotionNameInclAT2 [lindex $gMotionList end]
set gMotionName [string range $gMotionNameInclAT2 0 end-4 ]
set Gaccel "PeerDatabase $gMotionDir $gMotionName -accel 384.4 -dT dT -nPts nPts" pattern UniformExcitation 2 1 -accel $Gaccel
recorder EnvelopeNode -file $gMotionDir$gMotionName.out -node 3 4 -dof 1 2 3 disp
doDynamic [expr $dT*$nPts] $dT
if {$ok == 0} {
puts "$gMotionDir $gMotionName OK"
} else {
puts "$gMotionDir $gMotionName FAILED"
} wipe }
incr count 1;
}
If yes can somebody give me an example.
I run my model on 24 processors but take the same time as if it was running on 8.
for parametric study with OpenSeesMP if I want to take advantage of more than one core on my machine, each one has 8 processors, do I need any additional commands than those on example from the documentation for OpenSees parallel that follows?
set pid [getPID]
set np [getNP]
set recordsFileID [open "peerRecords.txt" r]
set count 0;
foreach gMotion [split [read $recordsFileID] \n] {
if {[expr $count % $np] == $pid} {
source model.tcl
source analysis.tcl
set ok [doGravity] loadConst -time 0.0
set gMotionList [split $gMotion "/"]
set gMotionDir [lindex $gMotionList end-1]
set gMotionNameInclAT2 [lindex $gMotionList end]
set gMotionName [string range $gMotionNameInclAT2 0 end-4 ]
set Gaccel "PeerDatabase $gMotionDir $gMotionName -accel 384.4 -dT dT -nPts nPts" pattern UniformExcitation 2 1 -accel $Gaccel
recorder EnvelopeNode -file $gMotionDir$gMotionName.out -node 3 4 -dof 1 2 3 disp
doDynamic [expr $dT*$nPts] $dT
if {$ok == 0} {
puts "$gMotionDir $gMotionName OK"
} else {
puts "$gMotionDir $gMotionName FAILED"
} wipe }
incr count 1;
}
If yes can somebody give me an example.
I run my model on 24 processors but take the same time as if it was running on 8.