I am trying to get running with the ATI Stream SDK 2.1 to compile a basic OpenCL application after working with OpenCL for a while on my Mac using Apple's implementation.
I am on a linux cluster running SUSE 10. I have the Intel icc version 11.0. When attempting to run make on the SDK sample applications, I get a linker error referencing the libOpenCL.so library, "File Format Not Recognized". ( I did have to manually update openclsdkdefs.mk to define CC and LD as icc.)
I saw an earlier similar post indicating that maybe a bug had to be fixed before icc would be supported. But this was before the SDK 2.1 release and the release notes indicate icc 11.x is supported.
I believe I followed the install instructions perfectly with exception for not being done with root access. I don't see why that's necessary.
Does anyone have any ideas for steps I can try? Has anyone been able to get the SDK working with icc for OpenCL work?
(btw, I get the same error message when I link using gcc, but I have gcc 4.1.2, so I assume that is not new enough and is reason for the error in this case)
reddell@service0:~/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples> make make -C opencl make: Entering directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl' make -C SDKUtil make: Entering directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/SDKUtil' install -D build/debug/x86_64/libSDKUtil.a ../../../TempSDKUtil/lib/x86_64/libSDKUtil.a make: Leaving directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/SDKUtil' make -C cl make: Entering directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/cl' make -C app make: Entering directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/cl/app' make -C AESEncryptDecrypt make: Entering directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/cl/app/AESEncryptDecrypt' Building build/debug/x86_64/AESEncryptDecrypt icc -o build/debug/x86_64/AESEncryptDecrypt build/debug/x86_64//AESEncryptDecrypt.o -lpthread -ldl -L/usr/X11R6/lib -lOpenCL -lSDKUtil -L../../../../../lib/x86_64 -L../../../../../TempSDKUtil/lib/x86_64 ../../../../../lib/x86_64/libOpenCL.so: file not recognized: File format not recognized make: *** [build/debug/x86_64/AESEncryptDecrypt] Error 1 make: Leaving directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/cl/app/AESEncryptDecrypt' make: *** [AESEncryptDecrypt] Error 2 make: Leaving directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/cl/app' make: *** [app] Error 2 make: Leaving directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl/cl' make: *** [cl] Error 2 make: Leaving directory `/mnt/export/home/reddell/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples/opencl' make: *** [opencl] Error 2 reddell@service0:~/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/samples> icc --version icc (ICC) 11.0 20081105 Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
Did you try running the pre-built libraries coming with the SDK? What is the behavior?
Could you do an ldd on your libOpenCL.so and post?
Secondly, you are using SUSE 10, which is an old and unsupported Linux flavor. This could also create issues.
I have attached the results of running ldd and also trying to execute the different versions of CLInfo binaries. I have problems there too, but I suspect something different. What could be causing the floating point exception?
Overnight I built gcc4.3.5. When attempting to compile using gcc 4.3.5 I get the exact same "libOpenCL.so: file not recognized: File format not recognized" error.
I am wondering if the same version of ld is being used no matter whether I am using gcc 4.1, gcc 4.3, or icc 11.0?
When I do ld --version I get this output:
GNU ld version 18.104.22.168.5 20051219 (SUSE Linux)
LDD on the 64-bit library: reddell@service0:~/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/lib/x86_64> ldd libOpenCL.so libdl.so.2 => /lib64/libdl.so.2 (0x00002abfc89aa000) librt.so.1 => /lib64/librt.so.1 (0x00002abfc8aae000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002abfc8bb7000) libm.so.6 => /lib64/libm.so.6 (0x00002abfc8db6000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002abfc8f0b000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002abfc9018000) libc.so.6 => /lib64/libc.so.6 (0x00002abfc9132000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) LDD on the 32-bit library: reddell@service0:~/AMD_Stream_SDK_2_1/ati-stream-sdk-v2.1-lnx64/lib/x86> ldd libOpenCL.so linux-gate.so.1 => (0xffffe000) libdl.so.2 => /lib/libdl.so.2 (0xeda1b000) librt.so.1 => /lib/librt.so.1 (0xeda12000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xed92e000) libm.so.6 => /lib/libm.so.6 (0xed909000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xed8fd000) libpthread.so.0 => /lib/libpthread.so.0 (0xed8e7000) libc.so.6 => /lib/libc.so.6 (0xed7ba000) /lib/ld-linux.so.2 (0x56555000) Running 64-bit CLInfo binary (same response for other 64-bit binaries) ./CLInfo Floating point exception (core dumped) Running 32-bit CLInfo binary: ./CLInfo ./CLInfo: error while loading shared libraries: libOpenCL.so: wrong ELF class: ELFCLASS64 Running 32-bit CLInfo binary after changing LD_LIBRARY_PATH to point to 32-bit library: ./CLInfo Floating point exception (core dumped)
I still haven't figured this one out. After trying to compile with gcc4.3.5 and icc 11.0 I get the same File format not recognized error from ld.
Does anyone know how to use a different ld? Or if my version 2.16 is sufficient?