Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update README to address issue where multiple runtime libraries get linked #166

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ IntelⓇ FPGA RTE for OpenCL™ installed on your system:
1. In the IntelⓇ FPGA SDK for OpenCL™ installation directory, source
the initialization script (see [Running Unit Tests](#running-unit-tests)).

2. Update the `/etc/OpenCL/vendors/Altera.icd` file with the full path
to the `libalteracl.so` library in the runtime installation directory.
2. Update the `/etc/OpenCL/vendors/Altera.icd` file with either the filename
`libalteracl.so` if `LD_LIBRARY_PATH` contains the full path of the runtime
installation directory; otherwise, the full path of `libalteracl.so` itself.

3. Compile your OpenCL host program with the OpenCL header files included from
the runtime installation directory.
Expand All @@ -215,8 +216,9 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
1. Download, build, and install the
[OpenCL ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader).

2. Create the `/etc/OpenCL/vendors/Altera.icd` file with the full path
to the `libalteracl.so` library in the runtime installation directory.
2. Create the `/etc/OpenCL/vendors/Altera.icd` file with either the filename
`libalteracl.so` if `LD_LIBRARY_PATH` contains the full path of the runtime
installation directory; otherwise, the full path of `libalteracl.so` itself.

3. Compile your OpenCL host program with the OpenCL header files included from
the runtime installation directory.
Expand All @@ -233,3 +235,13 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
```

6. Run your OpenCL host program.

### Notes
pcolberg marked this conversation as resolved.
Show resolved Hide resolved

- When setting the environment variable [`OCL_ICD_FILENAMES`] for debugging,
ensure it doesn't resolve to any `libalteracl.so` other than the one
specified in the `/etc/OpenCL/vendors/Altera.icd` file. Mismatches may
lead to multiple runtime library instances being linked into the program,
causing undefined behaviour.

[`OCL_ICD_FILENAMES`]: https://github.com/KhronosGroup/OpenCL-ICD-Loader/blob/c5a6e013ad7c8b379fc94e3c849aa3396900a63c/README.md#table-of-debug-environment-variables