wrf-model / WRF

The official repository for the Weather Research and Forecasting (WRF) model
Other
1.26k stars 693 forks source link

Fail to compile in a Cray Environment #1658

Closed davidedelvento closed 2 years ago

davidedelvento commented 2 years ago

Describe the bug WRF v4.3 Fail to compile on a Cray environment

To Reproduce

  1. Cray Fortran : Version 12.0.3
  2. Compile Option 46
  3. Output is

    ftn-855 crayftn: ERROR MODULE_MP_NSSL_2MOM, File = module_mp_nssl_2mom.f90, Line = 154, Column = 8
    The compiler has detected errors in module "MODULE_MP_NSSL_2MOM".  No module information file will be created for this module.
    
          open(15,file='namelist.output',status='old',action='readwrite', access='append',form='formatted')
                                                                                 ^                          
    ftn-24 crayftn: ERROR NSSL_2MOM_INIT, File = module_mp_nssl_2mom.f90, Line = 1173, Column = 82
    The character constant "APPEND  ", for the I/O control information list item ACCESS, is not allowed.

which eventually prevents the binary from being created

Additional context My understanding is that the statement open(15,file='namelist.output',status='old',action='readwrite', access='append',form='formatted') is not standard conformant and deprecated. The intended behavior can be achieved by open(15,file='namelist.output',status='old',action='readwrite', position='append',form='formatted') which instead compiles fine.

dudhia commented 2 years ago

It may have been corrected. I see position in the current develop branch.

On Wed, Jan 26, 2022 at 12:03 PM Davide @.***> wrote:

Describe the bug WRF v4.3 Fail to compile on a Cray environment

To Reproduce

  1. Cray Fortran : Version 12.0.3
  2. Compile Option 46
  3. Output is

ftn-855 crayftn: ERROR MODULE_MP_NSSL_2MOM, File = module_mp_nssl_2mom.f90, Line = 154, Column = 8 The compiler has detected errors in module "MODULE_MP_NSSL_2MOM". No module information file will be created for this module.

      open(15,file='namelist.output',status='old',action='readwrite', access='append',form='formatted')
                                                                             ^

ftn-24 crayftn: ERROR NSSL_2MOM_INIT, File = module_mp_nssl_2mom.f90, Line = 1173, Column = 82 The character constant "APPEND ", for the I/O control information list item ACCESS, is not allowed.

which eventually prevents the binary from being created

Additional context My understanding is that the statement open(15,file='namelist.output',status='old',action='readwrite', access='append',form='formatted') is not standard conformant and deprecated. The intended behavior can be achieved by open(15,file='namelist.output',status='old',action='readwrite', position='append',form='formatted') which instead compiles fine.

— Reply to this email directly, view it on GitHub https://github.com/wrf-model/WRF/issues/1658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIZ77GU2NA5EWBTTO6H4KLUYBAQRANCNFSM5M33GKIA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

dudhia commented 2 years ago

1577 fixed it a couple of months ago

On Wed, Jan 26, 2022 at 12:08 PM Jimy Dudhia @.***> wrote:

It may have been corrected. I see position in the current develop branch.

On Wed, Jan 26, 2022 at 12:03 PM Davide @.***> wrote:

Describe the bug WRF v4.3 Fail to compile on a Cray environment

To Reproduce

  1. Cray Fortran : Version 12.0.3
  2. Compile Option 46
  3. Output is

ftn-855 crayftn: ERROR MODULE_MP_NSSL_2MOM, File = module_mp_nssl_2mom.f90, Line = 154, Column = 8 The compiler has detected errors in module "MODULE_MP_NSSL_2MOM". No module information file will be created for this module.

      open(15,file='namelist.output',status='old',action='readwrite', access='append',form='formatted')
                                                                             ^

ftn-24 crayftn: ERROR NSSL_2MOM_INIT, File = module_mp_nssl_2mom.f90, Line = 1173, Column = 82 The character constant "APPEND ", for the I/O control information list item ACCESS, is not allowed.

which eventually prevents the binary from being created

Additional context My understanding is that the statement open(15,file='namelist.output',status='old',action='readwrite', access='append',form='formatted') is not standard conformant and deprecated. The intended behavior can be achieved by open(15,file='namelist.output',status='old',action='readwrite', position='append',form='formatted') which instead compiles fine.

— Reply to this email directly, view it on GitHub https://github.com/wrf-model/WRF/issues/1658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIZ77GU2NA5EWBTTO6H4KLUYBAQRANCNFSM5M33GKIA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

davegill commented 2 years ago

@davidedelvento Davide Thanks - the Cray folks sent us this also. The next release is out SOON!

davidedelvento commented 2 years ago

Perfect, thanks!

davegill commented 2 years ago

@davidedelvento PR #1577 "Small physics syntax errors" SHA1 7c6fd575b7a8fe5715b

Here are the first few lines:

    Small physics syntax errors (#1577)

    TYPE: bug fix

    KEYWORDS: HPE, CCE, syntax

    SOURCE: Tricia Balle (HPE)

    DESCRIPTION OF CHANGES:
    Problem:
    There were three types of syntax errors that were uncovered by the HPE CCE compiler.
    1. Open statement used `action="append"`.
    2. Multiple unary operators next to each other `*+`
    3. Multiple unary operators next to each other `*-1`.

    Solution:
    1. The correct usage is `position="append"`.
    2. The developer agrees with the new modification to `GS3*+SASR1` was the original intent.
    3. Typically, `*(-1)` is intended, and this is the case.
davidedelvento commented 2 years ago

Great. For you and others who may land on this issue, and in case you haven't tested this yourself yet, I confirm that the HEAD of current main branch, namely aa9f3b61ae9b0fc08d11fbeccd201b90404369e1 compiles correctly in the Derecho environment.