WRF icon indicating copy to clipboard operation
WRF copied to clipboard

WRF4.4 does not compile with ifort and dmpar

Open lmarelle opened this issue 2 years ago • 7 comments

Describing the bug When compiling with ifort+dmpar (15), the compilation of WRF4.4 fails with module_stoch.f90

Compile script output module_stoch.f90(117): error #7837: Two or more accessible entities, other than generic interfaces, may have the same name only if the name is not used to refer to an entity in the scoping unit. [WRF_DM_MAXVAL] wrf_dm_maxval, wrf_err_message, local_communicator_x, local_communicator_y, data_order_xzy --------------------------^ compilation aborted for module_stoch.f90 (code 1)

Explanation This issue occurs because USE module_dm is there twice in module_stoch.F when DM_PARALLEL is enabled line 111: USE module_dm line 115: #ifdef DM_PARALLEL USE module_dm, ONLY : …

Fix In SUBROUTINE INITIALIZE_STOCH, removing the first USE module_dm solves the issue

lmarelle avatar Jul 27 '22 21:07 lmarelle

@lmarelle What happens if you choose option 13, or serial option?

weiwangncar avatar Jul 28 '22 01:07 weiwangncar

I am getting the same error with option 13:

module_stoch.f90(117): error #7837: Two or more accessible entities, other than generic interfaces, may have the same name only if the name is not used to refer to an entity in the scoping unit. [WRF_DM_MAXVAL] wrf_dm_maxval, wrf_err_message, local_communicator_x, local_communicator_y, data_order_xzy --------------------------^ compilation aborted for module_stoch.f90 (code 1)

lmarelle avatar Jul 28 '22 12:07 lmarelle

@lmarelle Thanks for testing. Two questions: 1. If you remove the first 'USE module_dm' in module_stock.F, will it work for the serial compilation? 2. What is your version of the Intel compiler?

weiwangncar avatar Jul 28 '22 16:07 weiwangncar

  1. Yes this also works for serial compilation
  2. ifort version is 12.1.3 20120212 I did not have issues with it with previous versions of WRF, back to at least 3.9.1

lmarelle avatar Jul 28 '22 20:07 lmarelle

Should I create a pull request for this?

lmarelle avatar Jul 28 '22 21:07 lmarelle

@lmarelle Just hold on for a while. Is it possible for you to upgrade your compiler? Yours is almost 10 years old. I'm glad that you haven't encountered other problem thus far.

weiwangncar avatar Jul 28 '22 21:07 weiwangncar

@lmarelle I checked the code, and it looks the first reference to 'use module_dm' was added in v4.4, and it does appear not needed. I also tested it here using serial and dmpar option and it works. So if it is ok with you, please go ahead and make a PR to remove the first 'USE module_dm'. Thanks.

weiwangncar avatar Jul 29 '22 15:07 weiwangncar

This extra call was added when some WRF-Solar changes were made for the last release. It may not be needed but we need to check why it was added.

On Thu, Jul 28, 2022 at 6:34 AM Louis Marelle @.***> wrote:

I am getting the same error with option 13:

module_stoch.f90(117): error #7837: Two or more accessible entities, other than generic interfaces, may have the same name only if the name is not used to refer to an entity in the scoping unit. [WRF_DM_MAXVAL] wrf_dm_maxval, wrf_err_message, local_communicator_x, local_communicator_y, data_order_xzy --------------------------^ compilation aborted for module_stoch.f90 (code 1)

— Reply to this email directly, view it on GitHub https://github.com/wrf-model/WRF/issues/1751#issuecomment-1198081494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIZ77AM5OP3ZBFAJAU2QT3VWJ46JANCNFSM543EG2TQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dudhia avatar Oct 11 '22 07:10 dudhia