- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to compile and run a very simple Hello world program using icpc. Nothing fancy, what I do is following,
#include <iostream>
using namespace std;
int main()
{
cout << " hello " << endl;
return 0;
}
~
I compile the above code using
icpc hello.cpp -o hh
compilation works just fine but when I try to run this I get "segmentation fault" I am not sure what is causing this error. Could anyone please help trouble shoot this.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide dump file?I suppose that you are using Linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please provide the icc and gcc's version ,and which operating system are you using? and what's the output of 'ulimit -s'?
Thank you.
--
QIAOMIN.Q
Intel Developer Support
User forums: http://software.intel.com/en-us/forums/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>> I get "segmentation fault" I am not sure what is causing this error>>>
By inspecting your code I suppose that possible "candidate" for segfault error could be hello string.One of the reason could be unbalanced stack when the push offset hello instruction generates segfault.Without the seeing the disassembly it is just speculation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i have your simple, sample program compile under openSUSE Factory ( Version 13.2 ) with
the Intel Parallel Studio XE Sp1 for Linux ( 64 Bit )
no problems, the same under openSUSE 12.3 and openSUSE 13.1
regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On the other hand the segfault could have originated inside cout object code.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page