JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for COMP-FORTRAN-90 Archives


COMP-FORTRAN-90 Archives

COMP-FORTRAN-90 Archives


COMP-FORTRAN-90@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

COMP-FORTRAN-90 Home

COMP-FORTRAN-90 Home

COMP-FORTRAN-90  July 2014

COMP-FORTRAN-90 July 2014

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Explicitly shaped optional array argument

From:

Bill Long <[log in to unmask]>

Reply-To:

Fortran 90 List <[log in to unmask]>

Date:

Wed, 23 Jul 2014 22:47:43 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (141 lines)

On Jul 23, 2014, at 4:49 PM, Oliver Fuhrer (MeteoSwiss) <[log in to unmask]> wrote:

> Hi Bill,
> 
> Thanks for the quick reply. Yes, the -Oipa0 still segfaults on Piz Daint using cce/8.2.4.

Indeed. Bug updated with this info. 

> 
> Cheers,
> Oli
> 
> PS. My full options are "-Oipa0 -target=native -eZ -em -en -O0 -g -eD -Rb -Rd -Rp -Rs”.
> PSS. Compiling without options is also rather interesting…

With no options, inlining of module procedures is enabled, which caused this (also included in the bug).

Cheers,
Bill


> 
>> ftn bug1.f90
> *** fei_op( arg_count = 1 ), expected at least 2 args with 0 optional args
> 
> ===============================
> PDGCS Internal error traceback:
>  [0xa8d3d8]]  _expr_type (<unknown>)
>  [0x4c7cfc]]  fei_copyin_ (<unknown>)
>  [0x4bfc4a]]  fei_op (<unknown>)
>  [0x42ff6c]]  cvrt_exp_to_pdg (m_cvrt.c:0)
>  [0x4380d8]]  cvrt_proc_to_pdg (m_cvrt.c:0)
>  [0x438b66]]  m_cvrt_to_pdg (<unknown>)
>  [0x45b1e2]]  m_start_ipa (<unknown>)
>  [0x41b64f]]  main (<unknown>)
> 
> ===============================
> Note:  This is a non-debug compiler.  Technical support should
>       continue problem isolation using a compiler built for
>       debugging.
> 
> ===============================
> Src_path_name: /scratch/daint/olifu/bug1/bug1.f90
> Src_file_name: bug1.f90
> Routine_name:  bug1_
> ftn-7991 crayftn: INTERNAL BUG1, File = bug1.f90, Line = 25
>  INTERNAL COMPILER ERROR:  "_expr_type: Invalid table type" (v_expr_utl.c 93879, line 6576)
> 
> 
> On 23 Jul 2014, at 23:39, John Harper <[log in to unmask]> wrote:
> 
>> Gfortran, g95 and ifort all compile and run it but Sun Fortran 95 8.6 Linux_i386 2011/11/16 complains at run time that
>> 
>> CALL lbc_backend( field, SIZE(field,1), 1, src=src )
>> 
>> is an attempt to use a missing optional dummy. I note that field
>> is of rank 1 inside lbc_masspooint but rank 2 inside lbc_backend.
>> 
>> On Wed, 23 Jul 2014, Bill Long wrote:
>> 
>>> Date: Wed, 23 Jul 2014 17:30:38 +0000
>>> From: Bill Long <[log in to unmask]>
>>> Reply-To: Fortran 90 List <[log in to unmask]>
>>> To: [log in to unmask]
>>> Subject: Re: Explicitly shaped optional array argument
>>> This should work.  I filed a bug.  In the mean time, does the problem go away if compiled with -Oipa0 ?  (Disable inlining.)
>>> 
>>> Cheers,
>>> Bill
>>> 
>>> On Jul 23, 2014, at 11:47 AM, Oliver Fuhrer (MeteoSwiss) <[log in to unmask]> wrote:
>>> 
>>>> Dear all,
>>>> 
>>>> I have a code which runs on PGI and GNU but segfaults on the Cray compiler which uses an explicitly shaped optional array argument.
>>>> 
>>>> MODULE test
>>>> 
>>>> CONTAINS
>>>> 
>>>> SUBROUTINE lbc_masspoint(field, src )
>>>>  IMPLICIT NONE
>>>>  REAL   , INTENT(INOUT)          :: field(:)
>>>>  REAL   , INTENT(IN),   OPTIONAL :: src(:)
>>>>  CALL lbc_backend( field, SIZE(field,1), 1, src=src )
>>>> END SUBROUTINE lbc_masspoint
>>>> 
>>>> SUBROUTINE lbc_backend(field, id, kd, src )
>>>>  IMPLICIT NONE
>>>>  INTEGER, INTENT(IN)            :: id, kd
>>>>  REAL   , INTENT(INOUT)         :: field(id,kd)
>>>>  REAL   , INTENT(IN),  OPTIONAL :: src(id,kd)
>>>> END SUBROUTINE lbc_backend
>>>> 
>>>> END MODULE test
>>>> 
>>>> PROGRAM bug1
>>>> USE test
>>>> IMPLICIT NONE
>>>> REAL :: fexp(45)
>>>> CALL lbc_masspoint( fexp(:) )
>>>> END PROGRAM bug1
>>>> 
>>>> The problem is with the src field, which is actually not present but causes the executable to segfault. I am supposing that it’s legal to do this (I have searched Metcalf et al., but have not found anything to the contrary), but wanted to double check.
>>>> 
>>>> Kind regards,
>>>> Oli
>>>> 
>>>> 
>>>> _________________________________________________
>>>> Oliver Fuhrer
>>>> Numerical Models
>>>> 
>>>> Federal Department of Home Affairs FDHA
>>>> Federal Office of Meteorology and Climatology MeteoSwiss
>>>> We have moved and have new phone numbers:
>>>> Operation Center 1
>>>> Postfach 257
>>>> 8058 Zürich-Flughafen
>>>> T.   +41 58 460 93 59
>>>> M. +41 79 548 65 84
>>>> F.   +41 58 460 96 66
>>>> [log in to unmask]
>>>> http://www.meteoswiss.admin.ch/
>>> 
>>> Bill Long                                                                       [log in to unmask]
>>> Fortran Technical Suport  &                                  voice:  651-605-9024
>>> Bioinformatics Software Development                     fax:  651-605-9142
>>> Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
>>> 
>>> 
>> 
>> 
>> -- John Harper, School of Mathematics Statistics and Operations Research
>> Victoria University, PO Box 600, Wellington 6140, New Zealand
>> e-mail [log in to unmask] phone (+64)(4)463 5276 fax (+64)(4)463 5045

Bill Long                                                                       [log in to unmask]
Fortran Technical Suport  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
December 2015
November 2015
October 2015
September 2015
August 2015
June 2015
April 2015
March 2015
January 2015
December 2014
November 2014
October 2014
August 2014
July 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
July 2013
June 2013
May 2013
April 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
August 2010
July 2010
June 2010
March 2010
February 2010
January 2010
December 2009
October 2009
August 2009
July 2009
June 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997


WWW.JISCMAIL.AC.UK

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager