PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

static linking does not work for 32 bit?

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



Joined: 26 Jan 2006
Posts: 21
Location: Russia

PostPosted: Thu Apr 04, 2013 12:29 am    Post subject: static linking does not work for 32 bit? Reply with quote

Hello,

I am trying to build static 32-bit binary with pgfortan and see the following errors:

$ /opt/pgi/linux86/2013/bin/pgf95 -fastsse ax2test.f -Bstatic
/opt/pgi/linux86/13.2/lib/libpgmp.a(setaff.o): In function `_mp_setaff':
setaff.c:(.text+0xcf): undefined reference to `numa_available'
/opt/pgi/linux86/13.2/lib/libpgmp.a(setaff.o): In function `__pgi_nnodes':
setaff.c:(.text+0xf4): undefined reference to `numa_available'
setaff.c:(.text+0xfd): undefined reference to `numa_max_node'
/opt/pgi/linux86/13.2/lib/libpgmp.a(setaff.o): In function `_mp_malloc_local':
setaff.c:(.text+0x11b): undefined reference to `numa_available'
setaff.c:(.text+0x133): undefined reference to `numa_alloc_local

-fastsse is not a problem here, there are the same errors without it.

I supposed that it requires some threading librray (why?).

If I add -Mconcur flag the compilation completes successfully. In this case it is linked against libnuma.so (checked with -Wl,-t) . But if I specify this librray explicitly the same errors are reported:

$ /opt/pgi/linux86/2013/bin/pgf95 -fastsse test.f -Bstatic -lnuma
/opt/pgi/linux86/13.2/lib/libpgmp.a(setaff.o): In function `_mp_setaff':
setaff.c:(.text+0xcf): undefined reference to `numa_available'
/opt/pgi/linux86/13.2/lib/libpgmp.a(setaff.o): In function `__pgi_nnodes':
setaff.c:(.text+0xf4): undefined reference to `numa_available'
setaff.c:(.text+0xfd): undefined reference to `numa_max_node'
/opt/pgi/linux86/13.2/lib/libpgmp.a(setaff.o): In function `_mp_malloc_local':
setaff.c:(.text+0x11b): undefined reference to `numa_available'
setaff.c:(.text+0x133): undefined reference to `numa_alloc_local'

Am I doing something wrong?

Thank you in advance.
Alex
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Apr 04, 2013 8:06 am    Post subject: Reply with quote

Hi Alex,

Yes, libnuma, which we link in by default in order to support processor binding, doesn't have a static library available. The work arounds are to either not use libnuma (i,e, add either "-nomp" or "-mp=nonuma" to the link), or only statically link the PGI libraries (i.e. use "-Bstatic_pgi" instead of "-Bstatic").

Hope this helps,
Mat
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 © 2001, 2002 phpBB Group