Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29257 Discussions

A Runtime Error R6034 in Fortran 9.0 library libmmd.dll

hmeng
Beginner
3,698 Views
In our codes Intel Fortran 9.0 library namelibmmd.dll is used. We observe a Runtime Error R6034 in some situations. I profile it with DependecyWalk and found:
 
 
libmmd.dll searches and loads the Microsoft Visual C++ runtime library at runtime. The search list is MSVCR80.dll, MSVCR71.dll and MSVCR70.dll.
 
 
The found runtime library depends on the Windows envrionment. The found one could be located in the same directory as our codes or system32 directory or in the directory specified in the env(PATH) variable.
 
If MSVCR80.dll of some specific versions is found there will be the runtime error when the codes in MSVCR80.dll tries to call a function named "IsProcessorFeaturePresent" in KERNEL32.DLL.
 
 
 
If no MSVCR80.dll is found in Windows it tries to find MSVCR71.dll.If MSVCR71.dll is found no such runtime error occurs.
 
 
My question is which version of MSVCR80.dll matches Intel Fortran 9.0 library?
 
Another question is whether Fortran library 9.0 can be integrated into the application built with Visual Stusion 2008?
 
The followings are part of the profile result:

 

LoadLibraryA("MSVCR80.DLL") called from "LIBMMD.DLL" at address 0x00CB7A8E.

Loaded "MSVCR80.DLL" at address 0x074D0000. Successfully hooked module.

DllMain(0x074D0000, DLL_PROCESS_ATTACH, 0x00000000) in "MSVCR80.DLL" called.

 

GetProcAddress(0x7C800000 [KERNEL32.DLL], "IsProcessorFeaturePresent") called from "MSVCR80.DLL" at address 0x074EA9AE and returned 0x7C80AE3A.

GetProcAddress(0x77C10000 [MSVCRT.DLL], "_set_error_mode") called from "MSVCR80.DLL" at address 0x074D4447 and returned 0x77C35348.

GetProcAddress(0x77C10000 [MSVCRT.DLL], "?set_terminate@@YAP6AXXZP6AXXZ@Z") called from "MSVCR80.DLL" at address 0x074D4463 and returned 0x77C22567.

GetProcAddress(0x77C10000 [MSVCRT.DLL], "_get_terminate") called from "MSVCR80.DLL" at address 0x074D447F and returned NULL. Error: The specified procedure could not be found (127).

GetProcAddress(0x7C800000 [KERNEL32.DLL], "FindActCtxSectionStringW") called from "MSVCR80.DLL" at address 0x074D1DBE and returned 0x7C82FD68.

LoadLibraryA("USER32.DLL") called from "MSVCR80.DLL" at address 0x074D96ED.

LoadLibraryA("USER32.DLL") returned 0x7E410000.

GetProcAddress(0x7E410000 [USER32.DLL], "MessageBoxA") called from "MSVCR80.DLL" at address 0x074D9705 and returned 0x7E45058A.

GetProcAddress(0x7E410000 [USER32.DLL], "GetActiveWindow") called from "MSVCR80.DLL" at address 0x074D9722 and returned 0x7E41D658.

 

0 Kudos
24 Replies
mecej4
Honored Contributor III
3,049 Views
Mixing incompatible DLL versions, whether done consciously or not, can lead to "DLL hell". The traceback of the call stack (that you display above) shows two versions of the MSVCRT being used: the older version, MSVCRT.DLL, and the newer version, MSVCR80.DLL.

Given that even two DLLs with the same name but different internal version numbers can cause no trouble, it is almost a given that linking against incompatible import libraries will cause trouble.

Each issue of the Intel compiler, along with the MS prerequisites, which may be included with the compiler distribution itself, provides a complete set of libraries to link against. If one's build process circumvents the use of these libraries and uses others, problems are to be expected.
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
Error R6034 is a MSVC runtime error saying that the DLL must be loaded with a manifest. As of VS2005 (MSVCR80), the Microsoft DLLs are supplied as shared assemblies with manifests, and you can't just load them directly.

If this was a general problem in LIBMMD I would expect to have seen this error many times before. Can you give more detail as to how your application is structured and exactly when you see this error R6034?

Intel Fortran 9.0 does not support VS2008.
0 Kudos
hmeng
Beginner
3,050 Views
Thank you Steve for you answers.
Our application is built with MS2008 with Fortran 9.0 library. Here are some details and some more questions.
I observed the LIBMMD.dll of 9.0 and found it seemed that the file was built with MS2005. It does not use a manifest while it searches and loads MSVCR file in runtime.
It seems that it has a search list: MSVCR80.dll, MSVCR71.dll and MSVCR70.dll. It tries to search and load a MSVCR file in the list but the found MSVCR file depends on the Windows.Could you let me know my understanding is correct or not?
In my host a MSVCR80.dll with internal version "8.0.50727.762" is found and load. The runtime error occurs and the message is popped out. MSVCR80.dll otherwise than this internal version has the runtime error but no message is popped out. I understand this is due to the mix of MSVCR files.
What worries me most is whether Fortran 11.0 works well with MS2008?
I observe the LIBMMD.dll versioned 11.0. It seems that its search list expands to MSVCR100.dll, MSVCR90.dll, MSVCR80.dll, MSVCR71.dll and MSVCR70.dll. MSVCR version in MS2008 is 9.0.
In further MSVCR100.dll is released and it could be found and returned by Windows. Will LIBMMD.dll versioned 11.0 loads MSVCR100.dll in this case? If so it will conflict with MSVCR90.dll.
Thank you very much!
0 Kudos
hmeng
Beginner
3,050 Views
Thank you for your information.
0 Kudos
mecej4
Honored Contributor III
3,050 Views
You wrote '.. the found MSVCR file depends on the Windows'. The reality is a little more complex, as you can find at http://msdn.microsoft.com/en-us/library/7d83bc18%28VS.80%29.aspx
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
Intel Fortran 11.0 (and 11.1) does support VS2008. Neither supports VS2010 (MSVCR100.dll)

I will ask the library developers about how (or if) LIBMMD finds the MSVC library, but if it does this it is not dependent on Windows version.
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
I was told that significant changes were made during the lifetime of 9.0 in the way that libmmd loads the MSVC libraries. All I can do at this point is suggest that 9.0 is unsupported and to use a newer version.
0 Kudos
hmeng
Beginner
3,050 Views
Thank you for your dll loading information.
0 Kudos
hmeng
Beginner
3,050 Views
Thank you Steve for your help.
Since Fortran 9.0 does not support MS2005 why does it try to search and load MSVCR80.dll?
The same question for Fortran 11.0. Since it supports VS2008 why MSVCR100.dll is in its search list?
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
I did not say that Fortran 9.0 didn't support VS2005 - I said it didn't support VS2008.

I can find no evidence that 11.0 looks for MSVCR100.DLL. Why do you think it does?
0 Kudos
hmeng
Beginner
3,050 Views
Steve, you did not say Fortran 9.0 does not support VS2005 to me. But I found it in a previous thread. I have attached the snapshot. It is highlighted with yellow color.

Fortran 9.0 does not support VS2005
I dumped LIBMMD.dll versioned 11.0 and found a similar DLL search list as that of version 9.0. MSVCR100.dll is in the search list. I suspect it tries to search and load MSVCR100.dll, just that in Fortran 9.0 LIBMMD.dll.
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
Ok - it is correct that 9.0 does not support VS2005. That was long ago enough that my memory faded. VS2005 support was added in 9.1.

How are you determining this "DLL search list"?
0 Kudos
hmeng
Beginner
3,050 Views
I found it by accident. There was a runtime error of my program which uses LIBMMD.DLL 9.0 on some hosts, but not on all hosts.
I traced and found LIBMMD.DLL 9.0 loads MSVCR80.DLL which resulted in the runtime error on some hosts. The runtime error does not happen if MSVCR80.DLL is not found and loaded. But in this case a MSVCR71.DLL is found and loaded. So I dumped the LBMMD.DLL and found some strings like:
"
MSVCR80.DLL
MSVCR71.DLL
MSVCR70.DLL
...
"
So I suspect that there is a MSVCR search list. LIBMMD.DLL tries to search and load the list item one by one.
I dumped LIBMMD.DLL 11.0 and found the search list is expanded to
"
MSVCR100.DLL
MSVCR90.DLL
MSVCR80.DLL
MSVCR71.DLL
MSVCR70.DLL
...
"
Could you let me know my understanding is correct or nor?
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
I don't see what you report. In the 11.0.075 LIBMMD.DLL, I see MSVCR80.DLL, MSVCR71.DLL, MSVCR70.DLL, MSVCR80D.DLL, MSVCR71D.DLL, MSVCR70D.DLL and MSVCRTD.DLL referenced. I find it very difficult to believe that the 11.0 DLL would make any reference to MSVCR90.DLL or MSVCR100.DLL, the latter of which did not exist when 11.0 was current.
0 Kudos
hmeng
Beginner
3,050 Views
Yes it's difficult to understand LIBMMD.DLL tries to load MSVCR80.DLL since it does not support VS2005.
Could you let me know why?
I dump LIBMMD.DLL 11.0 and found the similar statements:
MSVCR100.DLL
MSVCR90.DLL
MSVCR80.DLL
MSVCR71.DLL
MSVCR70.DLL
MSVCRT.DLL
MSVCR100D.DLL
MSVCR90D.DLL
MSVCR80D.DLL
MSVCR71D.DLL
MSVCR70D.DLL
MSVCRTD.DLL
I have attached the dumped file.
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
Please attach a ZIP of the DLL you are dumping. I don't see that with the 11.0 version I have. I do see that with the latest 11.1 DLL, however.
0 Kudos
hmeng
Beginner
3,050 Views
I have attached the LIBMMD.DLL and the dumped strings.
I am still interested in LIBMMD.DLL 9.0. Why does it search and load MSVCR80.DLL since it does not support VS2005?
0 Kudos
Steven_L_Intel1
Employee
3,050 Views
I can't explain why your copy of libmmd.dll has the string for MSVCR100.DLL in it - mine, supposedly from the same version, does not. Nor do I know why the 9.0 DLL has a reference to MSVCR80. But I can tell you that the 9.0 product did not support use with VS2005 and the 11.0 product did not support use with VS2010. Perhaps the LIBMMD developers were trying to "think ahead".

If you can reproduce an error using 11.1, let us know.
0 Kudos
lhli
Beginner
3,050 Views

1) Cana conclusion be made thatthe right libmmd.dll should be
Fortran9.0 - should not has a reference to MSVCR80.dll
Fortran11.0 - should not has a reference to MSVCR100.dll
?
2) Can an accurate answer be got from LIBMMD developers?

We have distributed a number of our tools to our customers using Fortran 9.0 and Fortran 11.0 and were reported from our customers about such errors, till now we have no solutions for them yet.

We really need your help to get solutions to our customers.


Do we need to file formal bugs through some other formal channels,instead of just the forum here?

Thank you very much for your cooperation

0 Kudos
Wendy_Doerner__Intel
Valued Contributor I
2,914 Views
Hi.

Steve is on vacation, so let me respond.

You can report issues to the forum (and even upload test cases) or you can file an issue at premier.intel.com.

Looking back through the thread it looks like at this point we need a test case with 11.1 (9.0 and 11.0 are no longer supported) to proceed. It sounds like Steve had checked with the developers and the referencing of libmmd.dll had changed since 9.0 so they could not comment on your question of referencing.


------

Wendy

Attaching or including files in a post

0 Kudos
Reply