Dear all,
I have a Fortran program (not my own code) that I want to modify so that it uses a GPU. I can compile and run it ok on the host CPU but then I try to compile for GPU I get linker errors:
pgfortran -m64 -ta=nvidia -Mcuda=4.0,cc20 -o evolve evolve.f90
/tmp/pgfortransh6f23izZ3Nk.o: In function ..cuda_fortran_constructor_1': /home/avoss/./evolve.f90:410: undefined reference to step_’
/tmp/pgfortransh6f23izZ3Nk.o: In function filter': /home/avoss/./evolve.f90:664: undefined reference to .BSS14’
/home/avoss/./evolve.f90:665: undefined reference to .BSS14' /home/avoss/./evolve.f90:666: undefined reference to .BSS14’
/home/avoss/./evolve.f90:666: undefined reference to .BSS14' /home/avoss/./evolve.f90:667: undefined reference to .BSS14’
/tmp/pgfortransh6f23izZ3Nk.o:/home/avoss/./evolve.f90:667: more undefined references to `.BSS14’ follow
Can anyone give me a hint as to what is going on? I had some problems earlier with the -mcmodel=medium option leading to libcublas not being linked ok, so I introduced allocatable arrays into the code so I can change to the normal memory model. Not sure what is going on now though.
When I comment out the !$acc directives the code compiles, links and runs ok with the same invocation of pgfortran.
Cheers,
Alex