Skip to content

Commit

Permalink
Update README to address issue where multiple runtime libraries get l…
Browse files Browse the repository at this point in the history
…inked
  • Loading branch information
sophimao authored and pcolberg committed Oct 15, 2022
1 parent 334bdb7 commit 2dfddeb
Showing 1 changed file with 16 additions and 4 deletions.
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

- 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

0 comments on commit 2dfddeb

Please # to comment.