Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
33 Views

transfer intrinsic segfaults on macOS, works on Windows

We have an application that crashes (SEGFAULT) on macOS 10.14/10.15 but works correctly on Windows 10. For macOS we are on ifort (IFORT) 19.1.2.258 20200623 and on Windows 10 Intel(R) 64, Version 19.0.5.281 Build 20190815. We were able to use GDB to get to the crashing line but the line looks reasonable.

 

Thread 2 received signal SIGSEGV, Segmentation fault.
0x00000001003e1f46 in image@image_base::image_build_i8 (im=...,
data2=<error reading variable: value requires 8427240 bytes, which is more than max-value-size>)
at /Users/mjackson/EMsoft-Dev/EMsoftPublic/Source/EMsoftLib/image.f90:482
482 im%buff = transfer(data2, im%buff)

Just above that line we print out some variables:

 

im%dims= 4590 1836

shape(im%buff)=8427240

size(data2)=8427240

 

For some smaller input sizes this code works but at some point we start getting the segfaults, again, just on macOS. We have tried upping the ulimit thinking maybe a stack size issue but we are a bit baffled by this. GFortran on the same code base will run without any issues.

Source code is at:

https://github.com/EMsoft-org/EMsoft/blob/a33f0b4de4ada79cd5374ba3a6aca8cbedaaeaf2/Source/EMsoftLib/...

Any thoughts or ideas would be great.

 

Back Trace from GDB:

(gdb) bt
#0 0x00000001003e208d in image@image_base::image_build_i8 (im=...,
data2=<error reading variable: value requires 6320430 bytes, which is more than max-value-size>)
at /Users/mjackson/EMsoft-Dev/EMsoftPublic/Source/EMsoftLib/image.f90:482
#1 0x0000000100009f80 in mastersubroutine (enl=..., progname=..., nmldeffile=..., .tmp.PROGNAME.len_V$ae8=512,
.tmp.NMLDEFFILE.len_V$aea=512) at /Users/mjackson/EMsoft-Dev/EMsoftPublic/Source/DictionaryIndexing/EMEBSDDIpreview.f90:334
#2 0x0000000100001ded in emebsddipreview ()
at /Users/mjackson/EMsoft-Dev/EMsoftPublic/Source/DictionaryIndexing/EMEBSDDIpreview.f90:80
#3 0x0000000102f8f072 in main ()

0 Kudos
0 Replies