Questions about Parallel Computing and Custom uneven time grid nodes
Posted: Sun Feb 19, 2023 7:28 am
Dear Moco development team and Moco users,
Thank you all for your contributions to the biomechanics community! I have some questions about Parallel Computing and Custom uneven time grid nodes in Moco, I would appreciate it if anyone could give me some advice.
1. If I want to run N (N>20) independent Moco predictive problems in parallel in only one Matlab or Python terminal, and each Moco predictive problem uses all the cores of the computer (the number of cores = 6) for parallel computing (ie, solver.set_parallel(1)). Under this condition,parallel computing exists inside each Moco calculation problem and in the outer loop which used to run multiple Moco calculation problems. (For example, when using parfor in Matlab to run multiple Moco cases in parallel, the setting of MocoCasADiSolver in each Moco case is solver.set_parallel(1)).My questions are:
1).Will this situation cause problems such as data confusion when different Moco calculation problems are running in parallel?
2).Is the result obtained for each Moco problem under this condition the same as running multiple Moco problems in series(Regardless of whether the outer layer used to run multiple Moco problems is parallel or serial,MocoCasADiSolver is always set to solver.set_parallel(1))?
2. When using the trapezoidal algorithm or the hermite-simpson algorithm for transcription in Moco, is it possible to customize the time grid nodes with uneven mesh intervals for discretization?
Best Wishes,
Matthew
Thank you all for your contributions to the biomechanics community! I have some questions about Parallel Computing and Custom uneven time grid nodes in Moco, I would appreciate it if anyone could give me some advice.
1. If I want to run N (N>20) independent Moco predictive problems in parallel in only one Matlab or Python terminal, and each Moco predictive problem uses all the cores of the computer (the number of cores = 6) for parallel computing (ie, solver.set_parallel(1)). Under this condition,parallel computing exists inside each Moco calculation problem and in the outer loop which used to run multiple Moco calculation problems. (For example, when using parfor in Matlab to run multiple Moco cases in parallel, the setting of MocoCasADiSolver in each Moco case is solver.set_parallel(1)).My questions are:
1).Will this situation cause problems such as data confusion when different Moco calculation problems are running in parallel?
2).Is the result obtained for each Moco problem under this condition the same as running multiple Moco problems in series(Regardless of whether the outer layer used to run multiple Moco problems is parallel or serial,MocoCasADiSolver is always set to solver.set_parallel(1))?
2. When using the trapezoidal algorithm or the hermite-simpson algorithm for transcription in Moco, is it possible to customize the time grid nodes with uneven mesh intervals for discretization?
Best Wishes,
Matthew