Open joek93 opened 1 year ago
In fact, thinking better and in line with #40, one should indeed enable openmpFor
if the backend support is given. The THREADS_TYPE
does not fit the scheme of #40, as it forbids to run paralell loops on host if parallel loops are enabled on the device. The point is to have a flag which enable automatic parallelization of HOST_LOOP
with openmp threads (other backends might be available...), where DEVICE_LOOP
would be paralellized with Cuda, if that is available. If Cuda is not available, DEVICE_LOOP would be aliased to HOST_LOOP
.
Then, another flag is needed to specify the default memory space of Tensors
(and Field2
). At the moment this is all intermixed...
Please confirm that 46d906295c25ed4d890c84865c7da6c19235bccb fixes this
Just as the title says... it is simply a
./configure.ac
automatism, sinceAX_OPENMP
automatically definesHAVE_OPENMP
, which activates openmp threads in the code at preprocessing time in src/threads/threads.hpp.A possible solution would be to replace
#ifdef HAVE_OPENMP
with#if THREADS_TYPE == OPENMP_THREADS
in src/threads/threads.hpp