Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1696 Discussions

How to run OpenMP programs with intel C++ compiler on Visual Studio

dhaval_shah
Beginner
1,037 Views
Hello,

This is Dhaval Shah. I am Master student at San Jose State University.

I am using Windows Vista. I installed Microsoft Visual Studio 2008 trial version. Then I installed Intel C++ compiler. I am able to create Intel C++ compiler project on Visual Studio. But, when I create OpenMP program and try to run it, I get the following warning messages:

Deleting intermediate files and output files for project 'openmptest1', configuration 'Debug|Win32'.
1>Compiling with Intel C++ 11.1.048 [IA-32]... (Intel C++ Environment)
1>stdafx.cpp
1>Compiling with Intel C++ 11.1.048 [IA-32]... (Intel C++ Environment)
1>openmptest1.cpp
1>.\openmptest1.cpp(15): warning #1786: function "scanf" (declared at line 306 of "c:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h") was declared "deprecated ("This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.") "
1> scanf("%d %d",&m,&n);
1> ^
1>
1>.\openmptest1.cpp(36): warning #1786: function "getch" (declared at line 145 of "c:\Program Files\Microsoft Visual Studio 9.0\VC\include\conio.h") was declared "deprecated ("The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.") "
1> getch();
1> ^
1>
1>.\openmptest1.cpp(44): warning #161: unrecognized #pragma
1> #pragma omp parallel for default(none) \
1> ^
1>
1>Compiling manifest to resources... (Microsoft VC++ Environment)
1>Microsoft Windows Resource Compiler Version 6.0.5724.0
1>
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1>Linking... (Intel C++ Environment)
1>xilink: executing 'link'
1>LINK : warning LNK4076: invalid incremental status file 'C:\Users\dhaval\Documents\Visual Studio 2008\Projects\openmptest1\Debug\openmptest1.ilk'; linking nonincrementally
1>Embedding manifest... (Microsoft VC++ Environment)
1>Microsoft Windows Resource Compiler Version 6.0.5724.0
1>
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1>xilink: executing 'link'
1>LINK : warning LNK4076: invalid incremental status file 'C:\Users\dhaval\Documents\Visual Studio 2008\Projects\openmptest1\Debug\openmptest1.ilk'; linking nonincrementally
1>Build log was saved at "file://C:\Users\dhaval\Documents\Visual Studio 2008\Projects\openmptest1\openmptest1\Debug\BuildLog.htm"
1>openmptest1 - 0 error(s), 5 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


Do I need to do extra setting on Visual Studio or I need to install anything else with it? Can you please guide me for that?


Also, I am trying to install Intel Thread Checker, It does not install anything. So, is it already available with the Intel C++ compiler? How can I use that?


Thank you.


Sincerely,

Dhaval Shah
0 Kudos
4 Replies
TimP
Honored Contributor III
1,037 Views
In spite of all the warnings, you received a success notification from your C++ build. If you want an OpenMP build from the VS GUI setup, you must go into C++ properties and turn on the OpenMP option for your project. Further discussion about the ICL compiler is more likely to get expert advice if you post on the C++ forum.
Thread Checker is not included in the ICL (Intel C++ compiler) installation. It should install Intel VTune performance analyzer, for which it is a plug-in. It offers both options to compile and link with -Qtcheck set, or to run by "dynamic instrumentation." Discussion of Thread Checker is appropriate on the VTune forum.
As several of us work close by your campus, it might be possible to arrange on-site presentations, should you and your instructors care to make arrangements.
0 Kudos
dhaval_shah
Beginner
1,037 Views
Quoting - tim18
In spite of all the warnings, you received a success notification from your C++ build. If you want an OpenMP build from the VS GUI setup, you must go into C++ properties and turn on the OpenMP option for your project. Further discussion about the ICL compiler is more likely to get expert advice if you post on the C++ forum.
Thread Checker is not included in the ICL (Intel C++ compiler) installation. It should install Intel VTune performance analyzer, for which it is a plug-in. It offers both options to compile and link with -Qtcheck set, or to run by "dynamic instrumentation." Discussion of Thread Checker is appropriate on the VTune forum.
As several of us work close by your campus, it might be possible to arrange on-site presentations, should you and your instructors care to make arrangements.
Thank you very much for your suggestions.

I changed the project property and I enabled the OpenMP support. So now I can run OpenMP program as well.

Installation of Thread Checker : I have downloaded Vtune Analyzer as well. When I click on exe file, it asks me for continue installation. Once I click on continue, it does not do anything. And installation terminates.

This same thing is happening with Thread Checker as well.

What should be the reason for that?
0 Kudos
mahmoudgalal1985
Beginner
1,037 Views
Quoting - tim18
In spite of all the warnings, you received a success notification from your C++ build. If you want an OpenMP build from the VS GUI setup, you must go into C++ properties and turn on the OpenMP option for your project. Further discussion about the ICL compiler is more likely to get expert advice if you post on the C++ forum.
Thread Checker is not included in the ICL (Intel C++ compiler) installation. It should install Intel VTune performance analyzer, for which it is a plug-in. It offers both options to compile and link with -Qtcheck set, or to run by "dynamic instrumentation." Discussion of Thread Checker is appropriate on the VTune forum.


Thank you
0 Kudos
michele-delsol
Beginner
1,037 Views


Dhaval - I'll respond on the Intel products for Windows.

Thread Checker - this is a stand alone product which plugs into VTune but can be run without VTune. From a commercial aspect, it is a distinct product not included in VTune nor Intel C++. It can be used with MS C++ and other languages.

VTune - also a standalone product. When you purchase it you also get Thread profiler but you must download them separately. Thread Profiler must be installed after VTune.

Intel C++ - includes MKL an IPP libraries andIntel parallel debugger but does not include VTune, nor Thead Profiler nor Thread Checker.

Hope this helps,
Michle

0 Kudos
Reply