Skip to content

Add OpenMP parallel declarations and iterable handling - #75

Merged
t-kalinowski merged 19 commits into
mainfrom
parallel-openmp
Dec 30, 2025
Merged

Add OpenMP parallel declarations and iterable handling#75
t-kalinowski merged 19 commits into
mainfrom
parallel-openmp

Conversation

@t-kalinowski

Copy link
Copy Markdown
Owner

Summary

  • add OpenMP declare(parallel()/omp()) handling for for-loops and sapply assignments, plus toolchain flag detection
  • extend sapply lowering to support vector iterables and inferred output shapes
  • improve size-expression handling and iterable lowering; update docs and tests

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread R/quick.R
Comment on lines +219 to +223
use_openmp <- isTRUE(attr(fsub@scope, "uses_openmp", exact = TRUE))
env <- quickr_fcompiler_env(
build_dir = build_dir,
use_openmp = use_openmp
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fallback build drops requested OpenMP flags

When declare(parallel()) is used, compile() now sets use_openmp and feeds quickr_fcompiler_env() so that the first build uses OpenMP-specific Makevars (lines 219‑223). If that build fails because the toolchain lacks OpenMP support, the fallback system2() call immediately recompiles without env, so the shared object is produced with OpenMP directives treated as comments. This silently ignores the user’s request for parallelization and can make availability checks (e.g. openmp_supported_or_skip()) report success while loops run serially instead of erroring. The fallback should be disabled or the original failure propagated whenever OpenMP was requested.

Useful? React with 👍 / 👎.

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@t-kalinowski
t-kalinowski merged commit b6d63d6 into main Dec 30, 2025
6 checks passed
@t-kalinowski
t-kalinowski deleted the parallel-openmp branch December 30, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants