| View previous topic :: View next topic |
| Author |
Message |
vibrantcascade
Joined: 04 Aug 2011 Posts: 28
|
Posted: Fri Mar 29, 2013 3:08 pm Post subject: static compile option? |
|
|
| 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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon Apr 01, 2013 8:41 am Post subject: |
|
|
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 |
|
 |
vibrantcascade
Joined: 04 Aug 2011 Posts: 28
|
Posted: Mon Apr 01, 2013 8:14 pm Post subject: |
|
|
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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Tue Apr 02, 2013 8:21 am Post subject: |
|
|
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 |
|
 |
|