Channels ▼

Jack Woehr

Dr. Dobb's Bloggers

Open Sourcer Explores Intel MulticoreTools on Windows, Barely Lives to Tell Tale

February 28, 2009

An inveterate open-sourcer, I'm making an uneasy peace with Microsoft Windows for the purpose of exploring the tools Intel has made available for parallelization of applications running on multicore platforms. I have used and verbally abused Windows in every release since Windows 2.1. Thus I am no stranger, but Windows has not been a C/C++ development environment for me since the 1990's, though I test and run my Java stuff on Windows.

So, d'oh, of course I'm looking for the simplest way to do this ... [article updated at end]1. Starting with a Windows XP SP2 dual-core machine with no toolchain, my first step was to download and install the Mozilla SeaMonkey web browser and the Cygwin GNU toolchain. Rationale: I need a full-featured web environment and Unix commands, especially ssh, for getting any real development work done. I also download the Java SDK in order to run JEdit which is currently my favorite non-IDE editor for C/C++.

2. Next I downloaded the Microsoft Windows SDK for XP which is the operating system I'm using. The SDK is the link between any compiler and the Windows OS.

3. Then it was time to download and install the Intel Compiler Suite for Windows. While the Windows SDK is mandatory to install this toolchain, Micrsoft Visual Studio (which I don't have installed) is optional. The install completed without error.

This all took about two hours. So far so good.

Then I eagerly drilled down to the first sample I could find, and started a compile, per the "Getting Started" HTML docs provided with compiler.

C:\Program Files\Intel\Compiler\11.0\072\cpp\Samples\C++\intrinsic_samples>icl intrin_dot_sample.c Intel(R) C++ Compiler Professional for applications running on IA-32, Version 11.0 Build 20090131 Package ID: w_cproc_p_11.0.072 Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

icl: warning #10114: Microsoft Visual C++ not found in path intrin_dot_sample.c intrin_dot_sample.c(40): catastrophic error: could not open source file "stdio.h" #include ^

compilation aborted for intrin_dot_sample.c (code 4)

Hmm. C:\Program Files\Microsoft Platform SDK\Include\crt\stdio.h is indeed there, but even though the Intel compiler install demanded during installation a full path to the SDK, accepted the path, composed and installed batch files to set up the environment, it didn't get things right.

Include=C:\Program Files\Intel\Compiler\11.0\072\cpp\ipp\ia32\include;C:\Program Files\Intel\Compiler\11.0\072\cpp\mkl\include;C:\Program Files\Intel\Compiler\11.0\072\cpp\Include;C:\Program Files\Microsoft Platform SDK\Include;

The culprit: stdio.h is in C:\Program Files\Microsoft Platform SDK\Include\crt . iclvars.bat installed by Intel calls the Microsoft Platform SDK's SetEnv.cmd which does not put the crt dir in the Include variable. After about a half-hour of wading through the BAT-spaghetti in SetEnv.cmd I gave up and added a global Include variable via MyComputer->Properties. After that the code compiles but then:

icl: error #10037: could not find 'link'

Found link.exe ... a couple of them ... in the SDK. And then:

C:\Program Files\Intel\Compiler\11.0\072\cpp\Samples\C++\intrinsic_samples>"\Program Files\Microsoft Platform SDK\Bin\win64\link.exe" intrin_dot_sample.obj Microsoft (R) Incremental Linker Version 8.00.40310.39 Copyright (C) Microsoft Corporation. All rights reserved.

LINK : fatal error LNK1104: cannot open file 'LIBC.lib'

Argh. It's the same old story, "If you don't buy all the shiny development tools we want to sell you, you're in for a world of hurt, son." In this case, it's Visual Studio integration or Good Luck.

I'm going to make this work until I can compile the TBB samples and I am NOT going to install Visual Studio! Grr!

Update:

Stephen Blair-Chappell, a technical consulting engineer for Intel Compiler Labs, kindly responded to the above and pointed out:

WRT using commandline tools without a Visual Studio installation, you'll only be able to achieve that on an Intel64 or an Itanium (IA64) based system . I believe the different possibilities\combinations are detailed in the release note of the intel compiler. For IA32 you must have visual studio installed.

This means that the statement ";While the Windows SDK is mandatory to install this toolchain, Micrsoft Visual Studio (which I don't have installed) is optional."; is not quite true for IA32 since it doesn't meet the minimum system requirements.

My response is that Windows packages installed via an Install program, as is the Intel compiler, bear the onus of warning the user when an installation is defective. The Install for the Intel compiler warned me that Visual Studio support was disabled, but assured me that comand line support would work if I could point to a Win SDK. This done, the install then completed and informed me untruthfully that I could now use the command line to compile programs.

As I said to the thoughtul Mr. Blair-Chappell, "Don't tell me. Tell the guy who wrote the installer!"

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video