https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121247
Bug ID: 121247 Summary: -fopenmp and -fopenacc can not be used together on nvptx and g++. Nvidia's nvc++ can use both Product: gcc Version: 15.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: schulz.benjamin at googlemail dot com Target Milestone: --- OpenAcc is specializes for accellerators and has some statements for these devices that OpenMP does not have. OpenMP has good parallel computation on the host. An interesting idea would be to mix them. If you want to mix OpenMP and OpenAcc in gcc, you would need to pass both -fopenacc -fopenmp to gcc. G++ will then complain on nvptx : > nvptx mkoffload: severe error: either »-fopenacc« or »-fopenmp« must be > provided. Compilation ended. > lto-wrapper: severe error. Compilation ended. This is a bit strange, since both are handled by I think libgomp and nvptx... Nvidia's nvc++ can apparently use both OpenAcc and OpenMP together (in theory) and they recommend that. https://forums.developer.nvidia.com/t/openacc-and-omp/237191 (In practice, nvc++ of often complains it can not parallelize loops in OpenMP)