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
77 stars 54 forks source link

Work on offloading to GPU using gcc/OpenACC #1122

Open willend opened 3 years ago

willend commented 3 years ago

Something along the lines of gcc -fopenmp -foffload=-lm -foffload=-latomic -DOPENACC BNL_H8.c -lm

seems to at least provide a compiled binary using gcc 10.

Investigate further. Original and edited BNL_H8.c codes here:

BNL_H8_orig.c.TXT BNL_H8.c.TXT

willend commented 3 years ago

https://gcc.gnu.org/wiki/Offloading#Compilation_process to educate ourselves, try with simple non-mcstas code first