- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel has generously given me access to the Manycore Testing Lab to benchmark some C++11 algorithms for non-blocking shared memory read/write I developed, but unfortunately I could not get my software to compile therein (everything works just fine on my home PC using gcc 4.7.2).
I use the following C++11 features: std::function, thread, mutex, sleep_for, atomics. Compiling with Parallel Studio XE 2016 (as suggested to me by the MTL Team) I obtained the following errors:
- cannot open source file "cstdint"
- cannot open source file "thread"
- namespace "std" has no member "function"
I was able to solve issue 1 replacing <cstdint> with <stdint.h> but I could not overcome problem 2 and 3. I compiled with the -std=c++11 option (also tried -std=c++0x).
I'm sorry if I just missed some options and this is a silly problem. Can you help me?
Thanks!
- Tags:
- Parallel Computing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you haven't done so, take care that ld_library_path is consistent with your g++ path, so that it doesn't try to run with older libraries.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing you may have hoped that 'icc file.cpp' would switch automatically to icpc without you adding -x c++ or equivalent. A more specific example, of your compile command, preferably with a source file, should help. You would also want to check which g++ version is on path, as icpc uses g++ to find the headers.
Follow-up should probably be on the C++ forum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim P. wrote:
I'm guessing you may have hoped that 'icc file.cpp' would switch automatically to icpc without you adding -x c++ or equivalent. A more specific example, of your compile command, preferably with a source file, should help. You would also want to check which g++ version is on path, as icpc uses g++ to find the headers.
Follow-up should probably be on the C++ forum
Dear Tim, thanks for the reply. I was already using icpc but your comment has been nevertheless useful. I've just checked and the g++ version on the path was too old. I updated the path in order to have a newer one (4.4.3) and now it compiles fine. The build command I use is (after doing "source /opt/intel/bin/compilervars.sh intel64"):
icpc -D_GLIBCXX_USE_NANOSLEEP -Iinclude -std=c++11 -pthread test/main.cpp -o ART
You can find the source code here: https://github.com/fcvr1010/ART/tree/ARSS/ART
In particular, in test/main.cpp, I uncommented the first line of code, so basically my main is that contained in test/internal/NB_ARSS_1_Check.cpp
Unfortunately, when I try to run the resulting executable I obtain the following error:
/usr/lib64/libstdc++.so.6 : version 'GLIBCXX_3.4.11' not found
How can I solve this issue? Am I doing something terribly wrong? :-)
Ps. As you suggested, I will also post the question on the C++ forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you haven't done so, take care that ld_library_path is consistent with your g++ path, so that it doesn't try to run with older libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding problem #3
Did you include header file "functional" ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim P. wrote:
If you haven't done so, take care that ld_library_path is consistent with your g++ path, so that it doesn't try to run with older libraries.
How could I not have thought about that?! I'm sorry this was actually a very stupid issue. Maybe I was just confused by the fact that I was not working on my machine. Many thanks for your kind help, it solved the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
iliyapolak wrote:
Regarding problem #3
Did you include header file "functional" ?
Yes, I did. The issue is now solved thanks to Tim P. help. Nevertheless, thank you for the help!
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page