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?
THe include is /I"C:\Program Files (x86)\Intel\oneAPI\advisor\2021.4.0\include\ia32"
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.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>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 ==========
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?
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.
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.
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.