NatLabRockies / NatLabRockies/EnergyPlus

Evaluate allowing "fast math" compiler options to enable auto-vectorization

Open
#5,451 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Performance
Dominant language
C++
Stars
1.6k
Forks
490
Avg merge
6d 21h
Merged PRs (30d)
22

Description

Auto-vectorization can improve performance for some loops. Because auto-vectorization reorders operations it violates strict IEEE floating point compliance so compilers require "fast math" options be specified to enable auto-vectorization of floating point loops. Recently, effort has been going into making EnergyPlus more "vectorization-friendly". Auto-vectorization makes it practical to get a large number of loops to vectorize so validating use of "fast math" options with EnergyPlus is of interest.

With "fast math" precision changes are probably neutral, on average. What is of more concern may be that floating point error handling, such as NaN detection/propagation, may be affected. It may not be enough to get floating point error handling only in debug builds. If there are indeed scenarios where "fast math" interferes with important floating point handling a solution may be to have a separate "fast" build that uses "fast math" options and performance switches such as setting the architecture hardware type so that more advanced vectorization pipelines, such as AVX, can be exploited. If this is the case it is recommended that Intel C++ be used for the Windows "fast" build as it offers significant performance/vectorization benefits.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing EnergyPlus's build configuration and the compiler options used for existing builds, then identify how auto-vectorization and fast-math settings affect floating-point error handling. Done means establishing whether a fast-math build is safe and defining the required build configuration, validation, and platform choices.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.