1. A method for solving ordinary differential equations described in a graphical model with nodes as blocks and dependencies as links using the processing of a computer with a plurality of processors, said method comprising the steps of: generating segments of blocks with or without duplication for each block with an internal state and for each block without any output by traversing said graphical model from each said block with an internal state to each said block without any output; merging said segments to reduce duplication; compiling and converting each segment from said merged results into an executable code; and individually allocating said executable code for each segment to the plurality of processors for parallel execution.