greetings,
i am working on parallelizing a fortran code using both OpenMP and cusolver. Part of the code has been accelerated via OpenMP directives, and a matrix solution is performed using cusolverDN library thanks to C bindings of Fortran. The question is when i simply compile with:
pgfortran -mp -L/usr/local/cuda/lib64 -lcudart -lcusolver
the compilation aborts with the missing several GOMP functions error (like “/usr/local/cuda/lib64/libcusolver.so: undefined reference to `GOMP_critical_end’” and several others). However, when i compile with:
pgfortran -mp -lgomp -L/usr/local/cuda/lib64 -lcudart -lcusolver
the code works fine except that openMP libraries behave weird (kind of in confliction), such that the output of the following code:
!$OMP PARALLEL
!$ print*,omp_get_thread_num()
!$OMP END PARALLEL
turns out to be 0 for all the threads. Still, the solution is successful with good results. I guess cusolver was compiled with gnu compilers and gomp is the gnu openmp distribution, which seems to differ from the pgi’s openmp distribution. Is there a workaround other than compiling cusolver via pgi compiler (is it possible by the way. it is not open source, is it?) ?
thanks for the guidance