Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simulation paralleization support with parmodauto (#6825)
@mahge Fix serialization a894bea - Traversal now handles der, pre, previous ... properly, i.e., treats them as crefs instead of calls. @mahge Update ParModAuto sources. 4c135b3 - There are so many changes here. - Capability for monitoring and rescheduling added. - Use JSON instead of XML - updated compilation settings. e.g. use GC_THREADS from the compilation command instead of defining it in the files. - many other fixes and changes. @mahge Move parmodauto flag from debug to config flags. 724a4ab - It is now used as --parmodauto instead of -d=parmodauto @mahge Remove unused parmodelica code. f78687c - We do not try to parallelize all the systems anymore. We only parallelize ODE system for now. So cleanup the rest. @mahge Update the code gen for the updated interface. f5b3713 - We now use a global model variable in the C code. - Pass this global variable to the C interface functions. Basically acts as the 'this' argument for the C++ counterparts of the functions. @mahge Changed dumping of linear torn systems 8ecba32 - The internal equations are now dumped as fields of the main equation. They used to be dumped before the actual equation which made parsing them contrived. - Diabled old parsing and wrote a new one since the dump format has changed. In order to avoid surprises, we stick to parsing only what we know we can handle for now. - Disabled source dumping for now. It is not really needed anyway. - Normalized debug and log dumping a bit. @mahge Move ParModAuto library handling to SimCode 61a1c64 - Move the managment of ParModAuto libs out of the templates The templates was not the right place to do this. We should do things in SimCode when possible. @mahge Clean up to avoid warnings 49add1b @mahge Restructure parsing of task system json dump. d497cec - Parsing is more structured and are a bit cleaner now. - Try to make sure we fail on anything that we have not vetted manudally and are sure we are handling properly. Since some of the format for linear/non-linear as well as dynamic/non-dynamic tearing combinations can be similar it is easy to parse something by miskae as something else. @mahge Changed dumping of non-linear systems 30d7d3e - Updated dumping of non-linear [torn] systems with NO alternative tearing. - The internal equations are now dumped as fields of the main equation. They used to be dumped before the actual equation which made parsing them contrived. - This is similar to 54ce151 @mahge Add a separate file for tasksystem serialization. 9134a76 - Unfortunately we need to dump the task syste a bit different from from the dbug dump for a number of reasons: - We need to simplify things so that it is convenient to parse it later. - We also have a different function for extracting crefs from expressions. this treats der(x), pre(x) .. 'correctly' as differnt crefs from x. - There is a lot of information that is not need for paraellization that is dumped by the original serialization. So this helps us in striping that information without affecting the debugging. - Removed the old XML task system dumping which is not not used anymore. @mahge Allow parsing of single output algorithms. e890be6 - Multiple output algorithms will be checked again and allowed later. @mahge Refactor and format all source files. 0724dc4 @mahge Always build debug version om parmodauto for now. b068c06 - I hope I won't forget to change this later. @mahge Cleanup and normalize the makefiles. 83a972d @mahge Explicitly link to boost system d5e172e @mahge Fix TBB include path. 1f57456 - TBB is now assumed to be in `OMCompiler/3rdParty/tbb` instead of `OMCompiler/3rdParty/tbb_cmake` @mahge Add parmodauto configure/build to omc compilation. 4d124ad - parmodauto con now be enabled with --enable-parmodauto during configuration of OpenModelica. - This will check for the existence of modified TBB sources in 3rdParty/tbb_omc and if will fail if the directory does not exist. - If it exists, omc_tbb will be configured using cmake during OpenModelica's autoconf configuration. - configuration will set two new variables ENABLE_PARMODAUTO and OMC_TBB_ROOT. These values are used to enable parmodauto compilation and find TBB source directory respectively. @mahge Fix cmake compilation. d9b9a66 - Add new file and remove old file from MM sources list. @mahge Specify number of threads during pm model creation 20b24c4 - This used to be set during compilation. That was find for testing but for general usage it should be settable during simulation time. - It is still recommended to just let the system pick the number of threads unless you have specific reasons to do otherwise, e.g. comparing performance for research reasons. @mahge Add parmodauto to OMCompiler's CMake compilation. 06f5b5f @mahge If parmodauto link using g++. 1192d7d - We need to either compile with g++ or explicitly link to libstdc++. I think it is better to let g++ do its full c++ thing instead of linking just libstdc++ only. @mahge Propagate maximum number of threads. 7035b01 - This is preparation to be able to set the desired number of threads at simulation start. Now the max number of threads to be used at any time can be set with the interface function PM_Model_create() when the parmodauto model representation is created by the OpenModelica simulation executable code. The maximum number of threads is passed to TBB by OMModel constructor using tbb::task_scheduler_init. @mahge Do not install om_pm_model.hpp. 69383d9 - It is not needed. Just the interface file om_pm_interface.hpp is enough. If needed we will add it later.
- Loading branch information