[petsc-users] BuildSystem looks for libOpenCL.a

David Andrs andrsd at gmail.com
Tue Jun 25 17:38:27 CDT 2024


> On Jun 25, 2024, at 16:19, Barry Smith <bsmith at petsc.dev> wrote:
> 
> 
>    Did you have a problem with the install? 

Yes. See below.

> 
>    Are you concerned with self.liblist          = [['libOpenCL.a'], ['-framework opencl'], ['libOpenCL.lib']]   ?

Yes.

> 
>    Even though only the .a library is listed that should be a stand-in for both the static and shared library and it should automatically find the shared library for you.

I used `--with-opencl=1` and it did not find the .so. The complete configure line I used:

./configure --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --FOPTFLAGS=-O3 --with-debugging=0 --with-64-bit-indices --with-yaml=0 --with-hdf5=1 --with-hwloc=0 --with-mpi=1 --with-pthread=1 --with-shared-libraries --with-ssl=0 --with-scalapack=1 --with-exodusii=1 --with-netcdf=1 --with-pnetcdf=1 --download-ptscotch --with-metis=1 --with-parmetis=1 --with-hypre=1 --with-zlib=1 --with-x=0 --with-pic=1 --with-viennacl=1 --with-viennacl-dir=/home/andrsd/usr --prefix=/home/andrsd/usr --with-metis-dir=/home/andrsd/usr --with-hdf5-dir=/home/andrsd/usr --with-hypre-dir=/home/andrsd/usr --with-pnetcdf-dir=/home/andrsd/usr --with-blas-lib=blas --with-lapack-lib=lapack --with-scalapack-dir=/home/andrsd/usr --with-opencl=1

Attached is a configure.log.

David


> 
>    Barry
> 
> 
>> On Jun 25, 2024, at 6:10 PM, David Andrs <andrsd at gmail.com> wrote:
>> 
>> This Message Is From an External Sender 
>> This message came from outside your organization.
>> Hello!
>> 
>> Is there a reason why the PETSc build system looks for libOpenCL.a, but not for libOpenCL.so <https://urldefense.us/v3/__http://libOpenCL.so__;!!G_uCfscf7eWS!aUphnoqlYDmqiqau_zLjz7XYVRCrIS7jxMEPFgTLd1sLr9q23CNw_4oCjg_wtfFJ9P9SzlfKpcPjVmRbGNc$> on linux platforms? I have a machine with debian 12.5 and nvidia card. It has these packages installed:
>> 
>> cuda-opencl-12-5/unknown,now 12.5.39-1 amd64 [installed,automatic]
>> cuda-opencl-dev-12-5/unknown,now 12.5.39-1 amd64 [installed,automatic]
>> nvidia-libopencl1/unknown,now 555.42.02-1 amd64 [installed,automatic]
>> nvidia-opencl-common/unknown,now 555.42.02-1 amd64 [installed,automatic]
>> nvidia-opencl-icd/unknown,now 555.42.02-1 amd64 [installed,automatic]
>> opencl-c-headers/stable,now 3.0~2023.02.06-1 all [installed,automatic]
>> opencl-clhpp-headers/stable,now 3.0~2023.02.06-1 all [installed,automatic]
>> opencl-headers/stable,now 3.0~2023.02.06-1 all [installed]
>> 
>> It only has .so, but no .a
>> 
>> $ find /usr -iname 'libopencl*'
>> /usr/local/cuda-12.5/targets/x86_64-linux/lib/libOpenCL.so <https://urldefense.us/v3/__http://libopencl.so/__;!!G_uCfscf7eWS!fis2yLY1v2kQl5bz3hEn8m2jBq2Zfz75Rjul4mq1_niekM1xaL51ScJPJk_UpGeKg6p3oiI_fedBIDdAhWQ$ >.1.0.0
>> /usr/local/cuda-12.5/targets/x86_64-linux/lib/libOpenCL.so <https://urldefense.us/v3/__http://libopencl.so/__;!!G_uCfscf7eWS!fis2yLY1v2kQl5bz3hEn8m2jBq2Zfz75Rjul4mq1_niekM1xaL51ScJPJk_UpGeKg6p3oiI_fedBIDdAhWQ$ >.1
>> /usr/local/cuda-12.5/targets/x86_64-linux/lib/libOpenCL.so <https://urldefense.us/v3/__http://libopencl.so/__;!!G_uCfscf7eWS!fis2yLY1v2kQl5bz3hEn8m2jBq2Zfz75Rjul4mq1_niekM1xaL51ScJPJk_UpGeKg6p3oiI_fedBIDdAhWQ$ >
>> /usr/local/cuda-12.5/targets/x86_64-linux/lib/libOpenCL.so <https://urldefense.us/v3/__http://libopencl.so/__;!!G_uCfscf7eWS!fis2yLY1v2kQl5bz3hEn8m2jBq2Zfz75Rjul4mq1_niekM1xaL51ScJPJk_UpGeKg6p3oiI_fedBIDdAhWQ$ >.1.0
>> /usr/lib/x86_64-linux-gnu/libOpenCL.so <https://urldefense.us/v3/__http://libopencl.so/__;!!G_uCfscf7eWS!fis2yLY1v2kQl5bz3hEn8m2jBq2Zfz75Rjul4mq1_niekM1xaL51ScJPJk_UpGeKg6p3oiI_fedBIDdAhWQ$ >.1.0.0
>> /usr/lib/x86_64-linux-gnu/libOpenCL.so <https://urldefense.us/v3/__http://libopencl.so/__;!!G_uCfscf7eWS!fis2yLY1v2kQl5bz3hEn8m2jBq2Zfz75Rjul4mq1_niekM1xaL51ScJPJk_UpGeKg6p3oiI_fedBIDdAhWQ$ >.1
>> 
>> Are users supposed to use `--with-opencl-include=` and `--with-opencl-lib` switches in this case?
>> 
>> Thanks,
>> 
>> David
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240625/d791211a/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.tar.gz
Type: application/x-gzip
Size: 106944 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240625/d791211a/attachment-0001.gz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240625/d791211a/attachment-0003.html>


More information about the petsc-users mailing list