Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

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

Wiebke_T_
Beginner
4,044 Views

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?

0 Kudos
39 Replies
mecej4
Honored Contributor III
852 Views

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
0 Kudos
golnaz_f_
Beginner
852 Views

I didn't find CAMB_devel.exe.

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

0 Kudos
golnaz_f_
Beginner
852 Views

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.

0 Kudos
mecej4
Honored Contributor III
852 Views

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).

0 Kudos
golnaz_f_
Beginner
852 Views

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

0 Kudos
mecej4
Honored Contributor III
852 Views

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.

0 Kudos
golnaz_f_
Beginner
852 Views

What should I write incommand line arguments box?

0 Kudos
mecej4
Honored Contributor III
852 Views

golnaz f. wrote:

What should I write incommand line arguments box?

 params.ini

0 Kudos
golnaz_f_
Beginner
852 Views

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.

0 Kudos
SergeyKostrov
Valued Contributor II
852 Views
>>...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?
0 Kudos
golnaz_f_
Beginner
852 Views

No there is not. What should I do?

0 Kudos
SergeyKostrov
Valued Contributor II
852 Views
>>...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.
0 Kudos
golnaz_f_
Beginner
852 Views

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.

0 Kudos
TimP
Honored Contributor III
852 Views

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-documentation

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.

0 Kudos
golnaz_f_
Beginner
852 Views

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.) 

0 Kudos
mecej4
Honored Contributor III
852 Views

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.

0 Kudos
golnaz_f_
Beginner
852 Views

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."

0 Kudos
mecej4
Honored Contributor III
852 Views

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.

0 Kudos
Wiebke_T_
Beginner
852 Views

Referring to my original question again...

Again, the integration in Visual Studio 2012 does not find the libmmd.dll ("Cannot open file 'libmmd.dll').

I have now installed Parallel Studio 2016, and we are trying to use the Intel Compiler again... (every once in a while actually, but still can't use it for production.).

PATH=C:\ProgramData\Oracle\Java\javapath;%INTEL_DEV_REDIST%redist\intel64_win\mpirt;%INTEL_DEV_REDIST%redist\ia32_win\mpirt;%INTEL_DEV_REDIST%redist\intel64_win\compiler;%INTEL_DEV_REDIST%redist\ia32_win\compiler;C:\Windows\System32;d:\program files (x86)\r\r-3.1.1\bin;D:\Program Files\Java\jdk1.8.0_102\bin;D:\Program Files (x86)\apache-maven-3.2.3\bin;C:\Program Files\R\R-3.1.2\bin\x64;D:\Program Files (x86)\MiKTeX 2.8\miktex\bin;C:\Program Files (x86)\CMake 2.8\bin;%INTEL_DEV_REDIST%redist\ia32\compiler;%INTEL_DEV_REDIST%redist\intel64\compiler

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

I also tried to add other paths where I found libmmd - there seem to be a huge number of places where Parallel Studio has installed stuff, so I'm going to remove XE 2013 as a next step.

Any ideas, where I can find the correct libmmd library for Composer 2016 to make my program link with the 2016 intel linker?

 

0 Kudos
Reply