- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm creating some Fortran dlls and want them to be independent. I was able to remove the dependency on libcoremd.dll and libmmd.dll by setting "Multithread" in "Runtime Library" option. However, I couldn't get rid of thedependency on libguide40.dll using this setting. I tried to link libguide40 statically by setting"Linker/General/Additional Library Directories/libguide40.lib path"and "Linker/Input/Additional Dependencies/libguide40.lib". Unfortunately, I still got unresolved externals (error LNK2019: unresolved external symbol ___kmpc_global_thread_num referenced in ...) when compiling the dll.Was I missing something here? Thanks. Dinh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/Qparallel /heap-arrays0 /fpp /recursive /reentrancy:threaded
/warn:declarations /warn:unused /real_size:64 /module:"Release\" /object:"Release\" /libs:static /threads /c
... and here's my Linker/Command Line/All Options:
/OUT:"C:\MyDlls\SpProp.dll" /NOLOGO /MANIFEST /MANIFESTFILE:"C:\MyDlls\SpProp.dll.intermediate.manifest"
/SUBSYSTEM:WINDOWS /IMPLIB:"C:\MyDlls\SpProp.lib" /DLL libiomp5md.lib
The compiler successfully created the SpProp.dll. However, when I used Dependency Walker to check it, I saw the LIBIOMP5MD.DLL listed as its dependency. Then I tried /Qopenmp-link:static as you suggested, I got this warning "warning #10006: ignoring unknown option 'Qopenmp-link:static'". It didn't seem my compiler supporting this option. I'm using Intel Fortran 11.1.067. It's strange since I did see this option listed in the User and Reference Guides. I also saw that performing static link to the OpenMP libraries is not recommended. Please help. Thanks. Dinh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried it with an 11.1.067 installation, and it was accepted.
And, yes, finally, it is true that it is not recommended that the OpenMP libraries be linked statically. As it was described to me, there is the *potential* for threads not to be able to share essential data.
Are you guaranteed to have problems? No.
That's why it is just "not recommended" instead of "not allowed".
-- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't get it. I have two machines with the Intel Fortran compiler. One has both 11.1.066 and 11.1.067, and the other has only 11.1.067. The onewith twoversions didn't recognized the /Qopenmp-static:link option. The one with only 11.0.067 did recognize the option. However, the dependency of the the Debug version and Release version of the dll created on this machine (only 11.0.067)are different. Using Dependency Walker, I can see that theDebug version didn't need Intel Fortran library but the Release version still needed libguide40.dll.
I tested these dlls (using static linking) and they didn't seem to produce the correct results. Therefore, I have to stick with dynamic linking. Thank you all for your help! Dinh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're right. I mistyped the version. It should be 11.0.066. FYI, I have both 11.0.066 and 11.1.067 and both have 32-bit and 64-bit versions installed.
+ Output from 11.0.66:
1>------ Rebuild All started: Project: SpProp, Configuration: Debug Win32 ------
1>Deleting intermediate files and output files for project 'SpProp', configuration 'Debug|Win32'.
1>Compiling with Intel Fortran 11.0.066 [IA-32]...
... a long list of files ...
1>Compiling manifest to resources...
1>Microsoft Windows Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>Link: warning #10006: ignoring unknown option '/Qopenmp-link:static'
1>LINK : C:\AstroStds\V7_beta1_PostRelease\src\\DriverExamples\lib_Win32\SpProp.dll not found or not built by the last incremental link; performing full link
1> Creating library C:\AstroStds\V7_beta1_PostRelease\src\\DriverExamples\lib_Win32\SpProp.lib and object C:\AstroStds\V7_beta1_PostRelease\src\\DriverExamples\lib_Win32\SpProp.exp
1>Embedding manifest...
1>Performing Post-Build Event...
1>1 file(s) copied.
1>
1>Build log written to "file://C:\AstroStds\V7_beta1_PostRelease\src\FortranDlls\Projects\SpProp\Debug\BuildLog.htm"
1>SpProp - 0 error(s), 2 warning(s)
+ Output from 11.1.067:
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
1>------ Rebuild All started: Project: SpProp, Configuration: Debug Win32 ------
1>Deleting intermediate files and output files for project 'SpProp', configuration 'Debug|Win32'.
1>Compiling with Intel Visual Fortran 11.1.067 [IA-32]...
... a long list of files here ...
1>Compiling manifest to resources...
1>Microsoft Windows Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>Link: warning #10006: ignoring unknown option '/Qopenmp-link:static'
1>LINK : C:\AstroStds\V7_beta1_PostRelease\src\\DriverExamples\lib_Win32\SpProp.dll not found or not built by the last incremental link; performing full link
1> Creating library C:\AstroStds\V7_beta1_PostRelease\src\\DriverExamples\lib_Win32\SpProp.lib and object C:\AstroStds\V7_beta1_PostRelease\src\\DriverExamples\lib_Win32\SpProp.exp
1>Embedding manifest...
1>Performing Post-Build Event...
1>1 file(s) copied.
1>
1>Build log written to "file://C:\AstroStds\V7_beta1_PostRelease\src\FortranDlls\Projects\SpProp\Debug\BuildLog.htm"
1>SpProp - 0 error(s), 2 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I don't use the command line version but I think the output from VS 2008 also gives the information you need. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page