McStasMcXtrace / McCode

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.
https://github.com/McStasMcXtrace/McCode/wiki
GNU General Public License v3.0
78 stars 54 forks source link

Fractal SasView models (and potentially further ones) need -DUSE_CUDA in case of OPENACC #1501

Closed willend closed 2 months ago

willend commented 1 year ago

It works to add a small patch at the top of sas_kernel_header.c like this and attached:

#ifdef OPENACC
# define USE_CUDA
#endif

sas_kernel_header.c.txt

But perhaps we should do this at the McCode level instead? ... If there are no immediate side-effects? Alongside #include <accelmath.h> perhaps?

@farhi any point of view? @jorobledo discovered the symptoms and I found the underlying issue in sas_kernel_header.c

willend commented 1 year ago

I have investigated thoroughly, it is safe to add this at the other mccode-r.h defines GPU use

willend commented 1 year ago

mccode-r.h edit reverted in 707ce5f and moved to fractal comps since there were side-effects on non-fractals I the above commit