Speeding up the FD calculations
Posted: Mon Dec 19, 2022 1:39 am
Hello,
I have a MATLAB code that takes 12 mins to execute. I have to reduce it to less than a minute. However, I am not sure which parallel computing technique is compatible with OpenSim.
Since the integration in the manager takes 80% of the execution time, I was thinking if I can pass this part of code to execute on multiple threads/workers. The part of the code is mentioned below
manager = Manager(main_model); % Manager will be the forward dynamics integrator
state.setTime(0);
manager.initialize(state); % State of the model is given to the manager for update
state = manager.integrate(timed); % Integrate for the time duration of 'timed'
main_model.realizeAcceleration(state);
If anyone has tried a similar problem, kindly help.
Regards,
Shivangi
I have a MATLAB code that takes 12 mins to execute. I have to reduce it to less than a minute. However, I am not sure which parallel computing technique is compatible with OpenSim.
Since the integration in the manager takes 80% of the execution time, I was thinking if I can pass this part of code to execute on multiple threads/workers. The part of the code is mentioned below
manager = Manager(main_model); % Manager will be the forward dynamics integrator
state.setTime(0);
manager.initialize(state); % State of the model is given to the manager for update
state = manager.integrate(timed); % Integrate for the time duration of 'timed'
main_model.realizeAcceleration(state);
If anyone has tried a similar problem, kindly help.
Regards,
Shivangi