Opened 14 years ago

Last modified 14 years ago

#1396 closed defect (fixed)

Bootstrapping: system() sometimes blocks execution

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund,

Description

//name:         Accelerate2
//keyword:      simulating msl221
//status:       correct
//env: OPENMODELICALIBRARY=../../../../libraries/msl221
//
// simulation example
//

loadModel(Modelica);
simulate(Modelica.Mechanics.Translational.Examples.Accelerate,numberOfIntervals=500,tolerance=0.0001,startTime=0,stopTime=1);
"Accelerate1.v:";
val(Accelerate1.v,0.0);
val(Accelerate1.v,0.25);
val(Accelerate1.v,0.5);
val(Accelerate1.v,0.75);
val(Accelerate1.v,1.0);

"Accelerate1.s:";
val(Accelerate1.s,0.0);
val(Accelerate1.s,0.25);
val(Accelerate1.s,0.5);
val(Accelerate1.s,0.75);
val(Accelerate1.s,1.0);

"Accelerate1.flange_b.s:";
val(Accelerate1.flange_b.s,0.0);
val(Accelerate1.flange_b.s,0.25);
val(Accelerate1.flange_b.s,0.5);
val(Accelerate1.flange_b.s,0.75);
val(Accelerate1.flange_b.s,1.0);

"SlidingMass1.s:";
val(SlidingMass1.s,0.0);
val(SlidingMass1.s,0.25);
val(SlidingMass1.s,0.5);
val(SlidingMass1.s,0.75);
val(SlidingMass1.s,1.0);

"SlidingMass1.flange_a.s:";
val(SlidingMass1.flange_a.s,0.0);
val(SlidingMass1.flange_a.s,0.25);
val(SlidingMass1.flange_a.s,0.5);
val(SlidingMass1.flange_a.s,0.75);
val(SlidingMass1.flange_a.s,1.0);

"SlidingMass1.flange_b.s:";
val(SlidingMass1.flange_b.s,0.0);
val(SlidingMass1.flange_b.s,0.25);
val(SlidingMass1.flange_b.s,0.5);
val(SlidingMass1.flange_b.s,0.75);
val(SlidingMass1.flange_b.s,1.0);

"SlidingMass1.v:";
val(SlidingMass1.v,0.0);
val(SlidingMass1.v,0.25);
val(SlidingMass1.v,0.5);
val(SlidingMass1.v,0.75);
val(SlidingMass1.v,1.0);

"SlidingMass1.a:";
val(SlidingMass1.a,0.0);
val(SlidingMass1.a,0.25);
val(SlidingMass1.a,0.5);
val(SlidingMass1.a,0.75);
val(SlidingMass1.a,1.0);

system("rm Modelica.Mechanics.Translational.Examples.Accelerate*");

I'm unsure if this happens because C++ is being used or something is not cleaned up properly, just that system() is called with proper arguments and never returns.

Change History (1)

comment:1 by Martin Sjölund, 14 years ago

Should hopefully be fixed now. I used fork/exec on Linux instead.

Note: See TracTickets for help on using tickets.