Intel® C++ STM Compiler Prototype Edition (Archived)

STM: Inlining of tm_waiver functions

Hi -

When using the default compiler optimization, it seems that the compiler is inlining functions which are supposed to be tm_waiver. Consider the following simple piece of code.

#include

int global;

__attribute__ ((tm_waiver)) void foo2() {
printf("foo2_start
");
global++;
printf("foo2_end
");
}

__attribute__ ((tm_callable)) void foo1() {
foo2();
}

main() {
__tm_atomic {
foo1();
}
}

STM Statistics

Hi -

My guess is that the current what-if release of the STM compiler/runtime does not provide any way of collecting transaction statistics such as read/write size, number of transactions commited/aborted, etc. Are you considering of providing this in the next what-if release?

thanks,

-Haris

Some syntactical issue

Hi,

Is it possible to end the transaction conditionally? I mean if a start the transaction by beginning the atomic block __tm_atomic, but I want to end the trannsaction based on some condition.

Consider a lock based code:
-------------------------------------
foo() {
LOCK(x)
..
..
if(...) {
UNLOCK(x);
return;
}
..
UNLOCK(x);
}
-------------------------------------

How could I achieve the same functionality using atomic blocks?

Thanks,
Neelam

Assembler errors

Hi,

While writing a transactional program (rather converting a lock based program to use transactions) I came across the following assembler error message:

/tmp/iccMEnLT9as_.s: Assembler messages:
/tmp/iccMEnLT9as_.s:48: Error: junk `@nonTXN' after expression

And I see a tons of them. But it isn't to informative for me to find out the reason for this error. Any help will be appreciated.

Thanks,
Neelam

C library compatible with Intel STM compiler

Hello,

I am not very sure if it's the appropriate place for posting this. I apologize if it's not.

I am looking for a C library for linux which is compatible with Intel STM compiler. I would like to make some Intel STM specific changes to the libabry and compile it using Intel compiler. I just tried taking a chance with glibc but don't think that's good option as it doesn't seem to compile with icc.

Any inputs will be helpful.

Thanks,
Neelam


STM: Simple program locks up when trying to commit a transaction

Hi -

The following simple program seems to lock up after trying to commit the transaction of thread_body_2 (you might see some transactions commited before locking up) Debugging with gdb reveals that the thread
blocks after trying to commit the transaction; STM goes through
STMTxnCommit -> commitCanComplete -> platformThreadYield ->
sched_yield

Any ideas why?

#include

#include
#include

#define NUM_THREADS 2 /* should be an even number */

void* thread_body_1(void* arg)
{

error while loading shared libraries:libitm.so

After i compiled the example intel_stmtest_hashtable.c successfully(no error message),


=> icc -Qtm_enabled -openmp intel_stmtest_hashtable.c -o hashtable


i trid to execute the program.


=>./hashtable 229 1000000 10000


I get thefollowing error message:


./hashtable: error while loading shared libraries: libitm.so: cannot open shared object file: No such file or directory


However, i find the libitm.so in the path:


intel/cc/10.0.504/lib/libitm.so


How can i overcome the problem?

STM Experiences

I did a test of Intel'sSTM using a test program I have used to experiment with multi-threading technology.



I was pretty impressed; Intel's STM handily outperforms our internal transactionalmulti-threadings support (which you could call STO, where O stands for Objects). In the test example, it also outperforms using explicit locks (which have to be applied very carefully to avoid deadlock).


CPU support for STM?

Are there any special hardware features that STM relies on to work or to be efficient? I am currently trying the STM compiler on my home desktop that runs on AMD Athlon and I'm seeing a large overhead. Would migrating to an Intel CPU provide a substancial reduction in the overhead?

Btw, will Intel be adding support for TM acceleration in future CPUs?

Dmitry

Subscribe to Intel® C++ STM Compiler Prototype Edition (Archived)