Hi,
So I’m trying to do some multi-gpu stuff and want to use OpenMP for the host code. (I’ve tried the multi-gpu examples using cutthread from the Linux SDK and am not too impressed). Anyway it turns out that the Windoze version of the SDK includes an OpenMP example… (why not Linux as well???)…
So I’m trying to build the Windoze example with the following Makefile:
[codebox]# Add source files here
EXECUTABLE := cudaOpenMP
CUDA source files (compiled with cudacc)
CUFILES := cudaOpenMP.cu
CUDACCFLAGS := -Xcompiler -openmp -lgomp -v
include …/…/common/common.mk[/codebox]
I used to get errors to the effect that “omp this or that” was unknown. Those have stopped now so I guess the necessary libraries are being found. Now I get a “cc1plus: error: output filename specified twice”. Here’s the full output:
[codebox]tim@stretch:~/cuda/active_projects/cudaOpenMP$ rm -r obj/; make
#$ SPACE=
#$ MODE=DEVICE
#$ HERE=/usr/local/cuda/bin
#$ THERE=/usr/local/cuda/bin
#$ TOP=/usr/local/cuda/bin/…
#$ LD_LIBRARY_PATH=/usr/local/cuda/bin/…/lib:/usr/local/cuda/bin/…/extools/lib:/usr/local/cuda/lib:/usr/lib/mpi/gcc/openmpi/lib
#$ PATH=/usr/local/cuda/bin/…/open64/bin:/usr/local/cuda/bin/…/bin:/usr/local/cuda/bin:/usr/lib/mpi/gcc/openmpi/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin
#$ INCLUDES=“-I/usr/local/cuda/bin/…/include” “-I/usr/local/cuda/bin/…/include/cudart”
#$ LIBRARIES= “-L/usr/local/cuda/bin/…/lib” -lcudart
#$ CUDAFE_FLAGS=
#$ OPENCC_FLAGS=
#$ PTXAS_FLAGS=
#$ gcc -D__CUDA_ARCH__=100 -E -x c++ -DCUDA_NO_SM_13_DOUBLE_INTRINSICS -DCUDA_NO_SM_12_ATOMIC_INTRINSICS -DCUDA_NO_SM_11_ATOMIC_INTRINSICS -DCUDA_FLOAT_MATH_FUNCTIONS “-I/usr/local/cuda/bin/…/include” “-I/usr/local/cuda/bin/…/include/cudart” -I. -D__CUDACC__ -C -fno-strict-aliasing -openmp -O3 -I"." -I"/usr/local/cuda/include" -I"…/…/common/inc" -D"UNIX" -include “cuda_runtime.h” -m32 -malign-double -o “/tmp/tmpxft_00001bff_00000000-4_cudaOpenMP.cpp1.ii” “cudaOpenMP.cu”
cc1plus: error: output filename specified twice
–error 0x100 –
make: *** [obj/release/cudaOpenMP.cu.o] Error 255
tim@stretch:~/cuda/active_projects/cudaOpenMP$
[/codebox]
Some reasonably artful googling of that error has not turned anything useful up so far. Can somebody please tell me how to compile CUDA apps containing OpenMP calls in the host side code. I beleive the flags I’m using are about right, but something else isn’t…
Any ideas, advice or experience shared would be most appreciated…