https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92311
--- Comment #7 from Nichols A. Romero <naromero at anl dot gov> --- (In reply to Jakub Jelinek from comment #5) > (In reply to Nichols A. Romero from comment #3) > > Created attachment 47156 [details] > > OpenMP equivalent to OpenACC detach/attach > > map(from:...) > means the variable is allocated, but uninitialized on the device, but you > are then reading the variables and expecting them to have meaningful values. > IMHO you want map(from:check_sign) and map(to:...) for the other variables. > Also, at least with GCC, for optimal performance when you offload to nvptx > (and would use some larger array, 100 iterations this simple certainly isn't > worth offloading), you want to use simd too, so target teams distribute > parallel for simd (or in OpenMP 5.0 just target teams loop). Jakub, You are right about those two errors on the map clauses. I will fix. Yes, I know that it too small and not worth offloading. My real goal is to have an OpenACC and OpenMP version side-by-side.