Visual Studio 2012 integration: libmmd.dll is not found at runtime

Visual Studio 2012 integration: libmmd.dll is not found at runtime

imagem de Wiebke T.

When I convert a small visual studio solution (built using cmake, not compiled with VS++ before) into a C++ compiler solution via the IDE ("use Intel C++"), compile, and I start the execuatble in the Visual Studio Debugger, libmmd.dll is not found: "The program can't start because libmmd.dll is missing from your computer. Try reinstalling the program to fix this problem."

The dll is present in 'Composer XE 2013\redist\intel64\compiler'. It is found when starting the same binary from the command line (without loading any iclvars or intel environment variables).

The project consists of a std c++ static library and an executable that uses the library. It runs fine when compiled with the visual studio compiler.

The problem occurs in Composer XE 2013 update 2, and update 5 (w_ccompxe_2013.5.198), with Visual Studio Professional 2012 Version 11.0.60315.01 Update 2. It happens in all configurations: Debug and Release, 32 and 64 bit.

Is there a fix available for this?

39 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Sergey Kostrov

>>The problem occurs in Composer XE 2013 update 2, and update 5 (w_ccompxe_2013.5.198), with Visual Studio
>>Professional 2012 Version 11.0.60315.01 Update 2. It happens in all configurations: Debug and Release,
>>32 and 64 bit.
>>
>>Is there a fix available for this?

Check PATH environment variable and paths, like:

[ ICCInstallDir ]\Composer XE\Redist\ia32\Compiler

and

[ ICCInstallDir ]\Composer XE\Redist\intel64\Compiler

need to be added.

imagem de Wiebke T.

Interesting:

%INTEL_DEV_REDIST%redist\intel64\compiler and %INTEL_DEV_REDIST%redist\ia32\compiler was added automatically by the installer. (That's the one for the public/non-developer redistribution, usually in C:\Program Files x86\Common Files\Intel)

When I analyze the exe in "depends.exe", it finds the library along that path. Why doesn't Visual Studio?

When I add the corresponding paths of the composer directory (<something>\Composer XE 2013\redist\intel64\compiler), it works from the VS debugger as well.

So this solves the problem. ....but does anyone know what causes this behavior?

imagem de Sergey Kostrov

>>...So this solves the problem. ....but does anyone know what causes this behavior?

It is Not clear why Intel C++ compiler installer did Not add these two paths to VS list of paths to libraries.

>>...INTEL_DEV_REDIST...

How a complete path looks like, for example for ia32?

imagem de Wiebke T.

>> How a complete path looks like, for example for ia32?

INTEL_DEV_REDIST=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\

So the complete path is 'C:\Program Files x86\Common Files\Intel\Shared Libraries\redist\ia32\compiler'

Oh, and thanks for the hint earlier.

imagem de Jennifer J. (Intel)

Was the VS2012 running when you install the Intel C++ Composer XE 2013?

So the original path contains "%INTEL_DEV_REDIST%redist\intel64\compiler" with "INTEL_DEV_REDIST" not expanded, right? do you have Windows 7 x64?

Jennifer

imagem de Sergey Kostrov

I just verified how all these paths look like in case of VS 2010 with command line integration of Intel C++ compiler version 12:

PATH=
...
C:\WorkLib\ICC2011\Composer XE 2011 SP1\bin\ia32
C:\WorkLib\ICC2011\Composer XE 2011 SP1\redist\ia32\compiler
C:\VS.2010\Common7\IDE\
c:\VS.2010\VC\BIN
C:\VS.2010\Common7\Tools
...
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
C:\WINDOWS\Microsoft.NET\Framework\v3.5
C:\VS.2010\VC\VCPackages
...
C:\WorkLib\ICC2011\Composer XE 2011 SP1\Ipp\..\redist\ia32\ipp
C:\WorkLib\ICC2011\Composer XE 2011 SP1\Ipp\..\redist\ia32\compiler
C:\WorkLib\ICC2011\Composer XE 2011 SP1\redist\ia32\mkl
C:\WorkLib\ICC2011\Composer XE 2011 SP1\redist\ia32\compiler
C:\WorkLib\ICC2011\Composer XE 2011 SP1\Tbb\bin\..\..\redist\ia32\tbb\vc10
C:\WorkLib\ICC2011\Composer XE 2011 SP1\Redist\Ia32\Tbb\Vc8
C:\WorkLib\ICC2011\Composer XE 2011 SP1\Redist\ia32\Ipp
C:\WorkLib\ICC2011\Composer XE 2011 SP1\Redist\Ia32\Mkl
C:\Program Files\Common Files\Intel\Shared Libraries\Redist\Ia32\Compiler
...
C:\WorkLib\ICC2011\Composer XE 2011 SP1\redist\ia32\mpirt
...

I hope it will be useful for you.

imagem de Wiebke T.

>> Was the VS2012 running when you install the Intel C++ Composer XE 2013?

Nope.

>> So the original path contains "%INTEL_DEV_REDIST%redist\intel64\compiler" with "INTEL_DEV_REDIST" not expanded, right? do you have Windows 7 x64?

Yes and yes.

imagem de Wiebke T.

>> I just verified how all these paths look like in case of VS 2010 with command line integration of Intel C++ compiler version 12:

Thank you, Sergey. Just adding the two composer xe paths already solved the problem.

I don't like to add the library directories into the path because different projects use different versions of those libraries. Also, when these are in the global path I wouldn't notice if one of our projects doesn't work properly because the target system might not have them installed globally. Under Windows, this whole library path business was solved kind of unsatisfactory, in my opinion.

imagem de Sergey Kostrov

>>...Under Windows, this whole library path business was solved kind of unsatisfactory, in my opinion.

It is possible that something went wrong with installation / integration of Intel C++ compiler. Regarding library paths I could give an example: on my primary system I have several Visual Studios installed. All of them work properly and there are no any library paths issues.

imagem de Wiebke T.

Hm, kind of Off-Topic now, but what I mean is that all library directories must be in a global path and it is a bit cumbersome/error-prone to work with multiple versions of the same DLL during development.

imagem de golnaz f.

how can i run a program in visual studio 2012 and where can i see its result. i installed intel visual fortran on visual studio and my program has been written with fortran90.

 

imagem de Sergey Kostrov

[ Debug Configuration ]

- Press Ctrl+F5 to build and execute a program
- Press F10 to build and start debugging a program

[ Release Configuration ]

- Press Ctrl+F5 to build and execute a program

imagem de golnaz f.

Hi, i want to run a program in visual studio2012. I installed it, then intel visual fortran coposer xe. my program wrote with fortran90. i tried to run it but i get some error i do not know what does that mean. can some one help me please. i attached the zip file i run tha cmbmain i do not know is it right. if some one help me to make it i will be realy grateful

Anexos: 

AnexoTamanho
Download camb.tar.gz379.18 KB
imagem de Wiebke T.

Um, golnaz, this is kind of off topic in this thread, why don't you make a new one? ^.^

imagem de mecej4

Quote:

golnaz f. wrote:

i tried to run it but i get some error i do not know what does that mean.

It is pointless to ask about the resolution of errors that have not been specified.

I was able to compile and run the two programs in your archive (tester and sigma8). They ran to completion in a few seconds and neither produced any error messages, either during compilation or execution.

MODERATORS: Please move the posts in this thread starting with Golnaz's first post, http://software.intel.com/en-us/comment/reply/401264/1750510  to the Intel Fortran Compiler for Windows forum as a new thread.

imagem de golnaz f.

Dear mecej4

very thanks for your answer as you said i ran (by ctrl+f5) the tester but i get the error " error #7002: Error in opening the compiled module file.  Check INCLUDE paths"." error #6683: A kind type parameter must be a compile-time constant. what is it can you help me pleaase.

imagem de mecej4

Error 7002 is a compile-time error, not a run time error. When you press Ctrl+F5 in the VS IDE, the current target is built if needed, and the error that you got is from that step. However, I do not see why that error occurred, since I am able to build the executable from your sources using either the command line or in the IDE.The output:

camb>VisualStudioRelease/CAMB_devel.exe params.ini
Reion redshift       =  10.698
Om_b h^2             =  0.022600
Om_c h^2             =  0.112000
Om_nu h^2            =  0.000000
Om_Lambda            =  0.725306
Om_K                 =  0.000000
Om_m (1-Om_K-Om_L)   =  0.274694
100 theta (CosmoMC)  =  1.037944
Reion opt depth      =  0.0900
Age of universe/GYr  =  13.794
zstar                =  1088.71
r_s(zstar)/Mpc       =  146.39
100*theta            =  1.038226
zdrag                =  1059.70
r_s(zdrag)/Mpc       =  149.02
k_D(zstar) Mpc       =  0.1392
100*theta_D          =  0.160034
z_EQ (if v_nu=1)     =  3216.24
100*theta_EQ         =  0.846430
tau_recomb/Mpc       =  284.87  tau_now/Mpc =  14384.7

To help me make further analysis of the problem, please post the log file of the failed build: in the Output window of Visual Studio, you will see a message similar to

     4>Build log written to  "file://S:\lang\camb\VisualStudio\Release\BuildLog.htm"

Save and post that file BuildLog.htm in your next reply.

I suggest that you not use the IPO option (implied by -fast) until you get things working, since multi-file IPO greatly increases program rebuild time.

imagem de golnaz f.

Dear mecej4

so much thanks for your answer, i am a biginner in this work and i am very sorry if my quastions are silly. let me say my work step by step. my path to run the program is: file, new, project, empty project in intel(R) visual fortran then ok., then right click on resource file select add and new item then fortran free-form file(.f90), add.e new page opens and i copied the tester or sigma8 in this page then ctrl+f5.

the buildlog.htm is in attachment.

thanks alot

 

 

Anexos: 

AnexoTamanho
Download new-folder.zip4.11 KB
imagem de mecej4

Now you have changed the project from that which you originally posted, but the problem is quite simple and the Error #7002 message pinpoints the problem. In your Source.f90 file, you have a use CAMB statement. The compiler, upon encountering this statement, looks for the module file "camb.mod",  but it does not find it. To remedy the situation, you must tell the Visual Studio IDE that the new project depends on the CAMBLib project, in the Solution->Properties->Common Properties->Project Dependencies panel. You had already done this configuration correctly for your CAMB project earlier.

Depending on the layout of your files, you may also add the subdirectory containing the *.mod files to the list of directories in which the compiler may look for include and module files, in the project settings, Fortran section,  for your new project.

imagem de golnaz f.

i am sorry but i did not get your aim correctly. where is solution. i have a solution in right of my page, rihgt click on it then properties, common properties, project dependencies. but what i have to do in this page. the page is not active. how thell it my project depends on the CAMBLib.

imagem de mecej4

Guiding development in the IDE using only text communication in this forum is not effective. Let us try a simpler and less error-prone approach.

  1. Go back to the files that you put into your uploaded file camb.tar.gz. above. 
  2. Build the executable CAMB_devel.exe, just to check (as I noted above, I could build it with no errors, and your project files are fine as-is). 
  3. Open the "CAMB_devel project->Source Files" folder. There is a single file, "inidriver.F90". Replace that with Source1.f90 
  4. Rebuild
imagem de golnaz f.

I didn't find CAMB_devel.exe.

But I found inidriver.F90. Now how can I replace it with Source1,f90?

imagem de golnaz f.

I found CAMB_devel.exe in Visual Studio, Debug. Would you please tell me the procedures step by step. I am not sure that I am opening and building correctly. Thanks a lot.

imagem de mecej4

Quote:

golnaz f. wrote:

 Would you please tell me the procedures step by step.

That is what the documentation is for, and please read through the appropriate sections. You may also find it worthwhile to learn how to build applications from the command line (I mention this since you posted a makefile).

imagem de golnaz f.

Dear mecej4

i could run the tester file. a black window is opened that said "no paramater input file" "press any key to continue" how can i see the out put you write above?

thanks

imagem de mecej4

Your program is designed to be run with one command line argument, such as params.ini. You have to specify the command line argument and working directory (or the project directory, by default) in the CAMB_devel->Properties->Debugging property page, and make sure that the file params.ini and the input data file HighLExtrapTemplate_lenspotentialCls.dat are available in that working directory, before running your program.

You will see the output in a child CMD.EXE window behind the IDE windows. You will also see a CMD window icon in the Windows taskbar.

imagem de golnaz f.

What should I write incommand line arguments box?

imagem de mecej4

Quote:

golnaz f. wrote:

What should I write incommand line arguments box?

 params.ini
imagem de golnaz f.

Let's go through my procedure with some figures in the attachment. I open visual studio 2012. Then I choose File->New->Project. The f1 window is opened. I choose OK. The f2 window is opened. Then I right-click on resource files and choose add->new item. The f3 is opened. Without any changes I choose Add and then Source1.f90 is opened like f4. Then I go through File->open->file and using "open file window" I go to where there is my CAMB folder and choose tester.f90 in it and then I open it. The f5 window is opened. I highlight all tester.f90, then copy and paste in Source1.f90.

Again in the CAMB folder I go to visual studio folder and open CAMB_devel. So a new microsoft visual studio page is opened. From the right panel and in "solution explorer" I choose the properties icon and the f6 is opened. At this window from the left panel I choose configuration properties->debugging and f7 is opened. At the right panel and in the action I see two items: Command Arguments and Working Directory. I fill in the first one: params.ini and in the second C:\users\golnaz\desktop\CAMB, then apply and OK. Now I come back to source1.f90 and ctrl+F5. But I see this error "unable to start program 'c:\users\golnaz\documents\visual studio 2012\projects\console33\console33\debug\console33.exe'. the system can not find the file specified". What is my mistake? Thanks.

Anexos: 

AnexoTamanho
Download images.zip341.07 KB
imagem de Sergey Kostrov

>>...I see this error "unable to start program 'c:\users\golnaz\documents\visual studio 2012\projects\console33\
>>console33\debug\console33.exe'. the system can not find the file specified". What is my mistake?..

Is that a correct path to the folder? Is there console33.exe in that folder?

imagem de golnaz f.

No there is not. What should I do?

imagem de Sergey Kostrov

>>...No there is not. What should I do?

Try to Build the project in that case and check for error messages in Output Window of the VS.

imagem de golnaz f.

There are 31 errors. The problem is that this is my first try in visual studio and visual fortran and I don't understand them. For example the first one is : Error 1  error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [CAMB] c:\users\golnaz\documents\visual studio 2012\Projects\Console34\Console34\Source1.f90 4  . I don't know what the module file is and what the INCLUDE paths are.

imagem de Tim Prince

As your questions are about Windows Fortran, the forum on that subject would be the right place to ask questions, after you have studied some documentation such as http://software.intel.com/en-us/articles/intel-fortran-composer-xe-2011-...

Some of the information in that tutorial should help you with C++ as well.

If you had an error in compiling to create a Fortran module, you may need to perform a full rebuild to see the first error messages.

imagem de golnaz f.

I think I could run the program. I open from CAMB_devel, after setting command line arguments and working directory, I opened for example tester.f90, then ctrl+F5 and I obtained the table that "mecej4" obtained in the above. Now I have a new question. I checked this for all .f90 files in this folder such as sigma8.f90 and cmbmain.f90 and always the results are the same as the previous table. Then what is the difference between these .f90 files? (I think I should obtain a graph from these files.) 

imagem de mecej4

The Visual Studio IDE allows any text files to be opened and edited, for the users' convenience. However, merely opening a program source file does not make that file a part of the current (or any) project -- you have to use the "Add Existing Item" feature and add the file yourself. Likewise, you must remove any source files already present in the project that you no longer wish to be compiled and linked in the current project. If you do not recognize this, you will find yourself opening any number of new source files, but the program is always going to run the last successfully compiled version of the program embodied in the current configuration.

You will benefit from reading the documentation on how to create, build and maintain projects in the VS IDE. Blindly modifying project configurations and running (using ctrl+F5) after accidentally successful builds will result in a lot of confusion and frustration.

imagem de golnaz f.

Dear guys can some one tell me what does this mean? "You can build the project from within Visual Studio, you don't need to use any command line tools."

imagem de mecej4

Quote:

Unknown wrote:You can build the project from within Visual Studio, you don't need to use any command line tools.
One could view this claim as the Blefescudian counterpart of the Liliputian version: "You can build the project entirely at the command line, you don't need any Visual Studio or other IDE". 


From a serious point of view, however, the question may be seen as relating to style of interaction and personal choice. Once one understands the details and mechanics of the build process, the differences in operation are revealed to be quite superficial. After all, the real (and complex) work is performed by the same tools such as the compiler proper (Mcpcom, Fortcom), linker, etc. Whether these tools are invoked with options specified in the command invocation or in options and configuration files, the result is the same. A century ago, similar controversies probably existed about choosing multi-pole rotary switches versus choosing arrays of push-button switches on electro-mechanical control panels.

Faça login para deixar um comentário.