Analyzers
Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4963 Discussions

Advisor in a fortran project

dajum
Novice
1,378 Views

I'm using the latest version of oneAPI and trying to use advisor in the nqueens fortran project in WIndows VS2019.

Adding use advisor_annotate and a few calls like CALL annotate_site_begin("solve") as shown in the sample causes compiler and linker errors.  Is this not by default added to the environment? I added the include folder for C:\Program Files (x86)\Intel\oneAPI\advisor\2021.4.0\include\ia32 and that finds the module.  But the linker then fails to find the dlls.  Is there documentation somewhere that shows the expected way to do this?

TIA

Dave

0 Kudos
1 Solution
Ruslan_M_Intel
Employee
1,332 Views

Thanks for the feedback! Probably something like this will be much better

View solution in original post

0 Kudos
10 Replies
Ruslan_M_Intel
Employee
1,355 Views

There is no need to link any DLLs in your case. Could you please show compiler/linker error message?

0 Kudos
dajum
Novice
1,350 Views

THe include is /I"C:\Program Files (x86)\Intel\oneAPI\advisor\2021.4.0\include\ia32"

 

 

Build started...
1>------ Build started: Project: NQueens-Serial (IFORT), Configuration: Release Win32 ------
1>Compiling with Intel® Fortran Compiler Classic 2021.4.0 [IA-32]...
1>nq-serial.f90
1>Linking...
1>nq-serial.obj : error LNK2019: unresolved external symbol _ADVISOR_ANNOTATE_mp_ANNOTATE_SITE_BEGIN referenced in function _NQUEENS_ip_SOLVE
1>nq-serial.obj : error LNK2019: unresolved external symbol _ADVISOR_ANNOTATE_mp_ANNOTATE_ITERATION_TASK referenced in function _NQUEENS_ip_SOLVE
1>nq-serial.obj : error LNK2019: unresolved external symbol _ADVISOR_ANNOTATE_mp_ANNOTATE_SITE_END referenced in function _NQUEENS_ip_SOLVE
1>Release\NQueens-Serial.exe : fatal error LNK1120: 3 unresolved externals
1>
1>Build log written to "file://C:\IntelSamples\NQueens\NQueens-Serial\Release\BuildLog.htm"
1>NQueens-Serial - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0 Kudos
Ruslan_M_Intel
Employee
1,344 Views

I see. It seems you need either link static library (libadvisor.lib from lib32 directory) or add annotation source file into your project (advisor_annotate.f90 from include). 

0 Kudos
dajum
Novice
1,342 Views

Is this documented in the samples somewhere? I'd like to know why this is so hard to figure out when trying to follow the sample. Am I missing something somewhere?

Dave

0 Kudos
Ruslan_M_Intel
Employee
1,338 Views
0 Kudos
dajum
Novice
1,336 Views

yes thats the page I was following.  I just don't see an indication that suggests I should know that I have to add libadvisor.lib. It mentions includes, but this is all pretty vague.  The haystack it large and the needles are small.

Thanks for the help.

Dave

0 Kudos
Ruslan_M_Intel
Employee
1,333 Views

Thanks for the feedback! Probably something like this will be much better

0 Kudos
dajum
Novice
1,329 Views

  I know it is hard to keep documentation in synch with code updates.  I was trying to use VTune 2019 which just gave unhelpful error messages when run as was told it isn't supported, and to use oneAPI.  But the documentation is pretty far out of date for the samples when using oneAPI. The GUI has changed a lot, especially for advisor it appears.   It is really hard to figure this out without your support.  Thanks.

Dave

0 Kudos
AbhijeetJ_Intel
Moderator
1,289 Views

Hi,

Is your issue resolved? Please let us know if the issue still persists.


Regards

Abhijeet


0 Kudos
AbhijeetJ_Intel
Moderator
1,246 Views

Hi,

Glad to know that your issue is resolved.

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

Regards

Abhijeet


0 Kudos
Reply