PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

static compile option?

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



Joined: 04 Aug 2011
Posts: 28

PostPosted: Fri Mar 29, 2013 3:08 pm    Post subject: static compile option? Reply with quote

Anyone know the static compile option for pgfortran? I've tried -static and -Mstatic and neither works. And I'm not seeing much in "man pgfortran" as of yet as I search through it.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Apr 01, 2013 8:41 am    Post subject: Reply with quote

Linux or Windows?

This is the man page from Linux:
Quote:
-Bstatic
(Linux only) Passed to the linker to specify static binding.

-Bstatic_pgi
(Linux only) Statically link in the PGI libraries, while using dynamic linking for the system libraries; implies -Mnorpath.


- Mat
Back to top
View user's profile
vibrantcascade



Joined: 04 Aug 2011
Posts: 28

PostPosted: Mon Apr 01, 2013 8:14 pm    Post subject: Reply with quote

Thanks Mike!

One last question, I'm trying to make the static executable with cuda, but I'm getting the following error.

/usr/bin/ld: cannot find -lcudart

The thing is, there is no ld folder in /usr/bin/ that I can find under redhat enterprise 6.

This doesn't appear to be a library I can install with yum either. So I tried taking all of the 32 and 64 bit cuda libraries like libcudart.so.4 and putting them into a folder then using the -L command like below, but that doesn't seem to do much either.

pgfortran -Mcuda -Bstatic -L/home/leiderml/cudart/64bit -L/home/leiderml/cudart/32bit i4fiveCase8Cuda.o ibe25CudaF.f

I know the cudart files are all in the pgi install folder as well under the 2012 folder. So I'm not sure what to do to fix this as all of these errors I find on google seem to involve running yum or apt-get install. And this error only happens when I try to make a static executable, I can make and run non-static cuda code no problem.

Any recommendations?

Thanks!
Morgan
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Apr 02, 2013 8:21 am    Post subject: Reply with quote

Hi Morgan,

Unfortunately, NVIDIA doesn't ship a static version of the CUDA runtime library. You can use "-Bstatic_pgi" to statically link the PGI libraries, but you'll need to dynamically link cudart.

- 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