[FLASH-USERS] Segmentation fault due to POINTER_INTENT_OUT

Yingchao Lu yingchao.lu at gmail.com
Fri Nov 10 23:21:52 EST 2017


Hi Klaus,

Thanks for your answer. Which compiler option is relevant for the
FortranLangFeatures.fh?

Thanks,
Yingchao

On Fri, Nov 10, 2017 at 1:58 PM, Klaus Weide <klaus at flash.uchicago.edu>
wrote:

> On Thu, 9 Nov 2017, Yingchao Lu wrote:
>
> > Using ftn compiler on cori, segmentation fault is encountered and
> > backtracked to the subroutine in hy_memReleaseBlkPtr.F90.
> >
> ....
> >
> > I solved it by using -DPOINTER_INTENT_OUT=pointer. Does this cause
> problems
> > for any other part of the code?
>
> Hi Yingchao,
>
> You solution is a good one. It should not cause any problems with either
> the current or near-future versions of the code.
>
> The header file "FortranLangFeatures.fh" (included already in releases
> since FLASH 4.2 or so) is used to enable or disable use of a couple of
> compiler features that were introduced officially in Fortran 2003 or 2008,
> but are also implemented by many compilers that don't fully support those
> standards. These features, including using INTENT(OUT) on POINTER variable
> declaration, can help a compiler in making optimization decisions, and can
> help eliminate code errors. None of them are needed for code correctness.
>
> If you can come up with a preprocessor test for detecting your compiler
> that has problems with "POINTER,INTENT(OUT)", along the lines of the tests
> already in Simulation/FortranLangFeatures.fh, you should add it there;
> and I would appreciate a copy so we can make it available in the next code
> release!
>
> Klaus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20171110/2a6c7734/attachment-0001.htm>


More information about the flash-users mailing list