- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to build a project on VS2017 with OpenMP libraries. A minimal example of code is the following:
program checkOMP
use omp_lib
implicit none
integer :: num_threads
!integer, external :: omp_get_num_procs
num_threads = omp_get_num_procs()
if (num_threads > 2) then
call omp_set_num_threads(num_threads-1)
end if
write(*,*) 'Hello World'
read(*,*)
end program checkOMP
I am compiling it without issues using /Qopenmp. However, the linker throws errors about unresolved external symbols for the two omp_* procedures (LNK2019). The weird thing is that the exact same project, with the same properties, builds just fine with VS2015 on the same machine.
I tried explicitly adding the location of intel libraries to Project Properties -> Linker -> Additional Library Directories but without luck.
Do you think I am missing anything?
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess is that it already had the location, but not a reference to libiomp5md.lib . Try adding that to "Additional dependencies" in Linker > General.
Why not use /Qopenmp?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. It worked with your suggestion!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page