E3SM-Project / E3SM-Project/EKAT

Vectorization inconsistency between packed min/max

Open
#38 4 comments 0 reactions 0 assignees View on GitHub
bug pkg: pack
Dominant language
C++
Stars
22
Forks
12
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I cannot understand why min and max have different vectorization macros (one has `vector_disabled`, while the other has `vector_simd`). It appears to me as a potential bug.

**To Reproduce**
Take a look at the two pairs of max/min implementation (masked and unmasked) around [this](https://github.com/E3SM-Project/EKAT/blob/4e301ff2edc742db7d232dcbcbba28e8c102c626/src/ekat/ekat_pack.hpp#L304) line.

**Expected behavior**
Either both `vector_simd` or both `vector_disabled`.

@jgfouca might know more about this, and either confirm or deny that this is a bug.

Contributor guide

Open the contributing guide

Research direction

Open src/ekat/ekat_pack.hpp around line 304 and compare the masked and unmasked min/max implementation pairs. Trace how their vectorization macros are defined and used to determine whether the difference is intentional or a bug. Done means the two implementations have a confirmed, consistent vectorization choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.