Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Naming shared libraries

Nikos_S_
Beginner
528 Views

Hello,

I am trying to adjust a large project for working on Xeon Phi with the offload model and I have a few questions.

1. My programs should be linked with some of many static libraries of hundreds of lines. I tried to built these libraries with the -offload-attribute-target=mic option to annotate my functions and variables for mic offloading, and then link them with xiar crs -qoffload-build option. Is it a reasonable approach or am I missing something?

2. My libraries have as separator the dot symbol "." and hence I encounter the following paradox: When xiar finds a library called "x.y.c" it builds to the "x.y.a" and "x.yMIC.a" as expected. But during the linking process, my programs are trying to be linked against the "xMIC.y.a" I guess because the linker is called with "-lstring" option in this example case with "-lx.y" and I get an error for the missing library. Is there something more clever that  I can do instead of manually renaming the missing libraries?

Thank you in advance,

Nikos

0 Kudos
2 Replies
Kevin_D_Intel
Employee
528 Views

Your action in #1 is reasonable assuming many of those routines/variables could participate in the offload execution. Any that would not are basically decorated unnecessarily costing unneeded compile time and bloating the partner MIC lib unnecessarily. If only a subset of functions/variables participate in the offload then it might be worth the effort to modify corresponding source files (one-time) to only decorate those participating in the offload, but I understand from what you described that may not be feasible.

I'm not sure what might be available for #2. I will create a mock-up to test with, see if there's any work around, and submit this to Development as a case we need to see how to support.

0 Kudos
Nikos_S_
Beginner
528 Views

Dear Kevin,

Thank you for the response. I will post any relevant updates here.

0 Kudos
Reply