Problems compiling GeFREALIGN

Forums

I have problems compiling the GPU version of frealign on our system.

I updated the Makefile to the right gcc version, I tried it with gcc 3.4 and 4.3, but both will not work. When I use the nvcc string as provided in the Makefile (nvcc -arch sm_13 -lpthread --compiler-bindir /usr/bin/gcc) I get the following error:
gcc -O3 -DPROTOTYPE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o ioc.o ioc.c
ar r frealign_v8.a ioc.o
nvcc -arch sm_13 -lpthread --compiler-bindir /usr/bin/gcc -O3 -lg2c -lcufft -DPROTOTYPE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c a3d3_gpu.cu
/usr/include/surface_functions.h: In function 'void surf1Dread(T*, surface, int, int, cudaSurfaceBoundaryMode)':
/usr/include/surface_functions.h:100: error: there are no arguments to '__surf1Dreadc1' that depend on a template parameter, so a declaration of '__surf1Dreadc1' must be available
/usr/include/surface_functions.h:100: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/surface_functions.h:101: error: there are no arguments to '__surf1Dreads1' that depend on a template parameter, so a declaration of '__surf1Dreads1' must be available
/usr/include/surface_functions.h:102: error: there are no arguments to '__surf1Dreadu1' that depend on a template parameter, so a declaration of '__surf1Dreadu1' must be available
/usr/include/surface_functions.h:103: error: there are no arguments to '__surf1Dreadu2' that depend on a template parameter, so a declaration of '__surf1Dreadu2' must be available
/usr/include/surface_functions.h:104: error: there are no arguments to '__surf1Dreadu4' that depend on a template parameter, so a declaration of '__surf1Dreadu4' must be available
/usr/include/surface_functions.h: In function 'void surf2Dread(T*, surface, int, int, int, cudaSurfaceBoundaryMode)':
/usr/include/surface_functions.h:460: error: there are no arguments to '__surf2Dreadc1' that depend on a template parameter, so a declaration of '__surf2Dreadc1' must be available
/usr/include/surface_functions.h:461: error: there are no arguments to '__surf2Dreads1' that depend on a template parameter, so a declaration of '__surf2Dreads1' must be available
/usr/include/surface_functions.h:462: error: there are no arguments to '__surf2Dreadu1' that depend on a template parameter, so a declaration of '__surf2Dreadu1' must be available
/usr/include/surface_functions.h:463: error: there are no arguments to '__surf2Dreadu2' that depend on a template parameter, so a declaration of '__surf2Dreadu2' must be available
/usr/include/surface_functions.h:464: error: there are no arguments to '__surf2Dreadu4' that depend on a template parameter, so a declaration of '__surf2Dreadu4' must be available
make: *** [frealign_v8.a(a3d3_gpu.o)] Error 1

I found in a different support forum a solution for this error:
nvcc -arch sm_13 -lpthread --compiler-bindir /usr/bin/gcc --compiler-options -fpermissive

These options seems to fix the problem. But then I run into new error messages:
http://pastebin.com/GsdCvAB1 (I posted it on pastebin, since there are more then 1000 lines of code...)

COMP = gfortran

Maybe one problem could be, that I have to use the gfortran compiler instead of g77. I read on the internet, that this should work, but maybe someone has already experience with this compiler in this case.

Hope somebody has an idea.
Regards Mario

Do not use gcc4.3 and gfortran.
Does /usr/bin/gcc in nvcc string correspond to gcc3.4? If you have other version of gcc before installing a gcc3.4, the executable file of gcc3.4 is used to being /usr/bin/gcc34(and g++34) or other name depending on your system and installation.
The document of gfrotran always say it can compile g77 codes, but in my experiences it never works.

by the way, I don't know what is "--compiler-options -fpermissive". But it's better not to use it. This kind of compiler options often cause some strange problems.