[Bug libgomp/98258] Can't compile programs for both OpenMP (CPU) + OpenACC (GPU)
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 4 21:42:03 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98258
--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
One possible solution is -foffload=-fno-openmp
Another possible solution is separate compilation and linking, with only
OpenACC enabled at link step (needs explicit -lgomp):
gfortran -fopenmp -fopenacc bug_omp_acc.f90 -c -o test.o
gfortran -fopenacc test.o -lgomp -o test.x
More information about the Gcc-bugs
mailing list