Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
5

EnergyPlus executable file generated from source code doesn't work

asked 2016-10-12 19:17:12 -0500

updated 2017-02-01 03:38:40 -0500

I'm using EnergyPlus 8.6.0 source code available on GitHub to generate an executable EP file. After following all the steps in wiki page (https://github.com/NREL/EnergyPlus/wi...), there are a few issues and confusions here.

1- The executable file generated by visual studio doesn't work properly. The window gets closed immediately after running and nothing happens afterward. I have also set the "energyplus" in visual studio as the "StartUp Project".

2- I'm not sure how the EP-Launch and IDFEditor come into play while all the new compiled files are in a separate folder (under "Build", in my case). Are they still linked? If yes, then what is the new energyplus.exe file that is generated by Visual Studio for? ... If no, then how exactly are they going to be helpful?

3- Even if I run the EP-Launch or IDFEditor it returns an error that says "MSCOMCTL.OCX is missing or invalid".

btw, I use Windows and don't have administrative access on this computer. I'm not sure if I need full access to be able to do this process properly or not.

I appreciate your opinions or ideas on any of these questions.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2016-10-13 09:40:14 -0500

updated 2016-10-13 09:43:56 -0500

  1. It may be that the IDD is not being read. You might need to ensure that step 10 from the wiki page is done.

  2. EP-Launch doesn't work automatically with the configuration of the build environment. If you want to use EP-Launch you need to copy the EP-Launch.exe, EPL-RUN.bat, and the Energy+.idd files to the Products\Debug directory under your build directory. That should be enough to make EP-Launch work. The IDF Editor program needs to be in the same directory or a child directory to the Energy+.idd file so you can copy it to that directory or the Product directory since both should have the Energy+.idd file. Note that if you update the Energy+.idd.in "source" file (in the IDD directory) it will automatically update the version in the Products directory but you will have to manually copy it to the Products\Debug directory for EP-Launch.exe.

  3. The "MSCOMCTL.OCX is missing or invalid" sounds like that OCX is not registered. It sounds like an installer issue, the development team has heard of some users having errors like this. I would recommend you install EnergyPlus 8.1 from here.

edit flag offensive delete link more

Comments

oh interesting, I never did that step 10 and use build\src\EnergyPlus\ for that.

Archmage gravatar imageArchmage ( 2016-10-13 11:12:44 -0500 )edit
4

answered 2017-01-31 20:25:01 -0500

updated 2017-02-01 03:41:16 -0500

After working on EnergyPlus source code for a few month, I decided to answer my own question and put down a few other notes here that might be helpful for others (Thanks again to Jason for his helpful reply):

  1. After copying all the required files including EPL-RUN.bat to the Products\Debug folder, the first issue was resolved and the energyplus.exe file started working properly. Every time a change is made in the source code, the Visual Studio (VS) should build a new executable file by right clicking on the energyplus project within VS and selecting build.

  2. Jason's reply is comprehensive, I'd say.

  3. The issue with MSCOMCTL.OCX was due to not having administrative access. After copying the missing files to Windows folder with administrative access, the issue was resolved.

Additional notes:

  • All the source files are under the energypluslib project and Source Files folder. Depending on what you are trying to change, you can find the related C++ module there.

  • Every time a change is made in one of the modules in source code, the VS only compiles the modules related to that change and it doesn't compile everything. Unless there is a change in one of the header files.

  • Make sure you rename the input file and also the weather file to *in* as it is explained in Step 10. Such as in.idf and in.epw.

  • The outputs will be stored under the Product folder and they will be overwritten every time E+ is run. If EP-launch is used, the outputs will be stored where ever the inputs files are.

  • If you don't want to use the EP-launch and IDF Editor, you can still change the details such as run period, warmup period, and etc. by editing the text file of your input. energyplus.exe will be run based on these changes.

I added new sections to some of the modules within source code and now I can store some new outputs from E+ in a text file. Please let me know if you are working on similar projects and I'd be more than happy to share my experience on that!

edit flag offensive delete link more

Comments

Thanks for sharing this!

Just FYI, you don't necessarily have to use in.idf and in.epw located in the same folder if you call the CLI directly. Read more here. Eg: energyplus -w path/to/weather.epw path/to/input.idf

Julien Marrec gravatar imageJulien Marrec ( 2017-02-01 03:42:43 -0500 )edit

I am glad you got everything working.

JasonGlazer gravatar imageJasonGlazer ( 2017-02-01 07:15:31 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 



Question Tools

1 follower

Stats

Asked: 2016-10-12 19:17:12 -0500

Seen: 364 times

Last updated: Feb 01 '17