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

Revision history [back]

See my comment in this question. Basically you need to use -march=corei7-avx (-march=sandybridge in GCC4.9+), -march=core-avx2 (-march=haswell in GCC4.9+), or -march=native. The latter option will compile to the highest available option on your computer and generate assembly code specific to the processor on your machine. For windows, you need to specify the /arch flag for AVX and AVX2. With these options set, the compiler will attempt to use AVX(2) where appropriate.

Now like Amir mentioned, while the compiler will attempt to use AVX(2), the benefit may be marginal in the case of EnergyPlus. The way EnergyPlus code is currently structured makes it difficult for the compiler to automatically and fully use newer instructions and bigger SIMD pipelines. This may change in the future as optimized linear algebra libraries are used in EnergyPlus and code is refactored.

See my comment in this question. Basically you need to use -march=corei7-avx (-march=sandybridge in GCC4.9+), -march=core-avx2 (-march=haswell in GCC4.9+), or -march=native. The latter option will compile to the highest available option on your computer and generate assembly code specific to the processor on your machine. See this link for all available options on GCC/Clang. For windows, you need to specify the /arch flag for AVX and AVX2. With these options set, the compiler will attempt to use AVX(2) where appropriate.

Now like Amir mentioned, while the compiler will attempt to use AVX(2), the benefit may be marginal in the case of EnergyPlus. The way EnergyPlus code is currently structured makes it difficult for the compiler to automatically and fully use newer instructions and bigger SIMD pipelines. This may change in the future as optimized linear algebra libraries are used in EnergyPlus and code is refactored.