NERSC / hpcpp

MIT License
7 stars 3 forks source link

Apps using `repeat_n` fail to build with `-stdpar=multicore` #7

Closed mhaseeb123 closed 10 months ago

mhaseeb123 commented 10 months ago

hpcpp apps including both stencils fail to build when -stdpar=multicore (aka CMake -DSTDPAR=multicore). The build errors originate from the repeat_n.cuh file adapter from nvidia/stdexec.

Possible fixes:

  1. Quick (and temporary fix): Use compiler directives #if defined(USE_GPU) to disable code using repeat_n and provide alternative implementation
  2. Implement a repeat_n sender for CPU scheduler.
mhaseeb123 commented 10 months ago

PR #8 provides a temporary fix using compiler directives for now.

weilewei commented 10 months ago

opened a ticket on stdexec library: https://github.com/NVIDIA/stdexec/issues/1146

weilewei commented 10 months ago

Can you take a look at stdexec's response? https://github.com/NVIDIA/stdexec/issues/1146#issuecomment-1817786192 and see if we can use exec::repeat_effect_until, but that may mean we need two separate files for CPU and GPU codes (maybe?).