Skip to content

Follow-up to #2402, should complete #2305#2418

Merged
willend merged 1 commit intomccode-dev:mainfrom
willend:main
Apr 27, 2026
Merged

Follow-up to #2402, should complete #2305#2418
willend merged 1 commit intomccode-dev:mainfrom
willend:main

Conversation

@willend
Copy link
Copy Markdown
Contributor

@willend willend commented Apr 27, 2026

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:

Follow-up to #2402, should complete #2305

  1. Put #ifndef OPENACC around atan in tinyexpr.c since atan is not directly available
    (should idealy be mapped to atan(x)=atan2(x,1.0), will write issue to put in mccode-r)
  2. Use GPU-compatible str_comp rather than strcmp in TRACE of the instr
    (There is a define for this that seems to not cover (all of) TRACE, should also go in mccode-r or cogen)

Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:

OpenACC / Linux with NVIDIA GPU


PR Checklist for contributing to McStas/McXtrace

For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:


1) Put #ifndef OPENACC around atan in tinyexpr.c since atan is not directly available
   (should idealy be mapped to atan(x)=atan2(x,1.0), will write issue to put in mccode-r)
2) Use GPU-compatible str_comp rather than strcmp in TRACE of the instr
   (There is a define for this that seems to not cover (all of) TRACE, should also go in mccode-r or cogen)
@willend
Copy link
Copy Markdown
Contributor Author

willend commented Apr 27, 2026

Tested functional for openacc on my office workstation with NVIDIA T600 GPUScreenshot 2026-04-27 at 20 38 27

@willend
Copy link
Copy Markdown
Contributor Author

willend commented Apr 27, 2026

@willend
Copy link
Copy Markdown
Contributor Author

willend commented Apr 27, 2026

Failing windows-test is non-conda mingw-gcc with mpi only:
Screenshot 2026-04-27 at 20 48 05

Corresponding conda-based is just fine:
Screenshot 2026-04-27 at 20 51 17

@willend willend merged commit 9e54f41 into mccode-dev:main Apr 27, 2026
15 of 16 checks passed
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