Skip to content

Commit 2dfddeb

Browse files
sophimaopcolberg
authored andcommitted
Update README to address issue where multiple runtime libraries get linked
1 parent 334bdb7 commit 2dfddeb

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ IntelⓇ FPGA RTE for OpenCL™ installed on your system:
188188
1. In the IntelⓇ FPGA SDK for OpenCL™ installation directory, source
189189
the initialization script (see [Running Unit Tests](#running-unit-tests)).
190190
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.
193194
194195
3. Compile your OpenCL host program with the OpenCL header files included from
195196
the runtime installation directory.
@@ -215,8 +216,9 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
215216
1. Download, build, and install the
216217
[OpenCL ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader).
217218
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.
220222
221223
3. Compile your OpenCL host program with the OpenCL header files included from
222224
the runtime installation directory.
@@ -233,3 +235,13 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
233235
```
234236
235237
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

Comments
 (0)