- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm debugging a crash in my Fortran code, and would like to try stack protection.
Is fstack-protector-all supported on the MIC platform? When I build with -mic -fstack-protector-all the executable crashes because it can't find the libssp.so.0 library. Is a MIC version of that library supposed to be included with my compiler? I'm using ifort 14.0.2.
Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose you may require -mmic -g -fstack-protector-all.
On my installation, 'locate libssp | grep k1om' shows me /opt/mpss/3.2.3/sysroots/k1om-mpss-linux/usr/lib64/.debug/libssp.so on host but it is not mounted nor copied by default to coprocessor. I stopped trying to update mpss due to the age of my system.
It's normal to require boosting the stack limit e.g. 'ulimit -s unlimited' on the coprocessor when running a normal (large) number of threads, unless it is possible to reduce the individual thread stack limit from the default 4M. I suspect that the optimization of number of threads per MPI process vs. number of ranks may be limited by this (e.g. 6 ranks of 30 threads each with OMP_STACK_SIZE=9m will still require "unlimited" stack).
I don't know whether the stack-protector option has been used successfully on MIC. Without it, stack overflow may break an application without throwing a segfault as you would expect on host.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me investigate and I'll get back to you.
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose you may require -mmic -g -fstack-protector-all.
On my installation, 'locate libssp | grep k1om' shows me /opt/mpss/3.2.3/sysroots/k1om-mpss-linux/usr/lib64/.debug/libssp.so on host but it is not mounted nor copied by default to coprocessor. I stopped trying to update mpss due to the age of my system.
It's normal to require boosting the stack limit e.g. 'ulimit -s unlimited' on the coprocessor when running a normal (large) number of threads, unless it is possible to reduce the individual thread stack limit from the default 4M. I suspect that the optimization of number of threads per MPI process vs. number of ranks may be limited by this (e.g. 6 ranks of 30 threads each with OMP_STACK_SIZE=9m will still require "unlimited" stack).
I don't know whether the stack-protector option has been used successfully on MIC. Without it, stack overflow may break an application without throwing a segfault as you would expect on host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe -fstack-protector-all should be supported for MIC, but I can't produce a dependency on libssp.so with my own example:
[U539581]$ ifort -g -fstack-protector-all -mmic getTypeBoundPtKB.f90 -o getTypeBoundPtKB.f90-mic.x
[U539581]$
[mic0 pbkenned]# ./getTypeBoundPtKB.f90-mic.x
subArray = 99 99 99 99
[mic0 pbkenned]#
Can you please:
1) Attach a test case
2) Indicate your exact compile command line
3) Repeat 2), but add -dryrun, capture the output, and attach.
4) Indicate what version of MPSS you are using
Thanks,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, I used locate to find the k10m version of libssp. The MIC executable ran successfully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're satisfied with copying libssp to the card, then we'll consider this case closed.
Patrick
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page