- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The following test program segfaults with ifort versions 11.1 20100414 and 10.1 20090203.
Workaround is included.
Kind regards,
Wim
!=======================
[fortran]program reshape_bug implicit none integer , parameter :: dp = selected_real_kind(p=13,r=300) ! this should generate a 4-by-2 array with the elements ordered ! in the way they are shown: ! -> abscissas in the first column and ! -> weights in the second column ! this segfaults ifort version 10.1 and 11.1 real(dp) , parameter :: gl_xw002(4,2) = reshape( reshape( [ & -8.61136311594052575223e-1_dp , 3.47854845137453857373e-1_dp , & -3.39981043584856264802e-1_dp , 6.52145154862546142626e-1_dp , & 3.39981043584856264802e-1_dp , 6.52145154862546142626e-1_dp , & 8.61136311594052575223e-1_dp , 3.47854845137453857373e-1_dp & ] , shape=[2,4] , order=[1,2] ), shape=[4,2], order=[2,1] ) ! workaround: ! store the abscissas and weights in separate arrays and concatenate those real(dp) , parameter :: gl_x001(4) = [ & -8.61136311594052575223e-1_dp , & -3.39981043584856264802e-1_dp , & 3.39981043584856264802e-1_dp , & 8.61136311594052575223e-1_dp & ] real(dp) , parameter :: gl_w001(4) = [ & 3.47854845137453857373e-1_dp , & 6.52145154862546142626e-1_dp , & 6.52145154862546142626e-1_dp , & 3.47854845137453857373e-1_dp & ] real(dp) , parameter :: gl_xw003(4,2) = reshape([gl_x001,gl_w001],shape=[4,2],order=[1,2]) integer :: i do i = 1,size(gl_xw003,dim=1) print *, gl_xw003(i,:) end do end program reshape_bug [/fortran] !===============================
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 11.1 and 10.1 compilers I tested suffer an internal compiler error as shown but not a segfault as you reported.
$ ifort -V -c reshape_bug.f90
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414 Package ID: l_cprof_p_11.1.072
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Fortran 11.1-2739
reshape_bug.f90(10): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
real(dp) , parameter :: gl_xw002(4,2) = reshape( reshape( [ &
^
[ Aborting due to internal error. ]
compilation aborted for reshape_bug.f90 (code 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kevin,
You're right. It's not a segfault, but an internal error.
Regards,
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for confirming, Wim. I reported this to development (under the internal tracking id below) and will update asI learn more.
(Internal tracking id: DPD200159382)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This error has been reportedasissue number 599518 with the support account of
my employer.
Regards,
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 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