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

cmake energyplus build

asked 2017-08-05 21:36:38 -0500

ngkhanh's avatar

updated 2017-08-06 06:50:45 -0500

i try to get energyplus complied but cmake gets error when i run configure with cmake and VS 2017: cmake_configure I have set source code as cloned directory of energyplus and build folder in new directory. there are 2 cmake log files : cmake_error and cmake_output.
It seems i need setup fortran complier, need i ?

Which step i can setup "-march=native"as @MarkAdams recommendation in ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-08-07 10:31:31 -0500

Visual Studio 2017 isn't officially supported right now, but I've been able to build with it personally with no issues.

Your CMake configure has too many things selected for a first-time build. I'd delete the build directory and start over. You'll still need to point CMake at a Python, but all of the rest you have selected aren't necessary to build E+ itself. It's best to get the main executable building and then add stuff as you need it. If you want to build the Fortran utilities you will need a Fortran compiler, but again that is not required.

edit flag offensive delete link more


Thanks, i got my build works for the first time. how can i setup "-march=native" for avx config to get higher speed ?

ngkhanh's avatar ngkhanh  ( 2017-08-07 17:42:59 -0500 )edit

I think Mark's original comment applies to gcc or clang. For MSVC I guess the equivalent would be /arch which is described here. It is possible to modify the CMake build to include it, but unless you've done that before I'd stick to using the directions at the above link. Note that you may not see speedup.

Jason DeGraw's avatar Jason DeGraw  ( 2017-08-07 18:06:29 -0500 )edit

answered 2017-08-07 04:22:23 -0500

Did you get any confirmation from anyone that Visual Studio 2017 is actually supported? The wiki says Visual Studio 2015 Community for Windows Desktop, at least update 3.

I like to use the latest version of everything, but trust my experience here: if you want to build OpenStudio or EnergyPlus, follow the instructions to the letter. At least that's tested and has worked on someone's computer. See the wiki

edit flag offensive delete link more


Thank Julien, i have done EP complied as wiki suggestion. How would OpenStudio compile would more time and resources than EP compile ? My CPU is 100% all building time.

ngkhanh's avatar ngkhanh  ( 2017-08-10 17:30:55 -0500 )edit

Not sure I understood the question, but if you're asking if openstudio would be longer to build, then definitely yes. OpenStudio has a LOT more dependencies. The initial compile time for OpenStudio is in the range of several hours.

Julien Marrec's avatar Julien Marrec  ( 2017-08-11 02:25:09 -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


Asked: 2017-08-05 21:36:38 -0500

Seen: 375 times

Last updated: Aug 07 '17