| Last Modified On : | October 15, 2008 2:33 PM PDT |
Rate |
|
Updates for 3.0
Intel® C++ STM Compiler, Prototype Edition 3.0 for IA-32 (Windows* and Linux*) and Intel®64 (Windows* and Linux*)
1st-class language extensions for transactions
Based on the latest production Intel® C/C++ compiler 11.0
TM support for C++
What is new in Prototype Edition 3.0?
Specification for the Intel® compiler-Runtime TM ABI 1.0.1
Download from whatif.intel.com
Document Number: 318215-002US
Overview
System Requirements
Installation Notes
Documentation
Known Limitations
Technical Support
Troubleshooting
Disclaimer and Legal Information
The Intel® C++ STM Compiler Prototype Edition 2.0 implements unbounded Software Transactional Memory (STM), supporting:
The STM run-time library implements a weakly-atomic transactional memory system for native C/C++ code compiled by the Intel® C++ STM Compiler Prototype Edition 2.0. The STM system guarantees read-consistency, granularity safety and privatization safety. The Intel® C++ STM Compiler Prototype Edition 2.0 can co-exist with other Intel® C++ Compilers installed on your system.
The Intel® C++ STM Compiler Prototype Edition 2.0 currently supports the IA-32 and Intel® 64 architectures running a Microsoft Windows* or Linux* operating system. It has been built and tested in a Windows* XP* OS environment and Red Hat* Enterprise Linux* AS 4 (Nahant).
See the Installation Guide located at the product page for the Intel® C++ STM Compiler Prototype Edition 2.0, at WhatIf.intel.com.
Related documents include the Intel® C++ STM Compiler Prototype Edition 2.0 Language Extensions and User’s Guide.
If an explicit user abort (__tm_abort) statement is used inside a nested transaction where any of the containing transactions has serialized (due to a call to a __tm_unknown function or an un-annotated function), the abort will be treated as being illegal and cause a runtime error, when it should be permitted and caused an abort only of the transaction which contains it.
C++ Language extension support is documented in the Intel® C++ STM Compiler Prototype Edition 2.0 Language Extensions and User's Guide, which includes limitations. For example, creating threads insides the __tm_atomic sections is not supported in the Intel® C++ STM Compiler Prototype Edition 2.0.
This is the second release of the Intel® C++ STM Compiler Prototype Edition and the Run-Time Library with a set of new features, for both IA-32 and Intel® 64 platforms. This product may have as yet unknown issues and bugs.
Only dynamically linkable versions of the runtime library are supplied in this release.
The compiler returns errors when I use __tm_atomic. What is wrong?
You need to use the compiler option to enable TM support, which is Qtm_enabled.
The following example demonstrates how it is used:
// sample1.c: use __tm_atomic and __declspec(tm_callable)
#include
__declspec(tm_callable)
int foo(int c)
{
int i = 0;
for (i=0;
i<5; i++) {
if (i<4) {
b = b + c ;
}
a = b + 5;
}
return(b);
}
int fooa()
{
int c;
c = 5;
__tm_atomic {
c = c + foo(c);
}
return c;
}
int a = b = 0;
int main(int argc, char** argv)
{
int c = fooa();
if (a==25 & b == 20 & c == 25) {
printf("test passed ");
}
else {
printf("test failed ");
exit(1);
}
}
To enable compiler transactional memory support on simple1.c, run the following compiler command:
icl /Qtm_enabled simple1.c
Run simple1.exe
You will see the following report at run time:
Test passed
How do I use OpenMP with transactional memory?
//sample2.c -- sample code of using OpenMP, __tm_atomic and __declspec(tm_callable)
#include
int a;
__declspec(tm_callable)
static void bar(int c)
{
__tm_atomic {
a = a + c;
}
return;
}
static void foo(int c)
{
int i;
a = 0;
#pragma omp parallel for private(i) num_threads(4)
for (i=0; i<10; i++) {
bar(c);
}
#pragma omp parallel for private(i) num_threads(4)
for (i=0; i<10; i++) {
bar(c);
}
return;
}
int main()
{
foo(10);
if (a==200) {
printf("test passed ");
}
else {
printf("test failed ");
exit(1);
}
}
To enable the compiler transactional memory and OpenMP* support for sample2.c, run the following compiler command:
icl/Qtm_enabled/Qopenmp simple2.c
Run simple2.exe
You will see the following report at run time:
Test passed
How do I get performance statistics about my transactional code?
If you set the environment variable ITM_STATISTICS to one of the values “simple” or “verbose” and then run your code statistics about your code will be written to the file “itm.log”. This is described in more detail in the user manual.
The Intel® C++ STM Compiler Prototype Edition 2.0 is targeted for C++ transactional memory workload development and software transactional memory technology study and feedback.
The product support web site, WhatIf.intel.com provides a forum to discuss hot technical issues, frequently asked questions, product documentation, and product errata.
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.
Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.
The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's Web Site.
Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. See http://www.intel.com/products/processor_number for details.
This document contains information on products in the design phase of development.
BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino Atom, Centrino Atom Inside, Centrino Inside, Centrino logo, Core Inside, FlashFile, i960, InstantIP, Intel, Intel logo, Intel386, Intel486, IntelDX2, IntelDX4, IntelSX2, Intel Atom, Intel Atom Inside, Intel Core, Intel Inside, Intel Inside logo, Intel. Leap ahead., Intel. Leap ahead. logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv, Intel vPro, Intel XScale, Itanium, Itanium Inside, MCS, MMX, Oplus, OverDrive, PDCharm, Pentium, Pentium Inside, skoool, Sound Mark, The Journey Inside, Viiv Inside, vPro Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and other countries.
* Other names and brands may be claimed as the property of others.
Copyright (C) 2007-2008, Intel Corporation. All rights reserved.
