# linker errors

**URL:** <https://forums.developer.nvidia.com/t/linker-errors/132493>\
**Category:** Legacy PGI Compilers (archived)\
**Created:** [July 22, 2011, 7:34pm UTC](https://forums.developer.nvidia.com/t/linker-errors/132493 "2011-07-22T19:34:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexVoss](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@AlexVoss](https://forums.developer.nvidia.com/u/AlexVoss)\
**Post date:** [July 22, 2011, 7:34pm UTC](https://forums.developer.nvidia.com/t/linker-errors/132493/1 "2011-07-22T19:34:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [July 22, 2011, 8:59pm UTC](https://forums.developer.nvidia.com/t/linker-errors/132493/2 "2011-07-22T20:59:25Z")

</div>

Hi Alex,

This looks like a compiler issue. .BSSnn is a reference to a static variable. In the past, this type of error means that the compiler got the symbol name wrong or due to optimization removed some variable in one spot but missed others. Can you please send an example of the code to PGI Customer Service ([trs@pgroup.com](mailto:trs@pgroup.com))? We’ll need a compiler engineer to look at the code and tell us what’s happening. We’ll also try to find a work around.

Note that we’re in the process of adding -mcmodel=medium support to CUDA Fortran.

Thanks,  
Mat

---

<div class="post-metadata">

**Author:** ![tull](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tull](https://forums.developer.nvidia.com/u/tull)\
**Post date:** [November 1, 2013, 11:20pm UTC](https://forums.developer.nvidia.com/t/linker-errors/132493/3 "2013-11-01T23:20:16Z")

</div>

This has been fixed in the current 13.10 release.

thanks,  
dave
