Running EnergyPlus from MATLAB via parallel processing

4 visualizzazioni (ultimi 30 giorni)
How can I run Energyplus from MATLAB via parallel processing? Now I can run E+ from MATLAB with one core(worker) while when I use spmd to use more than one core, it seems the collision between cores occures during running E+. My laptop has 2 cores and according to the directory path that I defined it creates two folders for each worker. The weather file (.epw) and idf file places at each folder, but during the parallel process the blank csv file for one of the worker is created and for the other not.
I would appreciate it if anybody has experience in this field and help me out.
  2 Commenti
Samuel de Vries
Samuel de Vries il 8 Ago 2021
There's multiple ways of going about this. I personally found that Matlab's built-in parallel processing capabilities (parfor etc.) have a high overhead compared to the short duration of a single E+ simulation. I therefore use a custom script to run E+ simulation in parallel. You can find an example in IEA SHC task-56 model database (see link).
The folder 'EnergyPlus_D_204_SensitivityAnalyses_Stockholm_GlazingProperties' contains an example of a sensitivity analyses where multiple E+ simulations are executed in parallel. See the main function: makeAndRunParTsk56StockGlzngProp.m
This approach is designed for Windows OS. The core idea is to create a series of batch files that are each activated using system('start ..) such that Matlab does not wait for them to be completed before the next one starts. The OS will automatically assign each of them to a free core. To avoid Matlab from opening results files before they are finished the batchfiles write out a finish flag file that needs to be created before the matlab function continues. Additionally, the matlab function distributes the EnergyPlus simulations across the cores you have on your computer. I programmed in that the function always keeps 1 core free but you can change that (see 'numCores -1' on line 128).

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Parallel Server in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by