PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

linker errors

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
AlexVoss



Joined: 18 Jul 2011
Posts: 1

PostPosted: Fri Jul 22, 2011 12:34 pm    Post subject: linker errors Reply with quote

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
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6129
Location: The Portland Group Inc.

PostPosted: Fri Jul 22, 2011 1:59 pm    Post subject: Reply with quote

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)? 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
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 438

PostPosted: Fri Nov 01, 2013 4:20 pm    Post subject: TPR 18053 - ACC - user forum example creates 'undefined refe Reply with quote

This has been fixed in the current 13.10 release.

thanks,
dave
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group