Problem with Unified Binary on host without GPU

Hi

I am trying to run my OpenACC enriched binary on host w/ and w/o attached GPU using the Unified Binary approach. Using the following compile command line:
pgc++ -acc -mp -ta=nvidia,host -Bstatic_pgi main.C
on the host with attached GPU results in the following error when run on a host w/o attached GPU:
/main: error while loading shared libraries: libcudadevice.so: cannot open shared object file: No such file or directory
Doing ldd on main shows that the binary cannot find two libraries that ship with the PGI compiler despite having used -Bstatic_pgi:
ldd main
linux-vdso.so.1 => (0x00007fff64bfd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b5bbe49e000)
librt.so.1 => /lib64/librt.so.1 (0x00002b5bbe6bb000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b5bbe8c4000)
libcudadevice.so => not found
libpgatm.so => not found

libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b5bbed06000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00002b5bbef1d000)
libm.so.6 => /lib64/libm.so.6 (0x00002b5bbf233000)
libc.so.6 => /lib64/libc.so.6 (0x00002b5bbf4b6000)
/lib64/ld-linux-x86-64.so.2 (0x00002b5bbe280000)

In another post it is only mentioned that libcudadevice.so is missing and a ticket has been created to fix this in a future release. Will this also hold for libpgatm.so or will I always end up having to copy some libs over to non GPU hosts from the REDIST directory?

Cheers,
LS

Hi LS,

Apologies for this. We noticed the “libpgatm.so” issue a bit ago and corrected it in 15.3. “libcudadevice.so” was corrected in 15.7.

Here’s what I show using 15.7:

% pgc++ -acc test.c -ta=tesla,host -Bstatic_pgi -w -V15.7
% ldd a.out
        linux-vdso.so.1 =>  (0x00007fff5d0f6000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003d4a800000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003d55c00000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003d57000000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d4ac00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003d4a000000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003d4a400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003d49c00000)

Best Regards,
Mat

Hi Mat

We just upgraded to 15.7 and I could confirm that it works as expected now.
Thanks for fixing this.

Cheers,
LS