@@ -188,8 +188,9 @@ IntelⓇ FPGA RTE for OpenCL™ installed on your system:
188
188
1. In the IntelⓇ FPGA SDK for OpenCL™ installation directory, source
189
189
the initialization script (see [Running Unit Tests](#running-unit-tests)).
190
190
191
- 2. Update the `/etc/OpenCL/vendors/Altera.icd` file with the full path
192
- to the `libalteracl.so` library in the runtime installation directory.
191
+ 2. Update the `/etc/OpenCL/vendors/Altera.icd` file with either the filename
192
+ `libalteracl.so` if `LD_LIBRARY_PATH` contains the full path of the runtime
193
+ installation directory; otherwise, the full path of `libalteracl.so` itself.
193
194
194
195
3. Compile your OpenCL host program with the OpenCL header files included from
195
196
the runtime installation directory.
@@ -215,8 +216,9 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
215
216
1. Download, build, and install the
216
217
[OpenCL ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader).
217
218
218
- 2. Create the `/etc/OpenCL/vendors/Altera.icd` file with the full path
219
- to the `libalteracl.so` library in the runtime installation directory.
219
+ 2. Create the `/etc/OpenCL/vendors/Altera.icd` file with either the filename
220
+ `libalteracl.so` if `LD_LIBRARY_PATH` contains the full path of the runtime
221
+ installation directory; otherwise, the full path of `libalteracl.so` itself.
220
222
221
223
3. Compile your OpenCL host program with the OpenCL header files included from
222
224
the runtime installation directory.
@@ -233,3 +235,13 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
233
235
```
234
236
235
237
6. Run your OpenCL host program.
238
+
239
+ ### Notes
240
+
241
+ - When setting the environment variable [`OCL_ICD_FILENAMES`] for debugging,
242
+ ensure it doesn't resolve to any `libalteracl.so` other than the one
243
+ specified in the `/etc/OpenCL/vendors/Altera.icd` file. Mismatches may
244
+ lead to multiple runtime library instances being linked into the program,
245
+ causing undefined behaviour.
246
+
247
+ [`OCL_ICD_FILENAMES`]: https://github.com/KhronosGroup/OpenCL-ICD-Loader/blob/c5a6e013ad7c8b379fc94e3c849aa3396900a63c/README.md#table-of-debug-environment-variables
0 commit comments