- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like a compiler bug in Intel Fortran to me
Intel now would prefer you to submit an incident at their Online Service Center (OSC):
https://supporttickets.intel.com/?lang=en-US
You may want to consider the following as a workaround until the issue is fixed in the compiler:
program test implicit none integer, parameter :: sparsity_model_l = 10 integer, parameter :: op_subspace_l = 5 type op_matrix_t character(len=sparsity_model_l) :: sparsity_model = "" ! Initialize character(len=op_subspace_l) :: subspace = "" ! Initialize end type op_matrix_t type(op_matrix_t) :: obs call debug_op_matrix_t(obs) obs%sparsity_model = 'foo' obs%subspace = 'bar' call debug_op_matrix_t(obs) contains subroutine debug_op_matrix_t(var) type(op_matrix_t), intent(in) :: var write(*,'("obs = {")') if ( len_trim(var%sparsity_model) > 0 ) then write(*,'(*(g0))') ' sparsity_model', ' = ', "'"//trim(var%sparsity_model)//"'" else write(*,'(*(g0))') ' sparsity_model', ' = ', "''" end if if ( len_trim(var%sparsity_model) > 0 ) then write(*,'(*(g0))') ' subspace ', ' = ', "'"//trim(var%subspace)//"'" else write(*,'(*(g0))') ' subspace ', ' = ', "''" end if write(*,'("}")') end subroutine debug_op_matrix_t end program test
Upon execution,
obs = { sparsity_model = '' subspace = '' } obs = { sparsity_model = 'foo' subspace = 'bar' }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I can confirm the segfault for Windows (PSXE2017 update 4, 32/64, release and debug), too. Interestingly the bug only occurs for
integer, parameter :: sparsity_model_l = 10 integer, parameter :: op_subspace_l = 5
Other combinations like 11/5 or 12/6 works fine. @Michael You should play lottery ;-)
Is there a logical explanation, why 10/5 fails? Would the disassembly give a hint?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was initially unable to reproduce this, either on a system running RHEL 7.3 (with glibc 2.17, gcc 4.8) or a system with Ubuntu 14.04. However, I was subsequently able to reproduce it on older systems running openSUSE 11.4 and RHEL 6.0, with glibc 2.11 and 2.12, gcc 4.5 and 4.4 respectively, all with the same binary. The GNU libraries are linked dynamically, whereas the Intel libraries are linked statically, so this is suggestive that this is a consequence of the glibc version.
Which glibc and gcc versions are you using, and are you able to test on another system with more recent ones?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think my glibc and gcc are fairly recent:
goerz@mlhpc2:~> ldd --version ldd (Ubuntu GLIBC 2.23-0ubuntu9) 2.23 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.
goerz@mlhpc2:~> gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I don't think I have access to any system with newer versions than that at the moment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Martyn, if this issue is depending on the glibc version, why will this segfault be visible on Windows OS? In #3 I showed that it occurs on Windows also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If it may help: On Mint 17.3 (Ubuntu 14 based, glibc 2.19, gcc 4.84) with PSXE2017 update 4 the segfault occurs, with PSXE2016 no segfault occurs. I assume, like FortranFan before, that this is a bug in PSXE2017. That the segfault occurs on Windows OS too confirms me in that point.
obs = { sparsity_model = '' subspace = '' } obs = { sparsity_model = '' forrtl: severe (174): SIGSEGV, segmentation fault occurred Image PC Routine Line Source a.out 00000000004031F4 Unknown Unknown Unknown libpthread-2.19.s 00007FF27130F330 Unknown Unknown Unknown a.out 000000000048883B Unknown Unknown Unknown a.out 000000000042D961 Unknown Unknown Unknown a.out 000000000040D4E5 Unknown Unknown Unknown a.out 0000000000402F60 Unknown Unknown Unknown a.out 000000000040299E Unknown Unknown Unknown libc-2.19.so 00007FF270F57F45 __libc_start_main Unknown Unknown a.out 00000000004028A9 Unknown Unknown Unknown *** Error in `./a.out': free(): invalid pointer: 0x00000000009d9010 *** Aborted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page