- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I used "-mcmodel=large -shared -intel" to enable large array memory allocation and code did compiled. but when I tried to run it it gave me the "Segmentation Fault Error."
I am using gcc compiler.
Before using "-mcmodel=large -shared -intel" I was getting following error,
****************************************
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccStHBkM.o: In function `MAIN__':
FormingSc2_2D_NEW_II.f95:(.text+0x16): undefined reference to `_gfortran_set_options'
FormingSc2_2D_NEW_II.f95:(.text+0x60): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0xaa): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0xf4): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0x13e): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0x188): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0x1e3): undefined reference to `_gfortran_st_read'
FormingSc2_2D_NEW_II.f95:(.text+0x217): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x228): undefined reference to `_gfortran_transfer_real'
FormingSc2_2D_NEW_II.f95:(.text+0x246): undefined reference to `_gfortran_st_read_done'
FormingSc2_2D_NEW_II.f95:(.text+0x311): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x326): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x3fd): undefined reference to `_gfortran_st_write'
FormingSc2_2D_NEW_II.f95:(.text+0x442): undefined reference to `_gfortran_transfer_integer'
FormingSc2_2D_NEW_II.f95:(.text+0x460): undefined reference to `_gfortran_st_write_done'
FormingSc2_2D_NEW_II.f95:(.text+0x524): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x53b): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x563): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x57a): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5a2): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5b9): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5e1): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5f8): additional relocation overflows omitted from the output
FormingSc2_2D_NEW_II.f95:(.text+0xe43): undefined reference to `_gfortran_st_write'
FormingSc2_2D_NEW_II.f95:(.text+0xe88): undefined reference to `_gfortran_transfer_real'
FormingSc2_2D_NEW_II.f95:(.text+0xea6): undefined reference to `_gfortran_st_write_done'
FormingSc2_2D_NEW_II.f95:(.text+0xef6): undefined reference to `_gfortran_st_close'
FormingSc2_2D_NEW_II.f95:(.text+0xf2b): undefined reference to `_gfortran_st_close'
FormingSc2_2D_NEW_II.f95:(.text+0xf60): undefined reference to `_gfortran_st_close'
FormingSc2_2D_NEW_II.f95:(.text+0xf95): undefined reference to `_gfortran_st_close'
collect2: ld returned 1 exit status
*************************************************************
When I used "gcc -mcmodel=large -shared -intel" There was no error in compilation but when I run ./a.out
It gave me error"Segmentation Fault"
*************************************************************
Below are the arrays I am using in my code.
DOUBLE PRECISION, DIMENSION(62115840,3) :: Sc
DOUBLE PRECISION, DIMENSION(50000000,3) :: Sc2
DOUBLE PRECISION, DIMENSION(50000000,3) :: SpK
Thank you.
Mital.
I used "-mcmodel=large -shared -intel" to enable large array memory allocation and code did compiled. but when I tried to run it it gave me the "Segmentation Fault Error."
I am using gcc compiler.
Before using "-mcmodel=large -shared -intel" I was getting following error,
****************************************
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccStHBkM.o: In function `MAIN__':
FormingSc2_2D_NEW_II.f95:(.text+0x16): undefined reference to `_gfortran_set_options'
FormingSc2_2D_NEW_II.f95:(.text+0x60): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0xaa): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0xf4): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0x13e): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0x188): undefined reference to `_gfortran_st_open'
FormingSc2_2D_NEW_II.f95:(.text+0x1e3): undefined reference to `_gfortran_st_read'
FormingSc2_2D_NEW_II.f95:(.text+0x217): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x228): undefined reference to `_gfortran_transfer_real'
FormingSc2_2D_NEW_II.f95:(.text+0x246): undefined reference to `_gfortran_st_read_done'
FormingSc2_2D_NEW_II.f95:(.text+0x311): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x326): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x3fd): undefined reference to `_gfortran_st_write'
FormingSc2_2D_NEW_II.f95:(.text+0x442): undefined reference to `_gfortran_transfer_integer'
FormingSc2_2D_NEW_II.f95:(.text+0x460): undefined reference to `_gfortran_st_write_done'
FormingSc2_2D_NEW_II.f95:(.text+0x524): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x53b): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x563): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x57a): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5a2): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5b9): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5e1): relocation truncated to fit: R_X86_64_32S against `.bss'
FormingSc2_2D_NEW_II.f95:(.text+0x5f8): additional relocation overflows omitted from the output
FormingSc2_2D_NEW_II.f95:(.text+0xe43): undefined reference to `_gfortran_st_write'
FormingSc2_2D_NEW_II.f95:(.text+0xe88): undefined reference to `_gfortran_transfer_real'
FormingSc2_2D_NEW_II.f95:(.text+0xea6): undefined reference to `_gfortran_st_write_done'
FormingSc2_2D_NEW_II.f95:(.text+0xef6): undefined reference to `_gfortran_st_close'
FormingSc2_2D_NEW_II.f95:(.text+0xf2b): undefined reference to `_gfortran_st_close'
FormingSc2_2D_NEW_II.f95:(.text+0xf60): undefined reference to `_gfortran_st_close'
FormingSc2_2D_NEW_II.f95:(.text+0xf95): undefined reference to `_gfortran_st_close'
collect2: ld returned 1 exit status
*************************************************************
When I used "gcc -mcmodel=large -shared -intel" There was no error in compilation but when I run ./a.out
It gave me error"Segmentation Fault"
*************************************************************
Below are the arrays I am using in my code.
DOUBLE PRECISION, DIMENSION(62115840,3) :: Sc
DOUBLE PRECISION, DIMENSION(50000000,3) :: Sc2
DOUBLE PRECISION, DIMENSION(50000000,3) :: SpK
Thank you.
Mital.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make sure the 1 option "-shared-intel" is one option. This post makes it look like you used 2 options "-shared" and "-intel". It should be "-shared-intel".
Roughly, your arrays require 3.9GB of storage. So your server has over 4GB of RAM, correct? Maybe 6GB would be sufficient, but greater than 6GB would be better.
Read through this article: http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/
Then if -heap-arrays doesn't help, compile and linke with -g -traceback.
If you are mixing ifort and gcc code, make sure gcc is using -m64. You are NOT also linking gfortran code are you?
ron
Roughly, your arrays require 3.9GB of storage. So your server has over 4GB of RAM, correct? Maybe 6GB would be sufficient, but greater than 6GB would be better.
Read through this article: http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/
Then if -heap-arrays doesn't help, compile and linke with -g -traceback.
If you are mixing ifort and gcc code, make sure gcc is using -m64. You are NOT also linking gfortran code are you?
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Ronald,
"-shared-intel" is not working if I use both seperat then it works and yes I am using linking gfortran code. And I am running my code on cluster with 8gb RAM.
Mital
"-shared-intel" is not working if I use both seperat then it works and yes I am using linking gfortran code. And I am running my code on cluster with 8gb RAM.
Mital
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-shared-intel works with newer versions of ifort. Older versions used -i-shared option. What version of the compiler are you using?
Also, some versions of 64bit Linux limit static data to 2GB no matter what you do with the compiler. Not all distributions, but some. Windows x64 also limits static data to 2GB. I would suggest considering making that data allocatable rather than static arrays like you showed from your code. There are no limits on data that is allocated, well, your limit is your physical ram + swap space.
ron
Also, some versions of 64bit Linux limit static data to 2GB no matter what you do with the compiler. Not all distributions, but some. Windows x64 also limits static data to 2GB. I would suggest considering making that data allocatable rather than static arrays like you showed from your code. There are no limits on data that is allocated, well, your limit is your physical ram + swap space.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using 11.0 verson, and I have to run gfortran instead of ifort. Can I pass the same command for gfortran, I mean "-shared-intel".
Thanks Ronald..
Mital
Thanks Ronald..
Mital
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ronald,
It worked as I compile with ifort.....
Mital....
It worked as I compile with ifort.....
Mital....

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page