- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm new in using intel tsx so, please correct me on any terminological/conceptional mistake.
I'm trying to use RTM on a project. I have multiple code segments causing a transaction failure and I'm trying to address those issues one by one. I have the following code segment,
int result=-1;
unsigned status;
while(result!=1){
if ((status = _xbegin()) == _XBEGIN_STARTED) {
memcpy(private_plaintext,private_decrypt,986);
result=1;
_xend();
}else{
printf("Block 1: Transaction failed\n");
printf("status is %ld\n", status);
}
printf("Block 1: Result is %d\n", result);
}
that memcpy is causing transaction failure. I'm getting the following output,
.
.
.
Block 1: Transaction failed
status is 0
Block 1: Result is -1
.
.
Any help, why this is happening and how can I solve it?
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alam__Shariful,
Thank you for posting on the Intel® communities.
We are checking this thread and based on the details described we noticed that this seems to be related to the development of a software.
Based on that, we will move this thread to Software Products > Software Development Tools > Intel® C++ Compiler. However, there are several topics that you can choose based on your inquiry.
Regards,
Sebastian M
Intel Customer Support Technician
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Forwarding this thread to TSX subject matter experts(SMEs). They will get back to you soon.
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shariful,
What version of compiler are you using?
Regards,
Subarna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My compiler is: gcc version 7.1.0 (Ubuntu 7.1.0-10ubuntu1~16.04.york0)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens on your system when you change the copy length from 986 to 8?
If this succeeds, then I would suspect that you are exceeding an upper limit to the number of read/writes in the transaction. You could then increase the count until failure to figure out the capacity for your CPU.
If this fails, then experiment with commenting out the memcpy (IOW only set result=1).
If this fails, then I suspect RTM isn't enabled (and I do not know why you do not get illegal/unsupported instruction).
If this succeeds, then try replacing the memcpy with a for loop.
Please report your results.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shariful,
We are waiting for the results from you.
Regards,
Subarna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Closing this thread as there is no response from the customer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page