Skip to content

Fix OpenMP linkage on Linux - #12

Open
ravila4 wants to merge 1 commit into
JianYang-Lab:mainfrom
ravila4:fix-linux-openmp-linkage
Open

Fix OpenMP linkage on Linux#12
ravila4 wants to merge 1 commit into
JianYang-Lab:mainfrom
ravila4:fix-linux-openmp-linkage

Conversation

@ravila4

@ravila4 ravila4 commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Linux builds were not enabling OpenMP for GCTA targets, causing OpenMP regions to run serially.

The regression was introduced in 405cf943, which removed the global -fopenmp compile option while retaining OpenMP::OpenMP_CXX linkage only inside the macOS branch.

This change links OpenMP::OpenMP_CXX to all GCTA targets on supported platforms, preserving the existing macOS behavior and restoring OpenMP on Linux.

Validation

  • Built successfully on Linux with GCC and oneMKL.
  • Verified OpenMP symbols in the compiled GCTA libraries.
  • fastGWA association time from 1 to 8 threads improved:
    • With --joint-covar: 1,818 s to 225 s (8.08x)
    • Without --joint-covar: 1,081 s to 145 s (7.46x)

@ravila4 ravila4 closed this Aug 20, 2026
@ravila4
ravila4 deleted the fix-linux-openmp-linkage branch August 20, 2026 23:38
@ravila4
ravila4 restored the fix-linux-openmp-linkage branch August 21, 2026 01:45
@ravila4 ravila4 reopened this Aug 21, 2026
@ravila4

ravila4 commented Aug 21, 2026

Copy link
Copy Markdown
Author

I believe this is related to issue: #11

I was able to observe the change in performance before and after the fix:

Current behavior (built from main):
image

After restoring OpenMP linkage:
image

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.

1 participant