Stack overflow when calling a subroutine

Stack overflow when calling a subroutine

I got error message below when calling a subroutine

CALL COMPPR(MODEL,NUMEL,NUMNOD,MAP,AREA,C3,INDPER)

forrtl: severe (170): Program Exception - stack overflow

The subroutine is below

MODULE Interface_COMPPR

    INTERFACE

        SUBROUTINECOMPPR(MODEL,NE,NQ,NodeIndex,AREA,C,INDPER)

            IMPLICIT NONE

            !input variables

            INTEGERNE,NQ

            CHARACTER*1 MODEL

            INTEGER, POINTER:: NodeIndex(:,:)

            INTEGER, POINTER:: INDPER(:)

            REAL, POINTER:: AREA(:)

            !output variables

            REAL, POINTER:: C(:,:)

        END SUBROUTINE

    END INTERFACE

END MODULE

This issue is occured only when using x64 compiler. No error message when using win32 compiler.

Could you provide any clue on this issue? Thanks!

5 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Appendix to this issue:

This error is only occured when using x64 complier. It passes when uing win32 compiler.

Please provide a small but complete program that demonstrates the problem. You haven't shown the actual routine, by the way, just an interface block for it. Typically, if you have an interface block for a Fortran subroutine, other than what's needed for a generic declaration, you're doing it wrong.

Steve - Intel Developer Support

Does /check:arg_temp_created show anything?  If so, you would expect the point where you need to set stack higher (if not using /heap-arrays) to be different for Intel64 than for ia32.

If you already set stack parameters, you can expect to need larger ones for X64.

I got the reason. I forget add the link option of "/STACK:10000000" in x64. Thanks!

发表评论

登录添加评论。还不是成员?立即加入