[OMPI users] Build Open-MPI without OpenCL support

2017-09-08 Thread Nilesh Kokane
Hello,

How can I compile openmpi without the support of open-cl?

The only link I could find is [1], but openmpi doesn't configure this
option.
The reason why I'm trying to build openmpi without open-cl is it throws the
following errors even with the nvidia installed opencl.


./mpicc -I/usr/local/cuda-8.0.61/lib64 -lcuda test_cuda_aware.c -o myapp
./mpicc: /usr/local/cuda-8.0.61/lib64/libOpenCL.so.1: no version
information available (required by /home/kokanen/opt/lib/libopen-pal.so.20)
/tmp/cc7KaPDe.o: In function `main':
test_cuda_aware.c:(.text+0x5b): undefined reference to `cudaMalloc'
test_cuda_aware.c:(.text+0xd3): undefined reference to `cudaFree'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetPlatformInfo@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetPlatformIDs@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetDeviceInfo@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetDeviceIDs@OPENCL_1.0'




[1]. https://www.open-mpi.org/projects/hwloc/doc/v1.7.2/a00014.php

-- 
Regards,
Nilesh Kokane
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] Build Open-MPI without OpenCL support

2017-09-08 Thread Nilesh Kokane
On Fri, Sep 8, 2017 at 3:33 PM, Gilles Gouaillardet
 wrote:
>
> Nilesh,
>
> Can you
> configure --without-nvidia ...
> And see if it helps ?

No, I need Nvidia cuda support.



//Nilesh Kokane
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] Build Open-MPI without OpenCL support

2017-09-08 Thread Nilesh Kokane
On Fri, Sep 8, 2017 at 4:08 PM, Nilesh Kokane  wrote:
> On Fri, Sep 8, 2017 at 3:33 PM, Gilles Gouaillardet
>  wrote:
>>
>> Nilesh,
>>
>> Can you
>> configure --without-nvidia ...
>> And see if it helps ?
>
> No, I need Nvidia cuda support.


Or else do you have a way to solve this open-cl errors?

./mpicc -I/usr/local/cuda-8.0.61/lib64 -lcuda test_cuda_aware.c -o myapp
./mpicc: /usr/local/cuda-8.0.61/lib64/libOpenCL.so.1: no version
information available (required by
/home/kokanen/opt/lib/libopen-pal.so.20)
/tmp/cc7KaPDe.o: In function `main':
test_cuda_aware.c:(.text+0x5b): undefined reference to `cudaMalloc'
test_cuda_aware.c:(.text+0xd3): undefined reference to `cudaFree'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetPlatformInfo@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetPlatformIDs@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetDeviceInfo@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetDeviceIDs@OPENCL_1.0'



Pointing to -L/usr/local/cuda-8.0.61/lib64 while compiling with mpicc
didn't help.

Any clues?


-- 
Regards,
Nilesh Kokane
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] Build Open-MPI without OpenCL support

2017-09-08 Thread Nilesh Kokane
On Fri, Sep 8, 2017 at 4:45 PM, Gilles Gouaillardet
 wrote:
> can you
> ./mpicc -showme -I/usr/local/cuda-8.0.61/lib64 -lcuda test_cuda_aware.c -o 
> myapp
> and double check -lcuda is *after* -lopen-pal ?

gcc -I/usr/local/cuda-8.0.61/lib64 -lcuda test_cuda_aware.c -o myapp
-I/home/kokanen/opt/include -pthread -Wl,-rpath
-Wl,/home/kokanen/opt/lib -Wl,--enable-new-dtags
-L/home/kokanen/opt/lib -lmpi


-- 
Regards,
Nilesh Kokane
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] Build Open-MPI without OpenCL support

2017-09-09 Thread Nilesh Kokane
On Fri, Sep 8, 2017 at 11:43 PM, Sylvain Jeaugey  wrote:
> To solve the undefined references to cudaMalloc and cudaFree, you need to
> link the CUDA runtime. So you should replace -lcuda by -lcudart.


If I compile with the following option:

./mpicc -I/usr/local/cuda-8.0.61/include -lOpenCL test_cuda_aware.c -o myapp

I get:
./mpicc: /usr/local/cuda-8.0.61/lib64/libOpenCL.so.1: no version
information available (required by
/home/kokanen/opt/lib/libopen-pal.so.20)
/tmp/cceiNnHc.o: In function `main':
test_cuda_aware.c:(.text+0x5b): undefined reference to `cudaMalloc'
test_cuda_aware.c:(.text+0xd3): undefined reference to `cudaFree'
collect2: error: ld returned 1 exit status

And the movement I try compiling giving the option /usr/local/cuda-8.0.61 :
 ./mpicc -I/usr/local/cuda-8.0.61/include -lOpenCL
-L/usr/local/cuda-8.0.61/lib64 -lcudart test_cuda_aware.c -o myapp

I get:
/tmp/cchauUBT.o: In function `main':
test_cuda_aware.c:(.text+0x5b): undefined reference to `cudaMalloc'
test_cuda_aware.c:(.text+0xd3): undefined reference to `cudaFree'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetPlatformInfo@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetPlatformIDs@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetDeviceInfo@OPENCL_1.0'
/home/kokanen/opt/lib/libopen-pal.so.20: undefined reference to
`clGetDeviceIDs@OPENCL_1.0'
collect2: error: ld returned 1 exit status

So my inference is if it tries to link the nvidia opencl this issue arises.
Also the application is not able to link the -lcudart. I back checked
and made sure that I have libcudart.

/usr/local/cuda-8.0.61/lib64/libcudart.so.8.0.61

any clue?

> For the OPENCL undefined references, I don't know where those are coming
> from ... could it be that hwloc is compiling OpenCL support but not adding
> -lOpenCL to the mpicc command, thus causing this issue ?

Could be.

> To work around the issue, I would try to uninstall the opencl libraries
> before recompiling Open MPI. Another way could be to add manually the OpenCL
> library with -lOpenCL.

Yes, if I dont give the option -L/usr/local/cuda-8.0.61 opencl linking
goes off as it links to the system one, but error like

test_cuda_aware.c:(.text+0x5b): undefined reference to `cudaMalloc'
test_cuda_aware.c:(.text+0xd3): undefined reference to `cudaFree'

giving -lcudart doesn't help.


-- 
Regards,
Nilesh Kokane
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users