- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler Version: icc 16.0.0
Advisor XE Version: 2016
I've added annotations as per the documentation and the tutorials provided with the tools which as follows
use advisor_annotate call annotate_site_begin( "MySite1" ) call annotate_iteration_task( "MyTask1" ) call annotate_site_end
Compiling it as
mpiifort -O3 -g -I/opt/intel/advisor_xe/include/ -L/opt/intel/advisor_xe/lib64/ -ladvisor abcd.f90 -o abcd.out
But when I try to do this Compilation error occurs
abcd.f90: In function 'abcd_main: /home/Test/abcd/src/abcd.f90:undefined reference to 'advisor_annotate_mp_annotate_site_begin_' /home/Test/abcd/src/abcd.f90:undefined reference to 'advisor_annotate_mp_annotate_iteration_task_' /home/Test/abcd/src/abcd.f90:undefined reference to 'advisor_annotate_mp_annotate_site_end_' [abcd.out] Error 1
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to put your source file before the -ladvisor portion of your compile line. When linking static libraries, if a function is not needed at the time it is added to the link list, it isn't used. So the three functions (and everything else in libadvisor.a) will be discarded, because none of them are needed at link time. If you put your file first, the references it needs are known to the linker, and when those are found, they will be used.
![](/skins/images/238856F09F1FEB8FA73F480B45AA5991/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page